summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/accum.c16
-rw-r--r--src/mesa/main/accum.h39
-rw-r--r--src/mesa/main/api_arrayelt.c19
-rw-r--r--src/mesa/main/api_arrayelt.h47
-rw-r--r--src/mesa/main/api_exec.c224
-rw-r--r--src/mesa/main/api_loopback.c7
-rw-r--r--src/mesa/main/api_loopback.h16
-rw-r--r--src/mesa/main/api_noop.c110
-rw-r--r--src/mesa/main/api_noop.h16
-rw-r--r--src/mesa/main/api_validate.c63
-rw-r--r--src/mesa/main/api_validate.h4
-rw-r--r--src/mesa/main/attrib.c24
-rw-r--r--src/mesa/main/attrib.h38
-rw-r--r--src/mesa/main/blend.c6
-rw-r--r--src/mesa/main/bufferobj.c111
-rw-r--r--src/mesa/main/buffers.c56
-rw-r--r--src/mesa/main/colormac.h14
-rw-r--r--src/mesa/main/colortab.c57
-rw-r--r--src/mesa/main/colortab.h71
-rw-r--r--src/mesa/main/compiler.h3
-rw-r--r--src/mesa/main/context.c70
-rw-r--r--src/mesa/main/convolve.c56
-rw-r--r--src/mesa/main/convolve.h118
-rw-r--r--src/mesa/main/dd.h35
-rw-r--r--src/mesa/main/debug.c243
-rw-r--r--src/mesa/main/debug.h11
-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/dlist.c677
-rw-r--r--src/mesa/main/dlist.h84
-rw-r--r--src/mesa/main/drawpix.c26
-rw-r--r--src/mesa/main/drawpix.h35
-rw-r--r--src/mesa/main/enable.c39
-rw-r--r--src/mesa/main/enums.c5220
-rw-r--r--src/mesa/main/eval.c61
-rw-r--r--src/mesa/main/eval.h84
-rw-r--r--src/mesa/main/execmem.c7
-rw-r--r--src/mesa/main/extensions.c12
-rw-r--r--src/mesa/main/fbobject.c388
-rw-r--r--src/mesa/main/feedback.c39
-rw-r--r--src/mesa/main/feedback.h62
-rw-r--r--src/mesa/main/formats.c1124
-rw-r--r--src/mesa/main/formats.h182
-rw-r--r--src/mesa/main/framebuffer.c70
-rw-r--r--src/mesa/main/get.c16
-rw-r--r--src/mesa/main/get_gen.py4
-rw-r--r--src/mesa/main/histogram.c45
-rw-r--r--src/mesa/main/histogram.h48
-rw-r--r--src/mesa/main/light.c2
-rw-r--r--src/mesa/main/mfeatures.h48
-rw-r--r--src/mesa/main/mipmap.c78
-rw-r--r--src/mesa/main/mtypes.h158
-rw-r--r--src/mesa/main/pixel.c40
-rw-r--r--src/mesa/main/pixel.h47
-rw-r--r--src/mesa/main/queryobj.c48
-rw-r--r--src/mesa/main/queryobj.h59
-rw-r--r--src/mesa/main/rastpos.c162
-rw-r--r--src/mesa/main/rastpos.h163
-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.h5883
-rw-r--r--src/mesa/main/renderbuffer.c255
-rw-r--r--src/mesa/main/shaders.c41
-rw-r--r--src/mesa/main/shared.c4
-rw-r--r--src/mesa/main/state.c4
-rw-r--r--src/mesa/main/texcompress.c275
-rw-r--r--src/mesa/main/texcompress.h34
-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/texfetch.c672
-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)214
-rw-r--r--src/mesa/main/texformat.c1779
-rw-r--r--src/mesa/main/texformat.h264
-rw-r--r--src/mesa/main/texgen.c43
-rw-r--r--src/mesa/main/texgen.h43
-rw-r--r--src/mesa/main/texgetimage.c789
-rw-r--r--src/mesa/main/teximage.c1135
-rw-r--r--src/mesa/main/teximage.h3
-rw-r--r--src/mesa/main/texobj.c13
-rw-r--r--src/mesa/main/texparam.c92
-rw-r--r--src/mesa/main/texrender.c47
-rw-r--r--src/mesa/main/texstate.c20
-rw-r--r--src/mesa/main/texstore.c1320
-rw-r--r--src/mesa/main/texstore.h77
-rw-r--r--src/mesa/main/varray.h15
-rw-r--r--src/mesa/main/version.h8
-rw-r--r--src/mesa/main/vtxfmt.c32
-rw-r--r--src/mesa/main/vtxfmt.h28
-rw-r--r--src/mesa/main/vtxfmt_tmp.h42
94 files changed, 15829 insertions, 9100 deletions
diff --git a/src/mesa/main/accum.c b/src/mesa/main/accum.c
index 2345695f3c..032e13b96e 100644
--- a/src/mesa/main/accum.c
+++ b/src/mesa/main/accum.c
@@ -29,6 +29,10 @@
#include "macros.h"
#include "state.h"
#include "mtypes.h"
+#include "glapi/dispatch.h"
+
+
+#if FEATURE_accum
void GLAPIENTRY
@@ -51,7 +55,7 @@ _mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_Accum( GLenum op, GLfloat value )
{
GET_CURRENT_CONTEXT(ctx);
@@ -99,6 +103,16 @@ _mesa_Accum( GLenum op, GLfloat value )
}
+void
+_mesa_init_accum_dispatch(struct _glapi_table *disp)
+{
+ SET_Accum(disp, _mesa_Accum);
+ SET_ClearAccum(disp, _mesa_ClearAccum);
+}
+
+
+#endif /* FEATURE_accum */
+
void
_mesa_init_accum( GLcontext *ctx )
diff --git a/src/mesa/main/accum.h b/src/mesa/main/accum.h
index ce92688a5b..63740f07ed 100644
--- a/src/mesa/main/accum.h
+++ b/src/mesa/main/accum.h
@@ -38,25 +38,40 @@
#define ACCUM_H
-#include "mtypes.h"
+#include "main/mtypes.h"
-#if _HAVE_FULL_GL
-
-extern void GLAPIENTRY
-_mesa_Accum( GLenum op, GLfloat value );
+#if FEATURE_accum
+#define _MESA_INIT_ACCUM_FUNCTIONS(driver, impl) \
+ do { \
+ (driver)->Accum = impl ## Accum; \
+ } while (0)
extern void GLAPIENTRY
_mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
-extern void
-_mesa_init_accum( GLcontext *ctx );
+extern void
+_mesa_init_accum_dispatch(struct _glapi_table *disp);
+
+#else /* FEATURE_accum */
-#else
+#define _MESA_INIT_ACCUM_FUNCTIONS(driver, impl) do { } while (0)
-/** No-op */
-#define _mesa_init_accum( c ) ((void)0)
+static INLINE void
+_mesa_ClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha )
+{
+ /* this is used in _mesa_PopAttrib */
+ ASSERT_NO_FEATURE();
+}
-#endif
+static INLINE void
+_mesa_init_accum_dispatch(struct _glapi_table *disp)
+{
+}
+
+#endif /* FEATURE_accum */
+
+extern void
+_mesa_init_accum( GLcontext *ctx );
-#endif
+#endif /* ACCUM_H */
diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c
index 2462a1b003..469b4529f9 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 * );
@@ -71,6 +70,10 @@ typedef struct {
*/
#define TYPE_IDX(t) ( (t) == GL_DOUBLE ? 7 : (t) & 7 )
+
+#if FEATURE_arrayelt
+
+
static const int ColorFuncs[2][8] = {
{
_gloffset_Color3bv,
@@ -1160,7 +1163,7 @@ static void _ae_update_state( GLcontext *ctx )
at->array = attribArray;
/* Note: we can't grab the _glapi_Dispatch->VertexAttrib1fvNV
* function pointer here (for float arrays) since the pointer may
- * change from one execution of _ae_loopback_array_elt() to
+ * change from one execution of _ae_ArrayElement() to
* the next. Doing so caused UT to break.
*/
if (ctx->VertexProgram._Enabled
@@ -1254,7 +1257,7 @@ void _ae_unmap_vbos( GLcontext *ctx )
* for all enabled vertex arrays (for elt-th element).
* Note: this may be called during display list construction.
*/
-void GLAPIENTRY _ae_loopback_array_elt( GLint elt )
+void GLAPIENTRY _ae_ArrayElement( GLint elt )
{
GET_CURRENT_CONTEXT(ctx);
const AEcontext *actx = AE_CONTEXT(ctx);
@@ -1317,3 +1320,13 @@ void _ae_invalidate_state( GLcontext *ctx, GLuint new_state )
actx->NewState |= new_state;
}
}
+
+
+void _mesa_install_arrayelt_vtxfmt(struct _glapi_table *disp,
+ const GLvertexformat *vfmt)
+{
+ SET_ArrayElement(disp, vfmt->ArrayElement);
+}
+
+
+#endif /* FEATURE_arrayelt */
diff --git a/src/mesa/main/api_arrayelt.h b/src/mesa/main/api_arrayelt.h
index e621724fb2..d18c0792c3 100644
--- a/src/mesa/main/api_arrayelt.h
+++ b/src/mesa/main/api_arrayelt.h
@@ -27,16 +27,57 @@
#ifndef API_ARRAYELT_H
#define API_ARRAYELT_H
-#include "mtypes.h"
+
+#include "main/mtypes.h"
+
+#if FEATURE_arrayelt
+
+#define _MESA_INIT_ARRAYELT_VTXFMT(vfmt, impl) \
+ do { \
+ (vfmt)->ArrayElement = impl ## ArrayElement; \
+ } while (0)
extern GLboolean _ae_create_context( GLcontext *ctx );
extern void _ae_destroy_context( GLcontext *ctx );
extern void _ae_invalidate_state( GLcontext *ctx, GLuint new_state );
-extern void GLAPIENTRY _ae_loopback_array_elt( GLint elt );
+extern void GLAPIENTRY _ae_ArrayElement( GLint elt );
/* May optionally be called before a batch of element calls:
*/
extern void _ae_map_vbos( GLcontext *ctx );
extern void _ae_unmap_vbos( GLcontext *ctx );
-#endif
+extern void
+_mesa_install_arrayelt_vtxfmt(struct _glapi_table *disp,
+ const GLvertexformat *vfmt);
+
+#else /* FEATURE_arrayelt */
+
+#define _MESA_INIT_ARRAYELT_VTXFMT(vfmt, impl) do { } while (0)
+
+static INLINE GLboolean
+_ae_create_context( GLcontext *ctx )
+{
+ return GL_TRUE;
+}
+
+static INLINE void
+_ae_destroy_context( GLcontext *ctx )
+{
+}
+
+static INLINE void
+_ae_invalidate_state( GLcontext *ctx, GLuint new_state )
+{
+}
+
+static INLINE void
+_mesa_install_arrayelt_vtxfmt(struct _glapi_table *disp,
+ const GLvertexformat *vfmt)
+{
+}
+
+#endif /* FEATURE_arrayelt */
+
+
+#endif /* API_ARRAYELT_H */
diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index 02550ae108..1559984f43 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -30,9 +30,7 @@
#include "mfeatures.h"
-#if FEATURE_accum
#include "accum.h"
-#endif
#include "api_loopback.h"
#include "api_exec.h"
#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
@@ -41,9 +39,7 @@
#if FEATURE_ATI_fragment_shader
#include "shader/atifragshader.h"
#endif
-#if FEATURE_attrib_stack
#include "attrib.h"
-#endif
#include "blend.h"
#if FEATURE_ARB_vertex_buffer_object
#include "bufferobj.h"
@@ -54,29 +50,17 @@
#endif
#include "clear.h"
#include "clip.h"
-#if FEATURE_colortable
#include "colortab.h"
-#endif
#include "context.h"
-#if FEATURE_convolve
#include "convolve.h"
-#endif
#include "depth.h"
-#if FEATURE_dlist
#include "dlist.h"
-#endif
-#if FEATURE_drawpix
#include "drawpix.h"
#include "rastpos.h"
-#endif
#include "enable.h"
-#if FEATURE_evaluators
#include "eval.h"
-#endif
#include "get.h"
-#if FEATURE_feedback
#include "feedback.h"
-#endif
#include "fog.h"
#if FEATURE_EXT_framebuffer_object
#include "fbobject.h"
@@ -84,24 +68,18 @@
#include "ffvertex_prog.h"
#include "framebuffer.h"
#include "hint.h"
-#if FEATURE_histogram
#include "histogram.h"
-#endif
#include "imports.h"
#include "light.h"
#include "lines.h"
#include "macros.h"
#include "matrix.h"
#include "multisample.h"
-#if FEATURE_pixel_transfer
#include "pixel.h"
-#endif
#include "pixelstore.h"
#include "points.h"
#include "polygon.h"
-#if FEATURE_ARB_occlusion_query || FEATURE_EXT_timer_query
#include "queryobj.h"
-#endif
#include "readpix.h"
#include "scissor.h"
#include "state.h"
@@ -109,9 +87,7 @@
#include "texenv.h"
#include "texgetimage.h"
#include "teximage.h"
-#if FEATURE_texgen
#include "texgen.h"
-#endif
#include "texobj.h"
#include "texparam.h"
#include "texstate.h"
@@ -199,20 +175,10 @@ _mesa_init_exec_table(struct _glapi_table *exec)
SET_TexParameteri(exec, _mesa_TexParameteri);
SET_Translatef(exec, _mesa_Translatef);
SET_Viewport(exec, _mesa_Viewport);
-#if FEATURE_accum
- SET_Accum(exec, _mesa_Accum);
- SET_ClearAccum(exec, _mesa_ClearAccum);
-#endif
-#if FEATURE_dlist
- SET_CallList(exec, _mesa_CallList);
- SET_CallLists(exec, _mesa_CallLists);
- SET_DeleteLists(exec, _mesa_DeleteLists);
- SET_EndList(exec, _mesa_EndList);
- SET_GenLists(exec, _mesa_GenLists);
- SET_IsList(exec, _mesa_IsList);
- SET_ListBase(exec, _mesa_ListBase);
- SET_NewList(exec, _mesa_NewList);
-#endif
+
+ _mesa_init_accum_dispatch(exec);
+ _mesa_init_dlist_dispatch(exec);
+
SET_ClearDepth(exec, _mesa_ClearDepth);
SET_ClearIndex(exec, _mesa_ClearIndex);
SET_ClipPlane(exec, _mesa_ClipPlane);
@@ -222,21 +188,10 @@ _mesa_init_exec_table(struct _glapi_table *exec)
SET_DepthFunc(exec, _mesa_DepthFunc);
SET_DepthMask(exec, _mesa_DepthMask);
SET_DepthRange(exec, _mesa_DepthRange);
-#if FEATURE_drawpix
- SET_Bitmap(exec, _mesa_Bitmap);
- SET_CopyPixels(exec, _mesa_CopyPixels);
- SET_DrawPixels(exec, _mesa_DrawPixels);
-#endif
-#if FEATURE_feedback
- SET_InitNames(exec, _mesa_InitNames);
- SET_FeedbackBuffer(exec, _mesa_FeedbackBuffer);
- SET_LoadName(exec, _mesa_LoadName);
- SET_PassThrough(exec, _mesa_PassThrough);
- SET_PopName(exec, _mesa_PopName);
- SET_PushName(exec, _mesa_PushName);
- SET_SelectBuffer(exec, _mesa_SelectBuffer);
- SET_RenderMode(exec, _mesa_RenderMode);
-#endif
+
+ _mesa_init_drawpix_dispatch(exec);
+ _mesa_init_feedback_dispatch(exec);
+
SET_FogCoordPointerEXT(exec, _mesa_FogCoordPointerEXT);
SET_Fogf(exec, _mesa_Fogf);
SET_Fogfv(exec, _mesa_Fogfv);
@@ -270,68 +225,22 @@ _mesa_init_exec_table(struct _glapi_table *exec)
SET_Lighti(exec, _mesa_Lighti);
SET_Lightiv(exec, _mesa_Lightiv);
SET_LoadMatrixd(exec, _mesa_LoadMatrixd);
-#if FEATURE_evaluators
- SET_GetMapdv(exec, _mesa_GetMapdv);
- SET_GetMapfv(exec, _mesa_GetMapfv);
- SET_GetMapiv(exec, _mesa_GetMapiv);
- SET_Map1d(exec, _mesa_Map1d);
- SET_Map1f(exec, _mesa_Map1f);
- SET_Map2d(exec, _mesa_Map2d);
- SET_Map2f(exec, _mesa_Map2f);
- SET_MapGrid1d(exec, _mesa_MapGrid1d);
- SET_MapGrid1f(exec, _mesa_MapGrid1f);
- SET_MapGrid2d(exec, _mesa_MapGrid2d);
- SET_MapGrid2f(exec, _mesa_MapGrid2f);
-#endif
+
+ _mesa_init_eval_dispatch(exec);
+
SET_MultMatrixd(exec, _mesa_MultMatrixd);
-#if FEATURE_pixel_transfer
- SET_GetPixelMapfv(exec, _mesa_GetPixelMapfv);
- SET_GetPixelMapuiv(exec, _mesa_GetPixelMapuiv);
- SET_GetPixelMapusv(exec, _mesa_GetPixelMapusv);
- SET_PixelMapfv(exec, _mesa_PixelMapfv);
- SET_PixelMapuiv(exec, _mesa_PixelMapuiv);
- SET_PixelMapusv(exec, _mesa_PixelMapusv);
- SET_PixelTransferf(exec, _mesa_PixelTransferf);
- SET_PixelTransferi(exec, _mesa_PixelTransferi);
- SET_PixelZoom(exec, _mesa_PixelZoom);
-#endif
+
+ _mesa_init_pixel_dispatch(exec);
+
SET_PixelStoref(exec, _mesa_PixelStoref);
SET_PointSize(exec, _mesa_PointSize);
SET_PolygonMode(exec, _mesa_PolygonMode);
SET_PolygonOffset(exec, _mesa_PolygonOffset);
SET_PolygonStipple(exec, _mesa_PolygonStipple);
-#if FEATURE_attrib_stack
- SET_PopAttrib(exec, _mesa_PopAttrib);
- SET_PushAttrib(exec, _mesa_PushAttrib);
- SET_PopClientAttrib(exec, _mesa_PopClientAttrib);
- SET_PushClientAttrib(exec, _mesa_PushClientAttrib);
-#endif
-#if FEATURE_drawpix
- SET_RasterPos2f(exec, _mesa_RasterPos2f);
- SET_RasterPos2fv(exec, _mesa_RasterPos2fv);
- SET_RasterPos2i(exec, _mesa_RasterPos2i);
- SET_RasterPos2iv(exec, _mesa_RasterPos2iv);
- SET_RasterPos2d(exec, _mesa_RasterPos2d);
- SET_RasterPos2dv(exec, _mesa_RasterPos2dv);
- SET_RasterPos2s(exec, _mesa_RasterPos2s);
- SET_RasterPos2sv(exec, _mesa_RasterPos2sv);
- SET_RasterPos3d(exec, _mesa_RasterPos3d);
- SET_RasterPos3dv(exec, _mesa_RasterPos3dv);
- SET_RasterPos3f(exec, _mesa_RasterPos3f);
- SET_RasterPos3fv(exec, _mesa_RasterPos3fv);
- SET_RasterPos3i(exec, _mesa_RasterPos3i);
- SET_RasterPos3iv(exec, _mesa_RasterPos3iv);
- SET_RasterPos3s(exec, _mesa_RasterPos3s);
- SET_RasterPos3sv(exec, _mesa_RasterPos3sv);
- SET_RasterPos4d(exec, _mesa_RasterPos4d);
- SET_RasterPos4dv(exec, _mesa_RasterPos4dv);
- SET_RasterPos4f(exec, _mesa_RasterPos4f);
- SET_RasterPos4fv(exec, _mesa_RasterPos4fv);
- SET_RasterPos4i(exec, _mesa_RasterPos4i);
- SET_RasterPos4iv(exec, _mesa_RasterPos4iv);
- SET_RasterPos4s(exec, _mesa_RasterPos4s);
- SET_RasterPos4sv(exec, _mesa_RasterPos4sv);
-#endif
+
+ _mesa_init_attrib_dispatch(exec);
+ _mesa_init_rastpos_dispatch(exec);
+
SET_ReadPixels(exec, _mesa_ReadPixels);
SET_Rotated(exec, _mesa_Rotated);
SET_Scaled(exec, _mesa_Scaled);
@@ -339,17 +248,7 @@ _mesa_init_exec_table(struct _glapi_table *exec)
SET_TexEnvf(exec, _mesa_TexEnvf);
SET_TexEnviv(exec, _mesa_TexEnviv);
-#if FEATURE_texgen
- SET_GetTexGendv(exec, _mesa_GetTexGendv);
- SET_GetTexGenfv(exec, _mesa_GetTexGenfv);
- SET_GetTexGeniv(exec, _mesa_GetTexGeniv);
- SET_TexGend(exec, _mesa_TexGend);
- SET_TexGendv(exec, _mesa_TexGendv);
- SET_TexGenf(exec, _mesa_TexGenf);
- SET_TexGenfv(exec, _mesa_TexGenfv);
- SET_TexGeni(exec, _mesa_TexGeni);
- SET_TexGeniv(exec, _mesa_TexGeniv);
-#endif
+ _mesa_init_texgen_dispatch(exec);
SET_TexImage1D(exec, _mesa_TexImage1D);
SET_TexParameterf(exec, _mesa_TexParameterf);
@@ -395,45 +294,9 @@ _mesa_init_exec_table(struct _glapi_table *exec)
SET_BlendEquation(exec, _mesa_BlendEquation);
SET_BlendEquationSeparateEXT(exec, _mesa_BlendEquationSeparateEXT);
-#if FEATURE_colortable
- SET_ColorSubTable(exec, _mesa_ColorSubTable);
- SET_ColorTable(exec, _mesa_ColorTable);
- SET_ColorTableParameterfv(exec, _mesa_ColorTableParameterfv);
- SET_ColorTableParameteriv(exec, _mesa_ColorTableParameteriv);
- SET_CopyColorSubTable(exec, _mesa_CopyColorSubTable);
- SET_CopyColorTable(exec, _mesa_CopyColorTable);
- SET_GetColorTable(exec, _mesa_GetColorTable);
- SET_GetColorTableParameterfv(exec, _mesa_GetColorTableParameterfv);
- SET_GetColorTableParameteriv(exec, _mesa_GetColorTableParameteriv);
-#endif
-
-#if FEATURE_convolve
- SET_ConvolutionFilter1D(exec, _mesa_ConvolutionFilter1D);
- SET_ConvolutionFilter2D(exec, _mesa_ConvolutionFilter2D);
- SET_ConvolutionParameterf(exec, _mesa_ConvolutionParameterf);
- SET_ConvolutionParameterfv(exec, _mesa_ConvolutionParameterfv);
- SET_ConvolutionParameteri(exec, _mesa_ConvolutionParameteri);
- SET_ConvolutionParameteriv(exec, _mesa_ConvolutionParameteriv);
- SET_CopyConvolutionFilter1D(exec, _mesa_CopyConvolutionFilter1D);
- SET_CopyConvolutionFilter2D(exec, _mesa_CopyConvolutionFilter2D);
- SET_GetConvolutionFilter(exec, _mesa_GetConvolutionFilter);
- SET_GetConvolutionParameterfv(exec, _mesa_GetConvolutionParameterfv);
- SET_GetConvolutionParameteriv(exec, _mesa_GetConvolutionParameteriv);
- SET_SeparableFilter2D(exec, _mesa_SeparableFilter2D);
-#endif
-#if FEATURE_histogram
- SET_GetHistogram(exec, _mesa_GetHistogram);
- SET_GetHistogramParameterfv(exec, _mesa_GetHistogramParameterfv);
- SET_GetHistogramParameteriv(exec, _mesa_GetHistogramParameteriv);
- SET_GetMinmax(exec, _mesa_GetMinmax);
- SET_GetMinmaxParameterfv(exec, _mesa_GetMinmaxParameterfv);
- SET_GetMinmaxParameteriv(exec, _mesa_GetMinmaxParameteriv);
- SET_GetSeparableFilter(exec, _mesa_GetSeparableFilter);
- SET_Histogram(exec, _mesa_Histogram);
- SET_Minmax(exec, _mesa_Minmax);
- SET_ResetHistogram(exec, _mesa_ResetHistogram);
- SET_ResetMinmax(exec, _mesa_ResetMinmax);
-#endif
+ _mesa_init_colortable_dispatch(exec);
+ _mesa_init_convolve_dispatch(exec);
+ _mesa_init_histogram_dispatch(exec);
/* OpenGL 2.0 */
SET_StencilFuncSeparate(exec, _mesa_StencilFuncSeparate);
@@ -545,32 +408,7 @@ _mesa_init_exec_table(struct _glapi_table *exec)
#endif
/* 197. GL_MESA_window_pos */
-#if FEATURE_drawpix
- SET_WindowPos2dMESA(exec, _mesa_WindowPos2dMESA);
- SET_WindowPos2dvMESA(exec, _mesa_WindowPos2dvMESA);
- SET_WindowPos2fMESA(exec, _mesa_WindowPos2fMESA);
- SET_WindowPos2fvMESA(exec, _mesa_WindowPos2fvMESA);
- SET_WindowPos2iMESA(exec, _mesa_WindowPos2iMESA);
- SET_WindowPos2ivMESA(exec, _mesa_WindowPos2ivMESA);
- SET_WindowPos2sMESA(exec, _mesa_WindowPos2sMESA);
- SET_WindowPos2svMESA(exec, _mesa_WindowPos2svMESA);
- SET_WindowPos3dMESA(exec, _mesa_WindowPos3dMESA);
- SET_WindowPos3dvMESA(exec, _mesa_WindowPos3dvMESA);
- SET_WindowPos3fMESA(exec, _mesa_WindowPos3fMESA);
- SET_WindowPos3fvMESA(exec, _mesa_WindowPos3fvMESA);
- SET_WindowPos3iMESA(exec, _mesa_WindowPos3iMESA);
- SET_WindowPos3ivMESA(exec, _mesa_WindowPos3ivMESA);
- SET_WindowPos3sMESA(exec, _mesa_WindowPos3sMESA);
- SET_WindowPos3svMESA(exec, _mesa_WindowPos3svMESA);
- SET_WindowPos4dMESA(exec, _mesa_WindowPos4dMESA);
- SET_WindowPos4dvMESA(exec, _mesa_WindowPos4dvMESA);
- SET_WindowPos4fMESA(exec, _mesa_WindowPos4fMESA);
- SET_WindowPos4fvMESA(exec, _mesa_WindowPos4fvMESA);
- SET_WindowPos4iMESA(exec, _mesa_WindowPos4iMESA);
- SET_WindowPos4ivMESA(exec, _mesa_WindowPos4ivMESA);
- SET_WindowPos4sMESA(exec, _mesa_WindowPos4sMESA);
- SET_WindowPos4svMESA(exec, _mesa_WindowPos4svMESA);
-#endif
+ /* part of _mesa_init_rastpos_dispatch(exec); */
/* 200. GL_IBM_multimode_draw_arrays */
#if _HAVE_FULL_GL
@@ -762,16 +600,7 @@ _mesa_init_exec_table(struct _glapi_table *exec)
#endif
/* ARB 29. GL_ARB_occlusion_query */
-#if FEATURE_ARB_occlusion_query
- SET_GenQueriesARB(exec, _mesa_GenQueriesARB);
- SET_DeleteQueriesARB(exec, _mesa_DeleteQueriesARB);
- SET_IsQueryARB(exec, _mesa_IsQueryARB);
- SET_BeginQueryARB(exec, _mesa_BeginQueryARB);
- SET_EndQueryARB(exec, _mesa_EndQueryARB);
- SET_GetQueryivARB(exec, _mesa_GetQueryivARB);
- SET_GetQueryObjectivARB(exec, _mesa_GetQueryObjectivARB);
- SET_GetQueryObjectuivARB(exec, _mesa_GetQueryObjectuivARB);
-#endif
+ _mesa_init_queryobj_dispatch(exec);
/* ARB 37. GL_ARB_draw_buffers */
#if FEATURE_draw_read_buffer
@@ -881,11 +710,6 @@ _mesa_init_exec_table(struct _glapi_table *exec)
SET_GenerateMipmapEXT(exec, _mesa_GenerateMipmapEXT);
#endif
-#if FEATURE_EXT_timer_query
- SET_GetQueryObjecti64vEXT(exec, _mesa_GetQueryObjecti64vEXT);
- SET_GetQueryObjectui64vEXT(exec, _mesa_GetQueryObjectui64vEXT);
-#endif
-
#if FEATURE_EXT_framebuffer_blit
SET_BlitFramebufferEXT(exec, _mesa_BlitFramebufferEXT);
#endif
diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c
index 0e3f5ff957..3d466ac44a 100644
--- a/src/mesa/main/api_loopback.c
+++ b/src/mesa/main/api_loopback.c
@@ -77,6 +77,10 @@
#define FOGCOORDF(x) CALL_FogCoordfEXT(GET_DISPATCH(), (x))
#define SECONDARYCOLORF(a,b,c) CALL_SecondaryColor3fEXT(GET_DISPATCH(), (a,b,c))
+
+#if FEATURE_beginend
+
+
static void GLAPIENTRY
loopback_Color3b_f( GLbyte red, GLbyte green, GLbyte blue )
{
@@ -1655,3 +1659,6 @@ _mesa_loopback_init_api_table( struct _glapi_table *dest )
SET_VertexAttrib4NusvARB(dest, loopback_VertexAttrib4NusvARB);
SET_VertexAttrib4NuivARB(dest, loopback_VertexAttrib4NuivARB);
}
+
+
+#endif /* FEATURE_beginend */
diff --git a/src/mesa/main/api_loopback.h b/src/mesa/main/api_loopback.h
index 6f85bbc1d9..3140eb515e 100644
--- a/src/mesa/main/api_loopback.h
+++ b/src/mesa/main/api_loopback.h
@@ -27,11 +27,19 @@
#ifndef API_LOOPBACK_H
#define API_LOOPBACK_H
-#include "glheader.h"
+#include "main/mtypes.h"
-
-struct _glapi_table;
+#if FEATURE_beginend
extern void _mesa_loopback_init_api_table( struct _glapi_table *dest );
-#endif
+#else /* FEATURE_beginend */
+
+static INLINE void
+_mesa_loopback_init_api_table( struct _glapi_table *dest )
+{
+}
+
+#endif /* FEATURE_beginend */
+
+#endif /* API_LOOPBACK_H */
diff --git a/src/mesa/main/api_noop.c b/src/mesa/main/api_noop.c
index 09ba7e5062..f72f957300 100644
--- a/src/mesa/main/api_noop.c
+++ b/src/mesa/main/api_noop.c
@@ -30,9 +30,8 @@
#include "context.h"
#include "light.h"
#include "macros.h"
-#if FEATURE_dlist
#include "dlist.h"
-#endif
+#include "eval.h"
#include "glapi/dispatch.h"
@@ -44,6 +43,9 @@
*/
+#if FEATURE_beginend
+
+
static void GLAPIENTRY _mesa_noop_EdgeFlag( GLboolean b )
{
GET_CURRENT_CONTEXT(ctx);
@@ -731,7 +733,7 @@ _mesa_noop_DrawElements(GLenum mode, GLsizei count, GLenum type,
GET_CURRENT_CONTEXT(ctx);
GLint i;
- if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices ))
+ if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices, 0 ))
return;
CALL_Begin(GET_DISPATCH(), (mode));
@@ -757,6 +759,43 @@ _mesa_noop_DrawElements(GLenum mode, GLsizei count, GLenum type,
CALL_End(GET_DISPATCH(), ());
}
+static void GLAPIENTRY
+_mesa_noop_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type,
+ const GLvoid *indices, GLint basevertex)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLint i;
+
+ if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices,
+ basevertex ))
+ return;
+
+ CALL_Begin(GET_DISPATCH(), (mode));
+
+ switch (type) {
+ case GL_UNSIGNED_BYTE:
+ for (i = 0 ; i < count ; i++)
+ CALL_ArrayElement(GET_DISPATCH(), ( ((GLubyte *)indices)[i] +
+ basevertex));
+ break;
+ case GL_UNSIGNED_SHORT:
+ for (i = 0 ; i < count ; i++)
+ CALL_ArrayElement(GET_DISPATCH(), ( ((GLushort *)indices)[i] +
+ basevertex ));
+ break;
+ case GL_UNSIGNED_INT:
+ for (i = 0 ; i < count ; i++)
+ CALL_ArrayElement(GET_DISPATCH(), ( ((GLuint *)indices)[i] +
+ basevertex ));
+ break;
+ default:
+ _mesa_error( ctx, GL_INVALID_ENUM, "glDrawElementsBaseVertex(type)" );
+ break;
+ }
+
+ CALL_End(GET_DISPATCH(), ());
+}
+
static void GLAPIENTRY
_mesa_noop_DrawRangeElements(GLenum mode,
@@ -768,7 +807,7 @@ _mesa_noop_DrawRangeElements(GLenum mode,
if (_mesa_validate_DrawRangeElements( ctx, mode,
start, end,
- count, type, indices ))
+ count, type, indices, 0 ))
CALL_DrawElements(GET_DISPATCH(), (mode, count, type, indices));
}
@@ -786,6 +825,40 @@ _mesa_noop_MultiDrawElements(GLenum mode, const GLsizei *count, GLenum type,
}
}
+static void GLAPIENTRY
+_mesa_noop_DrawRangeElementsBaseVertex(GLenum mode,
+ GLuint start, GLuint end,
+ GLsizei count, GLenum type,
+ const GLvoid *indices, GLint basevertex)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if (_mesa_validate_DrawRangeElements( ctx, mode,
+ start, end,
+ count, type, indices, basevertex ))
+ CALL_DrawElementsBaseVertex(GET_DISPATCH(), (mode, count, type, indices,
+ basevertex));
+}
+
+/* GL_EXT_multi_draw_arrays */
+void GLAPIENTRY
+_mesa_noop_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count,
+ GLenum type,
+ const GLvoid **indices,
+ GLsizei primcount,
+ const GLint *basevertex)
+{
+ GLsizei i;
+
+ for (i = 0; i < primcount; i++) {
+ if (count[i] > 0) {
+ CALL_DrawElementsBaseVertex(GET_DISPATCH(), (mode, count[i], type,
+ indices[i],
+ basevertex[i]));
+ }
+ }
+}
+
/*
* Eval Mesh
*/
@@ -921,26 +994,21 @@ _mesa_noop_EvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 )
void
_mesa_noop_vtxfmt_init( GLvertexformat *vfmt )
{
- vfmt->ArrayElement = _ae_loopback_array_elt; /* generic helper */
+ _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_);
+
vfmt->Begin = _mesa_noop_Begin;
-#if FEATURE_dlist
- vfmt->CallList = _mesa_CallList;
- vfmt->CallLists = _mesa_CallLists;
-#endif
+
+ _MESA_INIT_DLIST_VTXFMT(vfmt, _mesa_);
+
vfmt->Color3f = _mesa_noop_Color3f;
vfmt->Color3fv = _mesa_noop_Color3fv;
vfmt->Color4f = _mesa_noop_Color4f;
vfmt->Color4fv = _mesa_noop_Color4fv;
vfmt->EdgeFlag = _mesa_noop_EdgeFlag;
vfmt->End = _mesa_noop_End;
-#if FEATURE_evaluators
- vfmt->EvalCoord1f = _mesa_noop_EvalCoord1f;
- vfmt->EvalCoord1fv = _mesa_noop_EvalCoord1fv;
- vfmt->EvalCoord2f = _mesa_noop_EvalCoord2f;
- vfmt->EvalCoord2fv = _mesa_noop_EvalCoord2fv;
- vfmt->EvalPoint1 = _mesa_noop_EvalPoint1;
- vfmt->EvalPoint2 = _mesa_noop_EvalPoint2;
-#endif
+
+ _MESA_INIT_EVAL_VTXFMT(vfmt, _mesa_noop_);
+
vfmt->FogCoordfEXT = _mesa_noop_FogCoordfEXT;
vfmt->FogCoordfvEXT = _mesa_noop_FogCoordfvEXT;
vfmt->Indexf = _mesa_noop_Indexf;
@@ -995,6 +1063,10 @@ _mesa_noop_vtxfmt_init( GLvertexformat *vfmt )
vfmt->DrawElements = _mesa_noop_DrawElements;
vfmt->DrawRangeElements = _mesa_noop_DrawRangeElements;
vfmt->MultiDrawElementsEXT = _mesa_noop_MultiDrawElements;
- vfmt->EvalMesh1 = _mesa_noop_EvalMesh1;
- vfmt->EvalMesh2 = _mesa_noop_EvalMesh2;
+ vfmt->DrawElementsBaseVertex = _mesa_noop_DrawElementsBaseVertex;
+ vfmt->DrawRangeElementsBaseVertex = _mesa_noop_DrawRangeElementsBaseVertex;
+ vfmt->MultiDrawElementsBaseVertex = _mesa_noop_MultiDrawElementsBaseVertex;
}
+
+
+#endif /* FEATURE_beginend */
diff --git a/src/mesa/main/api_noop.h b/src/mesa/main/api_noop.h
index a7956d00b3..e7fd49bafb 100644
--- a/src/mesa/main/api_noop.h
+++ b/src/mesa/main/api_noop.h
@@ -25,8 +25,9 @@
#ifndef _API_NOOP_H
#define _API_NOOP_H
-#include "mtypes.h"
-#include "context.h"
+#include "main/mtypes.h"
+
+#if FEATURE_beginend
extern void GLAPIENTRY
_mesa_noop_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
@@ -44,7 +45,16 @@ extern void GLAPIENTRY
_mesa_noop_MultiDrawElements(GLenum mode, const GLsizei *count, GLenum type,
const GLvoid **indices, GLsizei primcount);
+extern void GLAPIENTRY
+_mesa_noop_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count,
+ GLenum type,
+ const GLvoid **indices,
+ GLsizei primcount,
+ const GLint *basevertex);
+
extern void
_mesa_noop_vtxfmt_init(GLvertexformat *vfmt);
-#endif
+#endif /* FEATURE_beginend */
+
+#endif /* _API_NOOP_H */
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 507e21fe81..e71e5a6ce8 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -29,7 +29,7 @@
#include "imports.h"
#include "mtypes.h"
#include "state.h"
-
+#include "vbo/vbo.h"
/**
@@ -124,6 +124,40 @@ check_valid_to_render(GLcontext *ctx, const char *function)
return GL_TRUE;
}
+static GLboolean
+check_index_bounds(GLcontext *ctx, GLsizei count, GLenum type,
+ const GLvoid *indices, GLint basevertex)
+{
+ struct _mesa_prim prim;
+ struct _mesa_index_buffer ib;
+ GLuint min, max;
+
+ /* Only the X Server needs to do this -- otherwise, accessing outside
+ * array/BO bounds allows application termination.
+ */
+ if (!ctx->Const.CheckArrayBounds)
+ return GL_TRUE;
+
+ memset(&prim, 0, sizeof(prim));
+ prim.count = count;
+
+ memset(&ib, 0, sizeof(ib));
+ ib.type = type;
+ ib.ptr = indices;
+ ib.obj = ctx->Array.ElementArrayBufferObj;
+
+ vbo_get_minmax_index(ctx, &prim, &ib, &min, &max);
+
+ if (min + basevertex < 0 ||
+ max + basevertex > ctx->Array.ArrayObj->_MaxElement) {
+ /* the max element is out of bounds of one or more enabled arrays */
+ _mesa_warning(ctx, "glDrawElements() index=%u is "
+ "out of bounds (max=%u)", max, ctx->Array.ArrayObj->_MaxElement);
+ return GL_FALSE;
+ }
+
+ return GL_TRUE;
+}
/**
* Error checking for glDrawElements(). Includes parameter checking
@@ -133,7 +167,7 @@ check_valid_to_render(GLcontext *ctx, const char *function)
GLboolean
_mesa_validate_DrawElements(GLcontext *ctx,
GLenum mode, GLsizei count, GLenum type,
- const GLvoid *indices)
+ const GLvoid *indices, GLint basevertex)
{
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
@@ -177,17 +211,8 @@ _mesa_validate_DrawElements(GLcontext *ctx,
return GL_FALSE;
}
- if (ctx->Const.CheckArrayBounds) {
- /* find max array index */
- GLuint max = _mesa_max_buffer_index(ctx, count, type, indices,
- ctx->Array.ElementArrayBufferObj);
- if (max >= ctx->Array.ArrayObj->_MaxElement) {
- /* the max element is out of bounds of one or more enabled arrays */
- _mesa_warning(ctx, "glDrawElements() index=%u is "
- "out of bounds (max=%u)", max, ctx->Array.ArrayObj->_MaxElement);
- return GL_FALSE;
- }
- }
+ if (!check_index_bounds(ctx, count, type, indices, basevertex))
+ return GL_FALSE;
return GL_TRUE;
}
@@ -202,7 +227,7 @@ GLboolean
_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
GLuint start, GLuint end,
GLsizei count, GLenum type,
- const GLvoid *indices)
+ const GLvoid *indices, GLint basevertex)
{
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
@@ -250,14 +275,8 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
return GL_FALSE;
}
- if (ctx->Const.CheckArrayBounds) {
- GLuint max = _mesa_max_buffer_index(ctx, count, type, indices,
- ctx->Array.ElementArrayBufferObj);
- if (max >= ctx->Array.ArrayObj->_MaxElement) {
- /* the max element is out of bounds of one or more enabled arrays */
- return GL_FALSE;
- }
- }
+ if (!check_index_bounds(ctx, count, type, indices, basevertex))
+ return GL_FALSE;
return GL_TRUE;
}
diff --git a/src/mesa/main/api_validate.h b/src/mesa/main/api_validate.h
index ff82a2966c..6064d15fe6 100644
--- a/src/mesa/main/api_validate.h
+++ b/src/mesa/main/api_validate.h
@@ -43,13 +43,13 @@ _mesa_validate_DrawArrays(GLcontext *ctx,
extern GLboolean
_mesa_validate_DrawElements(GLcontext *ctx,
GLenum mode, GLsizei count, GLenum type,
- const GLvoid *indices);
+ const GLvoid *indices, GLint basevertex);
extern GLboolean
_mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
GLuint start, GLuint end,
GLsizei count, GLenum type,
- const GLvoid *indices);
+ const GLvoid *indices, GLint basevertex);
#endif
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index ab99ca1c64..246c5521b7 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -57,6 +57,7 @@
#include "varray.h"
#include "viewport.h"
#include "mtypes.h"
+#include "glapi/dispatch.h"
/**
@@ -74,6 +75,7 @@ struct gl_enable_attrib
GLboolean Convolution2D;
GLboolean Separable2D;
GLboolean CullFace;
+ GLboolean DepthClamp;
GLboolean DepthTest;
GLboolean Dither;
GLboolean Fog;
@@ -173,6 +175,9 @@ struct texture_state
};
+#if FEATURE_attrib_stack
+
+
/**
* Allocate new attribute node of given type/kind. Attach payload data.
* Insert it into the linked list named by 'head'.
@@ -265,6 +270,7 @@ _mesa_PushAttrib(GLbitfield mask)
attr->Convolution2D = ctx->Pixel.Convolution2DEnabled;
attr->Separable2D = ctx->Pixel.Separable2DEnabled;
attr->CullFace = ctx->Polygon.CullFlag;
+ attr->DepthClamp = ctx->Transform.DepthClamp;
attr->DepthTest = ctx->Depth.Test;
attr->Dither = ctx->Color.DitherFlag;
attr->Fog = ctx->Fog.Enabled;
@@ -514,6 +520,8 @@ pop_enable_group(GLcontext *ctx, const struct gl_enable_attrib *enable)
enable->ColorTable[COLORTABLE_POSTCOLORMATRIX],
GL_POST_COLOR_MATRIX_COLOR_TABLE);
TEST_AND_UPDATE(ctx->Polygon.CullFlag, enable->CullFace, GL_CULL_FACE);
+ TEST_AND_UPDATE(ctx->Transform.DepthClamp, enable->DepthClamp,
+ GL_DEPTH_CLAMP);
TEST_AND_UPDATE(ctx->Depth.Test, enable->DepthTest, GL_DEPTH_TEST);
TEST_AND_UPDATE(ctx->Color.DitherFlag, enable->Dither, GL_DITHER);
TEST_AND_UPDATE(ctx->Pixel.Convolution1DEnabled, enable->Convolution1D,
@@ -1221,6 +1229,9 @@ _mesa_PopAttrib(void)
if (xform->RescaleNormals != ctx->Transform.RescaleNormals)
_mesa_set_enable(ctx, GL_RESCALE_NORMAL_EXT,
ctx->Transform.RescaleNormals);
+ if (xform->DepthClamp != ctx->Transform.DepthClamp)
+ _mesa_set_enable(ctx, GL_DEPTH_CLAMP,
+ ctx->Transform.DepthClamp);
}
break;
case GL_TEXTURE_BIT:
@@ -1457,6 +1468,19 @@ _mesa_PopClientAttrib(void)
}
+void
+_mesa_init_attrib_dispatch(struct _glapi_table *disp)
+{
+ SET_PopAttrib(disp, _mesa_PopAttrib);
+ SET_PushAttrib(disp, _mesa_PushAttrib);
+ SET_PopClientAttrib(disp, _mesa_PopClientAttrib);
+ SET_PushClientAttrib(disp, _mesa_PushClientAttrib);
+}
+
+
+#endif /* FEATURE_attrib_stack */
+
+
/**
* Free any attribute state data that might be attached to the context.
*/
diff --git a/src/mesa/main/attrib.h b/src/mesa/main/attrib.h
index 2cf8fe6934..6b48a17663 100644
--- a/src/mesa/main/attrib.h
+++ b/src/mesa/main/attrib.h
@@ -26,10 +26,10 @@
#define ATTRIB_H
-#include "mtypes.h"
+#include "main/mtypes.h"
-#if _HAVE_FULL_GL
+#if FEATURE_attrib_stack
extern void GLAPIENTRY
_mesa_PushAttrib( GLbitfield mask );
@@ -43,18 +43,34 @@ _mesa_PushClientAttrib( GLbitfield mask );
extern void GLAPIENTRY
_mesa_PopClientAttrib( void );
+extern void
+_mesa_init_attrib_dispatch(struct _glapi_table *disp);
+
+#else /* FEATURE_attrib_stack */
+
+static INLINE void
+_mesa_PushClientAttrib( GLbitfield mask )
+{
+ ASSERT_NO_FEATURE();
+}
+
+static INLINE void
+_mesa_PopClientAttrib( void )
+{
+ ASSERT_NO_FEATURE();
+}
+
+static INLINE void
+_mesa_init_attrib_dispatch(struct _glapi_table *disp)
+{
+}
+
+#endif /* FEATURE_attrib_stack */
+
extern void
_mesa_init_attrib( GLcontext *ctx );
extern void
_mesa_free_attrib_data( GLcontext *ctx );
-#else
-
-/** No-op */
-#define _mesa_init_attrib( c ) ((void)0)
-#define _mesa_free_attrib_data( c ) ((void)0)
-
-#endif
-
-#endif
+#endif /* ATTRIB_H */
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index 39cf6153e2..830e3b2e51 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 189b5e1655..52c4995b0a 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 d8b5f3b1f4..e76cf87cb0 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,36 +376,57 @@ _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;
+ GLuint count = 0, destMask0 = destMask[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++;
+ //fb->_ColorDrawBufferIndexes[0] = -1;
+ 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;
+ buf++;
+ }
fb->ColorDrawBuffer[buf] = GL_NONE;
- buf++;
}
fb->_NumColorDrawBuffers = count;
}
@@ -413,11 +435,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 815624ee50..7ae781ae23 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)
diff --git a/src/mesa/main/colortab.c b/src/mesa/main/colortab.c
index 5a7de5f209..5ede76c1fb 100644
--- a/src/mesa/main/colortab.c
+++ b/src/mesa/main/colortab.c
@@ -31,6 +31,11 @@
#include "macros.h"
#include "state.h"
#include "teximage.h"
+#include "texstate.h"
+#include "glapi/dispatch.h"
+
+
+#if FEATURE_colortable
/**
@@ -278,7 +283,7 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
static const GLfloat one[4] = { 1.0, 1.0, 1.0, 1.0 };
static const GLfloat zero[4] = { 0.0, 0.0, 0.0, 0.0 };
GET_CURRENT_CONTEXT(ctx);
- struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
struct gl_texture_object *texObj = NULL;
struct gl_color_table *table = NULL;
GLboolean proxy = GL_FALSE;
@@ -443,7 +448,7 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
static const GLfloat one[4] = { 1.0, 1.0, 1.0, 1.0 };
static const GLfloat zero[4] = { 0.0, 0.0, 0.0, 0.0 };
GET_CURRENT_CONTEXT(ctx);
- struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
struct gl_texture_object *texObj = NULL;
struct gl_color_table *table = NULL;
const GLfloat *scale = one, *bias = zero;
@@ -535,37 +540,44 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_CopyColorTable(GLenum target, GLenum internalformat,
GLint x, GLint y, GLsizei width)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
- /* Select buffer to read from */
+ if (!ctx->ReadBuffer->_ColorReadBuffer) {
+ return; /* no readbuffer - OK */
+ }
+
ctx->Driver.CopyColorTable( ctx, target, internalformat, x, y, width );
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_CopyColorSubTable(GLenum target, GLsizei start,
GLint x, GLint y, GLsizei width)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ if (!ctx->ReadBuffer->_ColorReadBuffer) {
+ return; /* no readbuffer - OK */
+ }
+
ctx->Driver.CopyColorSubTable( ctx, target, start, x, y, width );
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetColorTable( GLenum target, GLenum format,
GLenum type, GLvoid *data )
{
GET_CURRENT_CONTEXT(ctx);
- struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
struct gl_color_table *table = NULL;
GLfloat rgba[MAX_COLOR_TABLE_SIZE][4];
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
@@ -694,7 +706,7 @@ _mesa_GetColorTable( GLenum target, GLenum format,
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
{
GLfloat *scale, *bias;
@@ -739,7 +751,7 @@ _mesa_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
{
GLfloat fparams[4];
@@ -762,11 +774,11 @@ _mesa_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params )
{
GET_CURRENT_CONTEXT(ctx);
- struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
struct gl_color_table *table = NULL;
ASSERT_OUTSIDE_BEGIN_END(ctx);
@@ -889,11 +901,11 @@ _mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params )
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params )
{
GET_CURRENT_CONTEXT(ctx);
- struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
struct gl_color_table *table = NULL;
ASSERT_OUTSIDE_BEGIN_END(ctx);
@@ -1044,6 +1056,25 @@ _mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params )
}
}
+
+void
+_mesa_init_colortable_dispatch(struct _glapi_table *disp)
+{
+ SET_ColorSubTable(disp, _mesa_ColorSubTable);
+ SET_ColorTable(disp, _mesa_ColorTable);
+ SET_ColorTableParameterfv(disp, _mesa_ColorTableParameterfv);
+ SET_ColorTableParameteriv(disp, _mesa_ColorTableParameteriv);
+ SET_CopyColorSubTable(disp, _mesa_CopyColorSubTable);
+ SET_CopyColorTable(disp, _mesa_CopyColorTable);
+ SET_GetColorTable(disp, _mesa_GetColorTable);
+ SET_GetColorTableParameterfv(disp, _mesa_GetColorTableParameterfv);
+ SET_GetColorTableParameteriv(disp, _mesa_GetColorTableParameteriv);
+}
+
+
+#endif /* FEATURE_colortable */
+
+
/**********************************************************************/
/***** Initialization *****/
/**********************************************************************/
diff --git a/src/mesa/main/colortab.h b/src/mesa/main/colortab.h
index b6ff737a65..652fb58246 100644
--- a/src/mesa/main/colortab.h
+++ b/src/mesa/main/colortab.h
@@ -27,9 +27,16 @@
#define COLORTAB_H
-#include "mtypes.h"
+#include "main/mtypes.h"
-#if _HAVE_FULL_GL
+#if FEATURE_colortable
+
+#define _MESA_INIT_COLORTABLE_FUNCTIONS(driver, impl) \
+ do { \
+ (driver)->CopyColorTable = impl ## CopyColorTable; \
+ (driver)->CopyColorSubTable = impl ## CopyColorSubTable; \
+ (driver)->UpdateTexturePalette = impl ## UpdateTexturePalette; \
+ } while (0)
extern void GLAPIENTRY
_mesa_ColorTable( GLenum target, GLenum internalformat,
@@ -41,32 +48,35 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
GLsizei count, GLenum format, GLenum type,
const GLvoid *table );
-extern void GLAPIENTRY
-_mesa_CopyColorSubTable(GLenum target, GLsizei start,
- GLint x, GLint y, GLsizei width);
-
-extern void GLAPIENTRY
-_mesa_CopyColorTable(GLenum target, GLenum internalformat,
- GLint x, GLint y, GLsizei width);
+extern void
+_mesa_init_colortable_dispatch(struct _glapi_table *disp);
-extern void GLAPIENTRY
-_mesa_GetColorTable( GLenum target, GLenum format,
- GLenum type, GLvoid *table );
+#else /* FEATURE_colortable */
-extern void GLAPIENTRY
-_mesa_ColorTableParameterfv(GLenum target, GLenum pname,
- const GLfloat *params);
+#define _MESA_INIT_COLORTABLE_FUNCTIONS(driver, impl) do { } while (0)
-extern void GLAPIENTRY
-_mesa_ColorTableParameteriv(GLenum target, GLenum pname,
- const GLint *params);
+static INLINE void GLAPIENTRY
+_mesa_ColorTable( GLenum target, GLenum internalformat,
+ GLsizei width, GLenum format, GLenum type,
+ const GLvoid *table )
+{
+ ASSERT_NO_FEATURE();
+}
-extern void GLAPIENTRY
-_mesa_GetColorTableParameterfv( GLenum target, GLenum pname, GLfloat *params );
+static INLINE void GLAPIENTRY
+_mesa_ColorSubTable( GLenum target, GLsizei start,
+ GLsizei count, GLenum format, GLenum type,
+ const GLvoid *table )
+{
+ ASSERT_NO_FEATURE();
+}
-extern void GLAPIENTRY
-_mesa_GetColorTableParameteriv( GLenum target, GLenum pname, GLint *params );
+static INLINE void
+_mesa_init_colortable_dispatch(struct _glapi_table *disp)
+{
+}
+#endif /* FEATURE_colortable */
extern void
@@ -81,20 +91,5 @@ _mesa_init_colortables( GLcontext *ctx );
extern void
_mesa_free_colortables_data( GLcontext *ctx );
-#else
-
-/** No-op */
-#define _mesa_init_colortable( p ) ((void) 0)
-
-/** No-op */
-#define _mesa_free_colortable_data( p ) ((void) 0)
-
-/** No-op */
-#define _mesa_init_colortables( p ) ((void)0)
-
-/** No-op */
-#define _mesa_free_colortables_data( p ) ((void)0)
-
-#endif
-#endif
+#endif /* COLORTAB_H */
diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
index 9319505a75..380663ec97 100644
--- a/src/mesa/main/compiler.h
+++ b/src/mesa/main/compiler.h
@@ -107,8 +107,7 @@ extern "C" {
/**
* finite macro.
*/
-#if defined(_WIN32) && !defined(__WIN32__) && !defined(__CYGWIN__) && !defined(BUILD_FOR_SNAP)
-# define __WIN32__
+#if defined(_MSC_VER)
# define finite _finite
#elif defined(__WATCOMC__)
# define finite _finite
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index e844a7432d..101d3c6b67 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -79,42 +79,28 @@
#include "glheader.h"
#include "mfeatures.h"
#include "imports.h"
-#if FEATURE_accum
#include "accum.h"
-#endif
#include "api_exec.h"
#include "arrayobj.h"
-#if FEATURE_attrib_stack
#include "attrib.h"
-#endif
#include "blend.h"
#include "buffers.h"
#include "bufferobj.h"
-#if FEATURE_colortable
#include "colortab.h"
-#endif
#include "context.h"
#include "cpuinfo.h"
#include "debug.h"
#include "depth.h"
-#if FEATURE_dlist
#include "dlist.h"
-#endif
-#if FEATURE_evaluators
#include "eval.h"
-#endif
#include "enums.h"
#include "extensions.h"
#include "fbobject.h"
-#if FEATURE_feedback
#include "feedback.h"
-#endif
#include "fog.h"
#include "framebuffer.h"
#include "get.h"
-#if FEATURE_histogram
#include "histogram.h"
-#endif
#include "hint.h"
#include "hash.h"
#include "light.h"
@@ -126,21 +112,18 @@
#include "pixelstore.h"
#include "points.h"
#include "polygon.h"
-#if FEATURE_ARB_occlusion_query
#include "queryobj.h"
-#endif
#if FEATURE_ARB_sync
#include "syncobj.h"
#endif
-#if FEATURE_drawpix
#include "rastpos.h"
-#endif
+#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"
@@ -150,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"
@@ -191,6 +173,8 @@ GLfloat _mesa_ubyte_to_float_color_tab[256];
void
_mesa_notifySwapBuffers(__GLcontext *ctx)
{
+ if (MESA_VERBOSE & VERBOSE_SWAPBUFFERS)
+ _mesa_debug(ctx, "SwapBuffers\n");
FLUSH_CURRENT( ctx, 0 );
if (ctx->Driver.Flush) {
ctx->Driver.Flush(ctx);
@@ -423,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++) {
@@ -678,36 +664,20 @@ init_attrib_groups(GLcontext *ctx)
_mesa_init_extensions( ctx );
/* Attribute Groups */
-#if FEATURE_accum
_mesa_init_accum( ctx );
-#endif
-#if FEATURE_attrib_stack
_mesa_init_attrib( ctx );
-#endif
_mesa_init_buffer_objects( ctx );
_mesa_init_color( ctx );
-#if FEATURE_colortable
_mesa_init_colortables( ctx );
-#endif
_mesa_init_current( ctx );
_mesa_init_depth( ctx );
_mesa_init_debug( ctx );
-#if FEATURE_dlist
_mesa_init_display_list( ctx );
-#endif
-#if FEATURE_evaluators
_mesa_init_eval( ctx );
-#endif
_mesa_init_fbobjects( ctx );
-#if FEATURE_feedback
_mesa_init_feedback( ctx );
-#else
- ctx->RenderMode = GL_RENDER;
-#endif
_mesa_init_fog( ctx );
-#if FEATURE_histogram
_mesa_init_histogram( ctx );
-#endif
_mesa_init_hint( ctx );
_mesa_init_line( ctx );
_mesa_init_lighting( ctx );
@@ -718,15 +688,11 @@ init_attrib_groups(GLcontext *ctx)
_mesa_init_point( ctx );
_mesa_init_polygon( ctx );
_mesa_init_program( ctx );
-#if FEATURE_ARB_occlusion_query
- _mesa_init_query( ctx );
-#endif
+ _mesa_init_queryobj( ctx );
#if FEATURE_ARB_sync
_mesa_init_sync( ctx );
#endif
-#if FEATURE_drawpix
_mesa_init_rastpos( ctx );
-#endif
_mesa_init_scissor( ctx );
_mesa_init_shader_state( ctx );
_mesa_init_stencil( ctx );
@@ -737,12 +703,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;
@@ -904,10 +865,12 @@ _mesa_initialize_context(GLcontext *ctx,
_mesa_init_exec_table(ctx->Exec);
#endif
ctx->CurrentDispatch = ctx->Exec;
+
#if FEATURE_dlist
- _mesa_init_dlist_table(ctx->Save);
+ _mesa_init_save_table(ctx->Save);
_mesa_install_save_vtxfmt( ctx, &ctx->ListState.ListVtxfmt );
#endif
+
/* Neutral tnl module stuff */
_mesa_init_exec_vtxfmt( ctx );
ctx->TnlModule.Current = NULL;
@@ -1006,24 +969,16 @@ _mesa_free_context_data( GLcontext *ctx )
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL);
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._TexEnvProgram, NULL);
-#if FEATURE_attrib_stack
_mesa_free_attrib_data(ctx);
-#endif
_mesa_free_lighting_data( ctx );
-#if FEATURE_evaluators
_mesa_free_eval_data( ctx );
-#endif
_mesa_free_texture_data( ctx );
_mesa_free_matrix_data( ctx );
_mesa_free_viewport_data( ctx );
-#if FEATURE_colortable
_mesa_free_colortables_data( ctx );
-#endif
_mesa_free_program_data(ctx);
_mesa_free_shader_state(ctx);
-#if FEATURE_ARB_occlusion_query
- _mesa_free_query_data(ctx);
-#endif
+ _mesa_free_queryobj_data(ctx);
#if FEATURE_ARB_sync
_mesa_free_sync_data(ctx);
#endif
@@ -1055,6 +1010,9 @@ _mesa_free_context_data( GLcontext *ctx )
_mesa_free_shared_state( ctx, ctx->Shared );
}
+ /* needs to be after freeing shared state */
+ _mesa_free_display_list_data(ctx);
+
if (ctx->Extensions.String)
_mesa_free((void *) ctx->Extensions.String);
diff --git a/src/mesa/main/convolve.c b/src/mesa/main/convolve.c
index 70951112a1..8db3e79d38 100644
--- a/src/mesa/main/convolve.c
+++ b/src/mesa/main/convolve.c
@@ -40,6 +40,10 @@
#include "mtypes.h"
#include "pixel.h"
#include "state.h"
+#include "glapi/dispatch.h"
+
+
+#if FEATURE_convolve
/*
@@ -256,7 +260,7 @@ _mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, G
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param)
{
GET_CURRENT_CONTEXT(ctx);
@@ -299,7 +303,7 @@ _mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param)
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
@@ -351,7 +355,7 @@ _mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint param)
{
GET_CURRENT_CONTEXT(ctx);
@@ -394,7 +398,7 @@ _mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint param)
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
@@ -459,7 +463,7 @@ _mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width)
{
GLint baseFormat;
@@ -482,12 +486,16 @@ _mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLi
return;
}
+ if (!ctx->ReadBuffer->_ColorReadBuffer) {
+ return; /* no readbuffer - OK */
+ }
+
ctx->Driver.CopyConvolutionFilter1D( ctx, target,
internalFormat, x, y, width);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height)
{
GLint baseFormat;
@@ -514,12 +522,16 @@ _mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLi
return;
}
+ if (!ctx->ReadBuffer->_ColorReadBuffer) {
+ return; /* no readbuffer - OK */
+ }
+
ctx->Driver.CopyConvolutionFilter2D( ctx, target, internalFormat, x, y,
width, height );
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type,
GLvoid *image)
{
@@ -578,7 +590,7 @@ _mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type,
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
@@ -639,7 +651,7 @@ _mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params)
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
@@ -709,7 +721,7 @@ _mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params)
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type,
GLvoid *row, GLvoid *column, GLvoid *span)
{
@@ -776,7 +788,7 @@ _mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type,
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)
{
const GLint colStart = MAX_CONVOLUTION_WIDTH * 4;
@@ -1425,3 +1437,25 @@ _mesa_adjust_image_for_convolution(const GLcontext *ctx, GLuint dimensions,
*height = *height - (MAX2(ctx->Separable2D.Height, 1) - 1);
}
}
+
+
+void
+_mesa_init_convolve_dispatch(struct _glapi_table *disp)
+{
+ SET_ConvolutionFilter1D(disp, _mesa_ConvolutionFilter1D);
+ SET_ConvolutionFilter2D(disp, _mesa_ConvolutionFilter2D);
+ SET_ConvolutionParameterf(disp, _mesa_ConvolutionParameterf);
+ SET_ConvolutionParameterfv(disp, _mesa_ConvolutionParameterfv);
+ SET_ConvolutionParameteri(disp, _mesa_ConvolutionParameteri);
+ SET_ConvolutionParameteriv(disp, _mesa_ConvolutionParameteriv);
+ SET_CopyConvolutionFilter1D(disp, _mesa_CopyConvolutionFilter1D);
+ SET_CopyConvolutionFilter2D(disp, _mesa_CopyConvolutionFilter2D);
+ SET_GetConvolutionFilter(disp, _mesa_GetConvolutionFilter);
+ SET_GetConvolutionParameterfv(disp, _mesa_GetConvolutionParameterfv);
+ SET_GetConvolutionParameteriv(disp, _mesa_GetConvolutionParameteriv);
+ SET_SeparableFilter2D(disp, _mesa_SeparableFilter2D);
+ SET_GetSeparableFilter(disp, _mesa_GetSeparableFilter);
+}
+
+
+#endif /* FEATURE_convolve */
diff --git a/src/mesa/main/convolve.h b/src/mesa/main/convolve.h
index 4505cdae01..59492bc7c5 100644
--- a/src/mesa/main/convolve.h
+++ b/src/mesa/main/convolve.h
@@ -28,10 +28,17 @@
#define CONVOLVE_H
-#include "mtypes.h"
+#include "main/mtypes.h"
-#if _HAVE_FULL_GL
+#if FEATURE_convolve
+
+#define _MESA_INIT_CONVOLVE_FUNCTIONS(driver, impl) \
+ do { \
+ (driver)->CopyConvolutionFilter1D = impl ## CopyConvolutionFilter1D; \
+ (driver)->CopyConvolutionFilter2D = impl ## CopyConvolutionFilter2D; \
+ } while (0)
+
extern void GLAPIENTRY
_mesa_ConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width,
GLenum format, GLenum type, const GLvoid *image);
@@ -41,74 +48,79 @@ _mesa_ConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width,
GLsizei height, GLenum format, GLenum type,
const GLvoid *image);
-extern void GLAPIENTRY
-_mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat params);
-
-extern void GLAPIENTRY
-_mesa_ConvolutionParameterfv(GLenum target, GLenum pname,
- const GLfloat *params);
-
-extern void GLAPIENTRY
-_mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint params);
-
-extern void GLAPIENTRY
-_mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params);
-
-extern void GLAPIENTRY
-_mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalformat,
- GLint x, GLint y, GLsizei width);
+extern void
+_mesa_convolve_1d_image(const GLcontext *ctx, GLsizei *width,
+ const GLfloat *srcImage, GLfloat *dstImage);
-extern void GLAPIENTRY
-_mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalformat,
- GLint x, GLint y, GLsizei width, GLsizei height);
+extern void
+_mesa_convolve_2d_image(const GLcontext *ctx, GLsizei *width, GLsizei *height,
+ const GLfloat *srcImage, GLfloat *dstImage);
-extern void GLAPIENTRY
-_mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type,
- GLvoid *image);
+extern void
+_mesa_convolve_sep_image(const GLcontext *ctx,
+ GLsizei *width, GLsizei *height,
+ const GLfloat *srcImage, GLfloat *dstImage);
-extern void GLAPIENTRY
-_mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params);
+extern void
+_mesa_adjust_image_for_convolution(const GLcontext *ctx, GLuint dimensions,
+ GLsizei *width, GLsizei *height);
-extern void GLAPIENTRY
-_mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params);
+extern void
+_mesa_init_convolve_dispatch(struct _glapi_table *disp);
-extern void GLAPIENTRY
-_mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type,
- GLvoid *row, GLvoid *column, GLvoid *span);
+#else /* FEATURE_convolve */
-extern void GLAPIENTRY
-_mesa_SeparableFilter2D(GLenum target, GLenum internalformat,
- GLsizei width, GLsizei height,
- GLenum format, GLenum type,
- const GLvoid *row, const GLvoid *column);
+#define _MESA_INIT_CONVOLVE_FUNCTIONS(driver, impl) do { } while (0)
+static INLINE void GLAPIENTRY
+_mesa_ConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width,
+ GLenum format, GLenum type, const GLvoid *image)
+{
+ ASSERT_NO_FEATURE();
+}
+static INLINE void GLAPIENTRY
+_mesa_ConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width,
+ GLsizei height, GLenum format, GLenum type,
+ const GLvoid *image)
+{
+ ASSERT_NO_FEATURE();
+}
-extern void
+static INLINE void
_mesa_convolve_1d_image(const GLcontext *ctx, GLsizei *width,
- const GLfloat *srcImage, GLfloat *dstImage);
-
+ const GLfloat *srcImage, GLfloat *dstImage)
+{
+ ASSERT_NO_FEATURE();
+}
-extern void
+static INLINE void
_mesa_convolve_2d_image(const GLcontext *ctx, GLsizei *width, GLsizei *height,
- const GLfloat *srcImage, GLfloat *dstImage);
+ const GLfloat *srcImage, GLfloat *dstImage)
+{
+ ASSERT_NO_FEATURE();
+}
-extern void
+static INLINE void
_mesa_convolve_sep_image(const GLcontext *ctx,
GLsizei *width, GLsizei *height,
- const GLfloat *srcImage, GLfloat *dstImage);
-
+ const GLfloat *srcImage, GLfloat *dstImage)
+{
+ ASSERT_NO_FEATURE();
+}
-extern void
+static INLINE void
_mesa_adjust_image_for_convolution(const GLcontext *ctx, GLuint dimensions,
- GLsizei *width, GLsizei *height);
+ GLsizei *width, GLsizei *height)
+{
+}
+
+static INLINE void
+_mesa_init_convolve_dispatch(struct _glapi_table *disp)
+{
+}
-#else
-#define _mesa_adjust_image_for_convolution(c, d, w, h) ((void)0)
-#define _mesa_convolve_1d_image(c,w,s,d) ((void)0)
-#define _mesa_convolve_2d_image(c,w,h,s,d) ((void)0)
-#define _mesa_convolve_sep_image(c,w,h,s,d) ((void)0)
-#endif
+#endif /* FEATURE_convolve */
-#endif
+#endif /* CONVOLVE_H */
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 4a700b5cb4..99f2cad402 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 );
/*@}*/
/**
@@ -545,12 +538,6 @@ struct dd_function_table {
struct gl_texture_object *t );
/**
- * Called by glPrioritizeTextures().
- */
- void (*PrioritizeTexture)( GLcontext *ctx, struct gl_texture_object *t,
- GLclampf priority );
-
- /**
* Called by glActiveTextureARB() to set current texture unit.
*/
void (*ActiveTexture)( GLcontext *ctx, GLuint texUnitNumber );
@@ -717,7 +704,6 @@ struct dd_function_table {
void (*TexParameter)(GLcontext *ctx, GLenum target,
struct gl_texture_object *texObj,
GLenum pname, const GLfloat *params);
- void (*TextureMatrix)(GLcontext *ctx, GLuint unit, const GLmatrix *mat);
/** Set the viewport */
void (*Viewport)(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h);
/*@}*/
@@ -1172,7 +1158,22 @@ typedef struct {
GLenum type,
const GLvoid **indices,
GLsizei primcount);
- /*@}*/
+ void (GLAPIENTRYP DrawElementsBaseVertex)( GLenum mode, GLsizei count,
+ GLenum type,
+ const GLvoid *indices,
+ GLint basevertex );
+ void (GLAPIENTRYP DrawRangeElementsBaseVertex)( GLenum mode, GLuint start,
+ GLuint end, GLsizei count,
+ GLenum type,
+ const GLvoid *indices,
+ GLint basevertex);
+ void (GLAPIENTRYP MultiDrawElementsBaseVertex)( GLenum mode,
+ const GLsizei *count,
+ GLenum type,
+ const GLvoid **indices,
+ GLsizei primcount,
+ const GLint *basevertex);
+ /*@}*/
/**
* \name Eval
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 8492c8561d..a42113edca 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -27,6 +27,8 @@
#include "attrib.h"
#include "colormac.h"
#include "context.h"
+#include "enums.h"
+#include "formats.h"
#include "hash.h"
#include "imports.h"
#include "debug.h"
@@ -35,7 +37,6 @@
#include "readpix.h"
#include "texgetimage.h"
#include "texobj.h"
-#include "texformat.h"
/**
@@ -57,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 )
{
@@ -167,14 +193,16 @@ static void add_debug_flags( const char *debug )
static const struct debug_option debug_opt[] = {
{ "varray", VERBOSE_VARRAY },
{ "tex", VERBOSE_TEXTURE },
- { "imm", VERBOSE_IMMEDIATE },
+ { "mat", VERBOSE_MATERIAL },
{ "pipe", VERBOSE_PIPELINE },
{ "driver", VERBOSE_DRIVER },
{ "state", VERBOSE_STATE },
{ "api", VERBOSE_API },
{ "list", VERBOSE_DISPLAY_LIST },
{ "lighting", VERBOSE_LIGHTING },
- { "disassem", VERBOSE_DISASSEM }
+ { "disassem", VERBOSE_DISASSEM },
+ { "draw", VERBOSE_DRAW },
+ { "swap", VERBOSE_SWAPBUFFERS }
};
GLuint i;
@@ -262,10 +290,13 @@ write_ppm(const char *filename, const GLubyte *buffer, int width, int height,
/**
- * Write level[0] image to a ppm file.
+ * Write a texture image to a ppm file.
+ * \param face cube face in [0,5]
+ * \param level mipmap level
*/
static void
-write_texture_image(struct gl_texture_object *texObj, GLuint face, GLuint level)
+write_texture_image(struct gl_texture_object *texObj,
+ GLuint face, GLuint level)
{
struct gl_texture_image *img = texObj->Image[face][level];
if (img) {
@@ -285,7 +316,7 @@ write_texture_image(struct gl_texture_object *texObj, GLuint face, GLuint level)
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);
@@ -297,29 +328,76 @@ write_texture_image(struct gl_texture_object *texObj, GLuint face, GLuint level)
}
-static GLboolean DumpImages;
+/**
+ * Write renderbuffer image to a ppm file.
+ */
+static void
+write_renderbuffer_image(const struct gl_renderbuffer *rb)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLubyte *buffer;
+ char s[100];
+ GLenum format, type;
+
+ if (rb->_BaseFormat == GL_RGB ||
+ rb->_BaseFormat == GL_RGBA) {
+ format = GL_RGBA;
+ type = GL_UNSIGNED_BYTE;
+ }
+ else if (rb->_BaseFormat == GL_DEPTH_STENCIL) {
+ format = GL_DEPTH_STENCIL;
+ type = GL_UNSIGNED_INT_24_8;
+ }
+ else {
+ return;
+ }
+
+ buffer = (GLubyte *) _mesa_malloc(rb->Width * rb->Height * 4);
+
+ ctx->Driver.ReadPixels(ctx, 0, 0, rb->Width, rb->Height,
+ format, type, &ctx->DefaultPacking, buffer);
+
+ /* make filename */
+ _mesa_sprintf(s, "/tmp/renderbuffer%u.ppm", rb->Name);
+
+ _mesa_printf(" Writing renderbuffer image to %s\n", s);
+ write_ppm(s, buffer, rb->Width, rb->Height, 4, 0, 1, 2, GL_TRUE);
+
+ _mesa_free(buffer);
+}
+
+
+/** 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_cb(GLuint id, void *data, void *userData)
+dump_texture(struct gl_texture_object *texObj, GLuint writeImages)
{
- struct gl_texture_object *texObj = (struct gl_texture_object *) data;
- int i;
+ const GLuint numFaces = texObj->Target == GL_TEXTURE_CUBE_MAP ? 6 : 1;
GLboolean written = GL_FALSE;
- (void) userData;
+ 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;
+ }
}
}
}
@@ -327,18 +405,76 @@ dump_texture_cb(GLuint id, void *data, void *userData)
/**
+ * Dump a single texture.
+ */
+void
+_mesa_dump_texture(GLuint texture, GLuint writeImages)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_texture_object *texObj = _mesa_lookup_texture(ctx, texture);
+ if (texObj) {
+ dump_texture(texObj, writeImages);
+ }
+}
+
+
+static void
+dump_texture_cb(GLuint id, void *data, void *userData)
+{
+ struct gl_texture_object *texObj = (struct gl_texture_object *) data;
+ (void) userData;
+ dump_texture(texObj, WriteImages);
+}
+
+
+/**
* Print basic info about all texture objext to stdout.
* 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(const struct gl_renderbuffer *rb, GLboolean writeImage)
+{
+ _mesa_printf("Renderbuffer %u: %u x %u IntFormat = %s\n",
+ rb->Name, rb->Width, rb->Height,
+ _mesa_lookup_enum_by_nr(rb->InternalFormat));
+ 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 writeImages)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ WriteImages = writeImages;
+ _mesa_HashWalk(ctx->Shared->RenderBuffers, dump_renderbuffer_cb, ctx);
+}
+
+
+
void
_mesa_dump_color_buffer(const char *filename)
{
@@ -438,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 bb384c4324..0449cb1798 100644
--- a/src/mesa/main/debug.h
+++ b/src/mesa/main/debug.h
@@ -58,7 +58,13 @@ extern void _mesa_init_debug( GLcontext *ctx );
#endif
extern void
-_mesa_dump_textures(GLboolean dumpImages);
+_mesa_dump_texture(GLuint texture, GLuint writeImages);
+
+extern void
+_mesa_dump_textures(GLuint writeImages);
+
+extern void
+_mesa_dump_renderbuffers(GLboolean writeImages);
extern void
_mesa_dump_color_buffer(const char *filename);
@@ -69,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 91c036ef96..f187205b97 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 7be2aacaf2..193c7f8255 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 bf1a013789..97d213e8e1 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/dlist.c b/src/mesa/main/dlist.c
index 41a5b61406..b692c335a7 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -1,8 +1,9 @@
/*
* Mesa 3-D graphics library
- * Version: 7.1
+ * Version: 7.7
*
- * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009 VMware, Inc. 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"),
@@ -73,6 +74,7 @@
#include "texstate.h"
#include "mtypes.h"
#include "varray.h"
+#include "vtxfmt.h"
#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
#include "shader/arbprogram.h"
#include "shader/program.h"
@@ -90,6 +92,33 @@
#include "glapi/dispatch.h"
+
+/**
+ * Other parts of Mesa (such as the VBO module) can plug into the display
+ * list system. This structure describes new display list instructions.
+ */
+struct gl_list_instruction
+{
+ GLuint Size;
+ void (*Execute)( GLcontext *ctx, void *data );
+ void (*Destroy)( GLcontext *ctx, void *data );
+ void (*Print)( GLcontext *ctx, void *data );
+};
+
+
+#define MAX_DLIST_EXT_OPCODES 16
+
+/**
+ * Used by device drivers to hook new commands into display lists.
+ */
+struct gl_list_extensions
+{
+ struct gl_list_instruction Opcode[MAX_DLIST_EXT_OPCODES];
+ GLuint NumOpcodes;
+};
+
+
+
/**
* Flush vertices.
*
@@ -438,6 +467,10 @@ typedef union gl_dlist_node Node;
*/
static GLuint InstSize[OPCODE_END_OF_LIST + 1];
+
+#if FEATURE_dlist
+
+
void mesa_print_display_list(GLuint list);
@@ -472,6 +505,49 @@ lookup_list(GLcontext *ctx, GLuint list)
}
+/** Is the given opcode an extension code? */
+static INLINE GLboolean
+is_ext_opcode(OpCode opcode)
+{
+ return (opcode >= OPCODE_EXT_0);
+}
+
+
+/** Destroy an extended opcode instruction */
+static GLint
+ext_opcode_destroy(GLcontext *ctx, Node *node)
+{
+ const GLint i = node[0].opcode - OPCODE_EXT_0;
+ GLint step;
+ ctx->ListExt->Opcode[i].Destroy(ctx, &node[1]);
+ step = ctx->ListExt->Opcode[i].Size;
+ return step;
+}
+
+
+/** Execute an extended opcode instruction */
+static GLint
+ext_opcode_execute(GLcontext *ctx, Node *node)
+{
+ const GLint i = node[0].opcode - OPCODE_EXT_0;
+ GLint step;
+ ctx->ListExt->Opcode[i].Execute(ctx, &node[1]);
+ step = ctx->ListExt->Opcode[i].Size;
+ return step;
+}
+
+
+/** Print an extended opcode instruction */
+static GLint
+ext_opcode_print(GLcontext *ctx, Node *node)
+{
+ const GLint i = node[0].opcode - OPCODE_EXT_0;
+ GLint step;
+ ctx->ListExt->Opcode[i].Print(ctx, &node[1]);
+ step = ctx->ListExt->Opcode[i].Size;
+ return step;
+}
+
/**
* Delete the named display list, but don't remove from hash table.
@@ -487,16 +563,14 @@ _mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist)
done = block ? GL_FALSE : GL_TRUE;
while (!done) {
+ const OpCode opcode = n[0].opcode;
/* check for extension opcodes first */
-
- GLint i = (GLint) n[0].opcode - (GLint) OPCODE_EXT_0;
- if (i >= 0 && i < (GLint) ctx->ListExt.NumOpcodes) {
- ctx->ListExt.Opcode[i].Destroy(ctx, &n[1]);
- n += ctx->ListExt.Opcode[i].Size;
+ if (is_ext_opcode(opcode)) {
+ n += ext_opcode_destroy(ctx, n);
}
else {
- switch (n[0].opcode) {
+ switch (opcode) {
/* for some commands, we need to free malloc'd memory */
case OPCODE_MAP1:
_mesa_free(n[6].data);
@@ -784,14 +858,13 @@ unpack_image(GLcontext *ctx, GLuint dimensions,
/**
- * Allocate space for a display list instruction.
+ * Allocate space for a display list instruction (opcode + payload space).
* \param opcode the instruction opcode (OPCODE_* value)
- * \param bytes instruction size in bytes, not counting opcode.
- * \return pointer to the usable data area (not including the internal
- * opcode).
+ * \param bytes instruction payload size (not counting opcode)
+ * \return pointer to allocated memory (the opcode space)
*/
-void *
-_mesa_alloc_instruction(GLcontext *ctx, GLuint opcode, GLuint bytes)
+static Node *
+dlist_alloc(GLcontext *ctx, OpCode opcode, GLuint bytes)
{
const GLuint numNodes = 1 + (bytes + sizeof(Node) - 1) / sizeof(Node);
Node *n;
@@ -825,9 +898,30 @@ _mesa_alloc_instruction(GLcontext *ctx, GLuint opcode, GLuint bytes)
n = ctx->ListState.CurrentBlock + ctx->ListState.CurrentPos;
ctx->ListState.CurrentPos += numNodes;
- n[0].opcode = (OpCode) opcode;
+ n[0].opcode = opcode;
- return (void *) (n + 1); /* return ptr to node following opcode */
+ return n;
+}
+
+
+
+/**
+ * Allocate space for a display list instruction. Used by callers outside
+ * this file for things like VBO vertex data.
+ *
+ * \param opcode the instruction opcode (OPCODE_* value)
+ * \param bytes instruction size in bytes, not counting opcode.
+ * \return pointer to the usable data area (not including the internal
+ * opcode).
+ */
+void *
+_mesa_dlist_alloc(GLcontext *ctx, GLuint opcode, GLuint bytes)
+{
+ Node *n = dlist_alloc(ctx, (OpCode) opcode, bytes);
+ if (n)
+ return n + 1; /* return pointer to payload area, after opcode */
+ else
+ return NULL;
}
@@ -842,35 +936,39 @@ _mesa_alloc_instruction(GLcontext *ctx, GLuint opcode, GLuint bytes)
* \return the new opcode number or -1 if error
*/
GLint
-_mesa_alloc_opcode(GLcontext *ctx,
- GLuint size,
- void (*execute) (GLcontext *, void *),
- void (*destroy) (GLcontext *, void *),
- void (*print) (GLcontext *, void *))
-{
- if (ctx->ListExt.NumOpcodes < MAX_DLIST_EXT_OPCODES) {
- const GLuint i = ctx->ListExt.NumOpcodes++;
- ctx->ListExt.Opcode[i].Size =
+_mesa_dlist_alloc_opcode(GLcontext *ctx,
+ GLuint size,
+ void (*execute) (GLcontext *, void *),
+ void (*destroy) (GLcontext *, void *),
+ void (*print) (GLcontext *, void *))
+{
+ if (ctx->ListExt->NumOpcodes < MAX_DLIST_EXT_OPCODES) {
+ const GLuint i = ctx->ListExt->NumOpcodes++;
+ ctx->ListExt->Opcode[i].Size =
1 + (size + sizeof(Node) - 1) / sizeof(Node);
- ctx->ListExt.Opcode[i].Execute = execute;
- ctx->ListExt.Opcode[i].Destroy = destroy;
- ctx->ListExt.Opcode[i].Print = print;
+ ctx->ListExt->Opcode[i].Execute = execute;
+ ctx->ListExt->Opcode[i].Destroy = destroy;
+ ctx->ListExt->Opcode[i].Print = print;
return i + OPCODE_EXT_0;
}
return -1;
}
-
/**
- * Allocate display list instruction. Returns Node ptr to where the opcode
- * is stored.
- * - nParams is the number of function parameters
- * - return value a pointer to sizeof(Node) before the actual
- * usable data area.
+ * Allocate space for a display list instruction. The space is basically
+ * an array of Nodes where node[0] holds the opcode, node[1] is the first
+ * function parameter, node[2] is the second parameter, etc.
+ *
+ * \param opcode one of OPCODE_x
+ * \param nparams number of function parameters
+ * \return pointer to start of instruction space
*/
-#define ALLOC_INSTRUCTION(CTX, OPCODE, NPARAMS) \
- ((Node *)_mesa_alloc_instruction(CTX, OPCODE, (NPARAMS)*sizeof(Node)) - 1)
+static INLINE Node *
+alloc_instruction(GLcontext *ctx, OpCode opcode, GLuint nparams)
+{
+ return dlist_alloc(ctx, opcode, nparams * sizeof(Node));
+}
@@ -883,7 +981,7 @@ save_Accum(GLenum op, GLfloat value)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_ACCUM, 2);
+ n = alloc_instruction(ctx, OPCODE_ACCUM, 2);
if (n) {
n[1].e = op;
n[2].f = value;
@@ -900,7 +998,7 @@ save_AlphaFunc(GLenum func, GLclampf ref)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_ALPHA_FUNC, 2);
+ n = alloc_instruction(ctx, OPCODE_ALPHA_FUNC, 2);
if (n) {
n[1].e = func;
n[2].f = (GLfloat) ref;
@@ -917,7 +1015,7 @@ save_BindTexture(GLenum target, GLuint texture)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_BIND_TEXTURE, 2);
+ n = alloc_instruction(ctx, OPCODE_BIND_TEXTURE, 2);
if (n) {
n[1].e = target;
n[2].ui = texture;
@@ -936,7 +1034,7 @@ save_Bitmap(GLsizei width, GLsizei height,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_BITMAP, 7);
+ n = alloc_instruction(ctx, OPCODE_BITMAP, 7);
if (n) {
n[1].i = (GLint) width;
n[2].i = (GLint) height;
@@ -959,7 +1057,7 @@ save_BlendEquation(GLenum mode)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_BLEND_EQUATION, 1);
+ n = alloc_instruction(ctx, OPCODE_BLEND_EQUATION, 1);
if (n) {
n[1].e = mode;
}
@@ -975,7 +1073,7 @@ save_BlendEquationSeparateEXT(GLenum modeRGB, GLenum modeA)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_BLEND_EQUATION_SEPARATE, 2);
+ n = alloc_instruction(ctx, OPCODE_BLEND_EQUATION_SEPARATE, 2);
if (n) {
n[1].e = modeRGB;
n[2].e = modeA;
@@ -993,7 +1091,7 @@ save_BlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_BLEND_FUNC_SEPARATE, 4);
+ n = alloc_instruction(ctx, OPCODE_BLEND_FUNC_SEPARATE, 4);
if (n) {
n[1].e = sfactorRGB;
n[2].e = dfactorRGB;
@@ -1020,7 +1118,7 @@ save_BlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_BLEND_COLOR, 4);
+ n = alloc_instruction(ctx, OPCODE_BLEND_COLOR, 4);
if (n) {
n[1].f = red;
n[2].f = green;
@@ -1047,14 +1145,14 @@ static void invalidate_saved_current_state( GLcontext *ctx )
ctx->Driver.CurrentSavePrimitive = PRIM_UNKNOWN;
}
-void GLAPIENTRY
-_mesa_save_CallList(GLuint list)
+static void GLAPIENTRY
+save_CallList(GLuint list)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_CALL_LIST, 1);
+ n = alloc_instruction(ctx, OPCODE_CALL_LIST, 1);
if (n) {
n[1].ui = list;
}
@@ -1070,8 +1168,8 @@ _mesa_save_CallList(GLuint list)
}
-void GLAPIENTRY
-_mesa_save_CallLists(GLsizei num, GLenum type, const GLvoid * lists)
+static void GLAPIENTRY
+save_CallLists(GLsizei num, GLenum type, const GLvoid * lists)
{
GET_CURRENT_CONTEXT(ctx);
GLint i;
@@ -1098,7 +1196,7 @@ _mesa_save_CallLists(GLsizei num, GLenum type, const GLvoid * lists)
for (i = 0; i < num; i++) {
GLint list = translate_id(i, type, lists);
- Node *n = ALLOC_INSTRUCTION(ctx, OPCODE_CALL_LIST_OFFSET, 2);
+ Node *n = alloc_instruction(ctx, OPCODE_CALL_LIST_OFFSET, 2);
if (n) {
n[1].i = list;
n[2].b = typeErrorFlag;
@@ -1122,7 +1220,7 @@ save_Clear(GLbitfield mask)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_CLEAR, 1);
+ n = alloc_instruction(ctx, OPCODE_CLEAR, 1);
if (n) {
n[1].bf = mask;
}
@@ -1138,7 +1236,7 @@ save_ClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_CLEAR_ACCUM, 4);
+ n = alloc_instruction(ctx, OPCODE_CLEAR_ACCUM, 4);
if (n) {
n[1].f = red;
n[2].f = green;
@@ -1157,7 +1255,7 @@ save_ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_CLEAR_COLOR, 4);
+ n = alloc_instruction(ctx, OPCODE_CLEAR_COLOR, 4);
if (n) {
n[1].f = red;
n[2].f = green;
@@ -1176,7 +1274,7 @@ save_ClearDepth(GLclampd depth)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_CLEAR_DEPTH, 1);
+ n = alloc_instruction(ctx, OPCODE_CLEAR_DEPTH, 1);
if (n) {
n[1].f = (GLfloat) depth;
}
@@ -1192,7 +1290,7 @@ save_ClearIndex(GLfloat c)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_CLEAR_INDEX, 1);
+ n = alloc_instruction(ctx, OPCODE_CLEAR_INDEX, 1);
if (n) {
n[1].f = c;
}
@@ -1208,7 +1306,7 @@ save_ClearStencil(GLint s)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_CLEAR_STENCIL, 1);
+ n = alloc_instruction(ctx, OPCODE_CLEAR_STENCIL, 1);
if (n) {
n[1].i = s;
}
@@ -1224,7 +1322,7 @@ save_ClipPlane(GLenum plane, const GLdouble * equ)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_CLIP_PLANE, 5);
+ n = alloc_instruction(ctx, OPCODE_CLIP_PLANE, 5);
if (n) {
n[1].e = plane;
n[2].f = (GLfloat) equ[0];
@@ -1246,7 +1344,7 @@ save_ColorMask(GLboolean red, GLboolean green,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_MASK, 4);
+ n = alloc_instruction(ctx, OPCODE_COLOR_MASK, 4);
if (n) {
n[1].b = red;
n[2].b = green;
@@ -1266,7 +1364,7 @@ save_ColorMaterial(GLenum face, GLenum mode)
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_MATERIAL, 2);
+ n = alloc_instruction(ctx, OPCODE_COLOR_MATERIAL, 2);
if (n) {
n[1].e = face;
n[2].e = mode;
@@ -1291,7 +1389,7 @@ save_ColorTable(GLenum target, GLenum internalFormat,
else {
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_TABLE, 6);
+ n = alloc_instruction(ctx, OPCODE_COLOR_TABLE, 6);
if (n) {
n[1].e = target;
n[2].e = internalFormat;
@@ -1319,7 +1417,7 @@ save_ColorTableParameterfv(GLenum target, GLenum pname,
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_TABLE_PARAMETER_FV, 6);
+ n = alloc_instruction(ctx, OPCODE_COLOR_TABLE_PARAMETER_FV, 6);
if (n) {
n[1].e = target;
n[2].e = pname;
@@ -1348,7 +1446,7 @@ save_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_TABLE_PARAMETER_IV, 6);
+ n = alloc_instruction(ctx, OPCODE_COLOR_TABLE_PARAMETER_IV, 6);
if (n) {
n[1].e = target;
n[2].e = pname;
@@ -1377,7 +1475,7 @@ save_ColorSubTable(GLenum target, GLsizei start, GLsizei count,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COLOR_SUB_TABLE, 6);
+ n = alloc_instruction(ctx, OPCODE_COLOR_SUB_TABLE, 6);
if (n) {
n[1].e = target;
n[2].i = start;
@@ -1402,7 +1500,7 @@ save_CopyColorSubTable(GLenum target, GLsizei start,
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_COLOR_SUB_TABLE, 5);
+ n = alloc_instruction(ctx, OPCODE_COPY_COLOR_SUB_TABLE, 5);
if (n) {
n[1].e = target;
n[2].i = start;
@@ -1424,7 +1522,7 @@ save_CopyColorTable(GLenum target, GLenum internalformat,
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_COLOR_TABLE, 5);
+ n = alloc_instruction(ctx, OPCODE_COPY_COLOR_TABLE, 5);
if (n) {
n[1].e = target;
n[2].e = internalformat;
@@ -1447,7 +1545,7 @@ save_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width,
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_FILTER_1D, 6);
+ n = alloc_instruction(ctx, OPCODE_CONVOLUTION_FILTER_1D, 6);
if (n) {
n[1].e = target;
n[2].e = internalFormat;
@@ -1474,7 +1572,7 @@ save_ConvolutionFilter2D(GLenum target, GLenum internalFormat,
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_FILTER_2D, 7);
+ n = alloc_instruction(ctx, OPCODE_CONVOLUTION_FILTER_2D, 7);
if (n) {
n[1].e = target;
n[2].e = internalFormat;
@@ -1499,7 +1597,7 @@ save_ConvolutionParameteri(GLenum target, GLenum pname, GLint param)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_PARAMETER_I, 3);
+ n = alloc_instruction(ctx, OPCODE_CONVOLUTION_PARAMETER_I, 3);
if (n) {
n[1].e = target;
n[2].e = pname;
@@ -1517,7 +1615,7 @@ save_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_PARAMETER_IV, 6);
+ n = alloc_instruction(ctx, OPCODE_CONVOLUTION_PARAMETER_IV, 6);
if (n) {
n[1].e = target;
n[2].e = pname;
@@ -1545,7 +1643,7 @@ save_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_PARAMETER_F, 3);
+ n = alloc_instruction(ctx, OPCODE_CONVOLUTION_PARAMETER_F, 3);
if (n) {
n[1].e = target;
n[2].e = pname;
@@ -1564,7 +1662,7 @@ save_ConvolutionParameterfv(GLenum target, GLenum pname,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_CONVOLUTION_PARAMETER_FV, 6);
+ n = alloc_instruction(ctx, OPCODE_CONVOLUTION_PARAMETER_FV, 6);
if (n) {
n[1].e = target;
n[2].e = pname;
@@ -1592,7 +1690,7 @@ save_CopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_PIXELS, 5);
+ n = alloc_instruction(ctx, OPCODE_COPY_PIXELS, 5);
if (n) {
n[1].i = x;
n[2].i = y;
@@ -1614,7 +1712,7 @@ save_CopyTexImage1D(GLenum target, GLint level, GLenum internalformat,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_TEX_IMAGE1D, 7);
+ n = alloc_instruction(ctx, OPCODE_COPY_TEX_IMAGE1D, 7);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -1640,7 +1738,7 @@ save_CopyTexImage2D(GLenum target, GLint level,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_TEX_IMAGE2D, 8);
+ n = alloc_instruction(ctx, OPCODE_COPY_TEX_IMAGE2D, 8);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -1666,7 +1764,7 @@ save_CopyTexSubImage1D(GLenum target, GLint level,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_TEX_SUB_IMAGE1D, 6);
+ n = alloc_instruction(ctx, OPCODE_COPY_TEX_SUB_IMAGE1D, 6);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -1690,7 +1788,7 @@ save_CopyTexSubImage2D(GLenum target, GLint level,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_TEX_SUB_IMAGE2D, 8);
+ n = alloc_instruction(ctx, OPCODE_COPY_TEX_SUB_IMAGE2D, 8);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -1716,7 +1814,7 @@ save_CopyTexSubImage3D(GLenum target, GLint level,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COPY_TEX_SUB_IMAGE3D, 9);
+ n = alloc_instruction(ctx, OPCODE_COPY_TEX_SUB_IMAGE3D, 9);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -1742,7 +1840,7 @@ save_CullFace(GLenum mode)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_CULL_FACE, 1);
+ n = alloc_instruction(ctx, OPCODE_CULL_FACE, 1);
if (n) {
n[1].e = mode;
}
@@ -1758,7 +1856,7 @@ save_DepthFunc(GLenum func)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_DEPTH_FUNC, 1);
+ n = alloc_instruction(ctx, OPCODE_DEPTH_FUNC, 1);
if (n) {
n[1].e = func;
}
@@ -1774,7 +1872,7 @@ save_DepthMask(GLboolean mask)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_DEPTH_MASK, 1);
+ n = alloc_instruction(ctx, OPCODE_DEPTH_MASK, 1);
if (n) {
n[1].b = mask;
}
@@ -1790,7 +1888,7 @@ save_DepthRange(GLclampd nearval, GLclampd farval)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_DEPTH_RANGE, 2);
+ n = alloc_instruction(ctx, OPCODE_DEPTH_RANGE, 2);
if (n) {
n[1].f = (GLfloat) nearval;
n[2].f = (GLfloat) farval;
@@ -1807,7 +1905,7 @@ save_Disable(GLenum cap)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_DISABLE, 1);
+ n = alloc_instruction(ctx, OPCODE_DISABLE, 1);
if (n) {
n[1].e = cap;
}
@@ -1823,7 +1921,7 @@ save_DrawBuffer(GLenum mode)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_DRAW_BUFFER, 1);
+ n = alloc_instruction(ctx, OPCODE_DRAW_BUFFER, 1);
if (n) {
n[1].e = mode;
}
@@ -1842,7 +1940,7 @@ save_DrawPixels(GLsizei width, GLsizei height,
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_DRAW_PIXELS, 5);
+ n = alloc_instruction(ctx, OPCODE_DRAW_PIXELS, 5);
if (n) {
n[1].i = width;
n[2].i = height;
@@ -1864,7 +1962,7 @@ save_Enable(GLenum cap)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_ENABLE, 1);
+ n = alloc_instruction(ctx, OPCODE_ENABLE, 1);
if (n) {
n[1].e = cap;
}
@@ -1876,12 +1974,12 @@ save_Enable(GLenum cap)
static void GLAPIENTRY
-_mesa_save_EvalMesh1(GLenum mode, GLint i1, GLint i2)
+save_EvalMesh1(GLenum mode, GLint i1, GLint i2)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_EVALMESH1, 3);
+ n = alloc_instruction(ctx, OPCODE_EVALMESH1, 3);
if (n) {
n[1].e = mode;
n[2].i = i1;
@@ -1894,12 +1992,12 @@ _mesa_save_EvalMesh1(GLenum mode, GLint i1, GLint i2)
static void GLAPIENTRY
-_mesa_save_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
+save_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
{
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_EVALMESH2, 5);
+ n = alloc_instruction(ctx, OPCODE_EVALMESH2, 5);
if (n) {
n[1].e = mode;
n[2].i = i1;
@@ -1921,7 +2019,7 @@ save_Fogfv(GLenum pname, const GLfloat *params)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_FOG, 5);
+ n = alloc_instruction(ctx, OPCODE_FOG, 5);
if (n) {
n[1].e = pname;
n[2].f = params[0];
@@ -1990,7 +2088,7 @@ save_FrontFace(GLenum mode)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_FRONT_FACE, 1);
+ n = alloc_instruction(ctx, OPCODE_FRONT_FACE, 1);
if (n) {
n[1].e = mode;
}
@@ -2007,7 +2105,7 @@ save_Frustum(GLdouble left, GLdouble right,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_FRUSTUM, 6);
+ n = alloc_instruction(ctx, OPCODE_FRUSTUM, 6);
if (n) {
n[1].f = (GLfloat) left;
n[2].f = (GLfloat) right;
@@ -2028,7 +2126,7 @@ save_Hint(GLenum target, GLenum mode)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_HINT, 2);
+ n = alloc_instruction(ctx, OPCODE_HINT, 2);
if (n) {
n[1].e = target;
n[2].e = mode;
@@ -2047,7 +2145,7 @@ save_Histogram(GLenum target, GLsizei width, GLenum internalFormat,
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_HISTOGRAM, 4);
+ n = alloc_instruction(ctx, OPCODE_HISTOGRAM, 4);
if (n) {
n[1].e = target;
n[2].i = width;
@@ -2066,7 +2164,7 @@ save_IndexMask(GLuint mask)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_INDEX_MASK, 1);
+ n = alloc_instruction(ctx, OPCODE_INDEX_MASK, 1);
if (n) {
n[1].ui = mask;
}
@@ -2081,7 +2179,7 @@ save_InitNames(void)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- (void) ALLOC_INSTRUCTION(ctx, OPCODE_INIT_NAMES, 0);
+ (void) alloc_instruction(ctx, OPCODE_INIT_NAMES, 0);
if (ctx->ExecuteFlag) {
CALL_InitNames(ctx->Exec, ());
}
@@ -2094,7 +2192,7 @@ save_Lightfv(GLenum light, GLenum pname, const GLfloat *params)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_LIGHT, 6);
+ n = alloc_instruction(ctx, OPCODE_LIGHT, 6);
if (n) {
GLint i, nParams;
n[1].e = light;
@@ -2208,7 +2306,7 @@ save_LightModelfv(GLenum pname, const GLfloat *params)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_LIGHT_MODEL, 5);
+ n = alloc_instruction(ctx, OPCODE_LIGHT_MODEL, 5);
if (n) {
n[1].e = pname;
n[2].f = params[0];
@@ -2275,7 +2373,7 @@ save_LineStipple(GLint factor, GLushort pattern)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_LINE_STIPPLE, 2);
+ n = alloc_instruction(ctx, OPCODE_LINE_STIPPLE, 2);
if (n) {
n[1].i = factor;
n[2].us = pattern;
@@ -2292,7 +2390,7 @@ save_LineWidth(GLfloat width)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_LINE_WIDTH, 1);
+ n = alloc_instruction(ctx, OPCODE_LINE_WIDTH, 1);
if (n) {
n[1].f = width;
}
@@ -2308,7 +2406,7 @@ save_ListBase(GLuint base)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_LIST_BASE, 1);
+ n = alloc_instruction(ctx, OPCODE_LIST_BASE, 1);
if (n) {
n[1].ui = base;
}
@@ -2323,7 +2421,7 @@ save_LoadIdentity(void)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- (void) ALLOC_INSTRUCTION(ctx, OPCODE_LOAD_IDENTITY, 0);
+ (void) alloc_instruction(ctx, OPCODE_LOAD_IDENTITY, 0);
if (ctx->ExecuteFlag) {
CALL_LoadIdentity(ctx->Exec, ());
}
@@ -2336,7 +2434,7 @@ save_LoadMatrixf(const GLfloat * m)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_LOAD_MATRIX, 16);
+ n = alloc_instruction(ctx, OPCODE_LOAD_MATRIX, 16);
if (n) {
GLuint i;
for (i = 0; i < 16; i++) {
@@ -2367,7 +2465,7 @@ save_LoadName(GLuint name)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_LOAD_NAME, 1);
+ n = alloc_instruction(ctx, OPCODE_LOAD_NAME, 1);
if (n) {
n[1].ui = name;
}
@@ -2383,7 +2481,7 @@ save_LogicOp(GLenum opcode)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_LOGIC_OP, 1);
+ n = alloc_instruction(ctx, OPCODE_LOGIC_OP, 1);
if (n) {
n[1].e = opcode;
}
@@ -2400,7 +2498,7 @@ save_Map1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_MAP1, 6);
+ n = alloc_instruction(ctx, OPCODE_MAP1, 6);
if (n) {
GLfloat *pnts = _mesa_copy_map_points1d(target, stride, order, points);
n[1].e = target;
@@ -2422,7 +2520,7 @@ save_Map1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_MAP1, 6);
+ n = alloc_instruction(ctx, OPCODE_MAP1, 6);
if (n) {
GLfloat *pnts = _mesa_copy_map_points1f(target, stride, order, points);
n[1].e = target;
@@ -2447,7 +2545,7 @@ save_Map2d(GLenum target,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_MAP2, 10);
+ n = alloc_instruction(ctx, OPCODE_MAP2, 10);
if (n) {
GLfloat *pnts = _mesa_copy_map_points2d(target, ustride, uorder,
vstride, vorder, points);
@@ -2480,7 +2578,7 @@ save_Map2f(GLenum target,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_MAP2, 10);
+ n = alloc_instruction(ctx, OPCODE_MAP2, 10);
if (n) {
GLfloat *pnts = _mesa_copy_map_points2f(target, ustride, uorder,
vstride, vorder, points);
@@ -2509,7 +2607,7 @@ save_MapGrid1f(GLint un, GLfloat u1, GLfloat u2)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_MAPGRID1, 3);
+ n = alloc_instruction(ctx, OPCODE_MAPGRID1, 3);
if (n) {
n[1].i = un;
n[2].f = u1;
@@ -2535,7 +2633,7 @@ save_MapGrid2f(GLint un, GLfloat u1, GLfloat u2,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_MAPGRID2, 6);
+ n = alloc_instruction(ctx, OPCODE_MAPGRID2, 6);
if (n) {
n[1].i = un;
n[2].f = u1;
@@ -2566,7 +2664,7 @@ save_MatrixMode(GLenum mode)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_MATRIX_MODE, 1);
+ n = alloc_instruction(ctx, OPCODE_MATRIX_MODE, 1);
if (n) {
n[1].e = mode;
}
@@ -2583,7 +2681,7 @@ save_Minmax(GLenum target, GLenum internalFormat, GLboolean sink)
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_MIN_MAX, 3);
+ n = alloc_instruction(ctx, OPCODE_MIN_MAX, 3);
if (n) {
n[1].e = target;
n[2].e = internalFormat;
@@ -2601,7 +2699,7 @@ save_MultMatrixf(const GLfloat * m)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_MULT_MATRIX, 16);
+ n = alloc_instruction(ctx, OPCODE_MULT_MATRIX, 16);
if (n) {
GLuint i;
for (i = 0; i < 16; i++) {
@@ -2645,7 +2743,7 @@ save_Ortho(GLdouble left, GLdouble right,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_ORTHO, 6);
+ n = alloc_instruction(ctx, OPCODE_ORTHO, 6);
if (n) {
n[1].f = (GLfloat) left;
n[2].f = (GLfloat) right;
@@ -2666,7 +2764,7 @@ save_PixelMapfv(GLenum map, GLint mapsize, const GLfloat *values)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_PIXEL_MAP, 3);
+ n = alloc_instruction(ctx, OPCODE_PIXEL_MAP, 3);
if (n) {
n[1].e = map;
n[2].i = mapsize;
@@ -2723,7 +2821,7 @@ save_PixelTransferf(GLenum pname, GLfloat param)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_PIXEL_TRANSFER, 2);
+ n = alloc_instruction(ctx, OPCODE_PIXEL_TRANSFER, 2);
if (n) {
n[1].e = pname;
n[2].f = param;
@@ -2747,7 +2845,7 @@ save_PixelZoom(GLfloat xfactor, GLfloat yfactor)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_PIXEL_ZOOM, 2);
+ n = alloc_instruction(ctx, OPCODE_PIXEL_ZOOM, 2);
if (n) {
n[1].f = xfactor;
n[2].f = yfactor;
@@ -2764,7 +2862,7 @@ save_PointParameterfvEXT(GLenum pname, const GLfloat *params)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_POINT_PARAMETERS, 4);
+ n = alloc_instruction(ctx, OPCODE_POINT_PARAMETERS, 4);
if (n) {
n[1].e = pname;
n[2].f = params[0];
@@ -2811,7 +2909,7 @@ save_PointSize(GLfloat size)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_POINT_SIZE, 1);
+ n = alloc_instruction(ctx, OPCODE_POINT_SIZE, 1);
if (n) {
n[1].f = size;
}
@@ -2827,7 +2925,7 @@ save_PolygonMode(GLenum face, GLenum mode)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_POLYGON_MODE, 2);
+ n = alloc_instruction(ctx, OPCODE_POLYGON_MODE, 2);
if (n) {
n[1].e = face;
n[2].e = mode;
@@ -2846,7 +2944,7 @@ save_PolygonStipple(const GLubyte * pattern)
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_POLYGON_STIPPLE, 1);
+ n = alloc_instruction(ctx, OPCODE_POLYGON_STIPPLE, 1);
if (n) {
n[1].data = unpack_image(ctx, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
pattern, &ctx->Unpack);
@@ -2863,7 +2961,7 @@ save_PolygonOffset(GLfloat factor, GLfloat units)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_POLYGON_OFFSET, 2);
+ n = alloc_instruction(ctx, OPCODE_POLYGON_OFFSET, 2);
if (n) {
n[1].f = factor;
n[2].f = units;
@@ -2888,7 +2986,7 @@ save_PopAttrib(void)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- (void) ALLOC_INSTRUCTION(ctx, OPCODE_POP_ATTRIB, 0);
+ (void) alloc_instruction(ctx, OPCODE_POP_ATTRIB, 0);
if (ctx->ExecuteFlag) {
CALL_PopAttrib(ctx->Exec, ());
}
@@ -2900,7 +2998,7 @@ save_PopMatrix(void)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- (void) ALLOC_INSTRUCTION(ctx, OPCODE_POP_MATRIX, 0);
+ (void) alloc_instruction(ctx, OPCODE_POP_MATRIX, 0);
if (ctx->ExecuteFlag) {
CALL_PopMatrix(ctx->Exec, ());
}
@@ -2912,7 +3010,7 @@ save_PopName(void)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- (void) ALLOC_INSTRUCTION(ctx, OPCODE_POP_NAME, 0);
+ (void) alloc_instruction(ctx, OPCODE_POP_NAME, 0);
if (ctx->ExecuteFlag) {
CALL_PopName(ctx->Exec, ());
}
@@ -2929,7 +3027,7 @@ save_PrioritizeTextures(GLsizei num, const GLuint * textures,
for (i = 0; i < num; i++) {
Node *n;
- n = ALLOC_INSTRUCTION(ctx, OPCODE_PRIORITIZE_TEXTURE, 2);
+ n = alloc_instruction(ctx, OPCODE_PRIORITIZE_TEXTURE, 2);
if (n) {
n[1].ui = textures[i];
n[2].f = priorities[i];
@@ -2947,7 +3045,7 @@ save_PushAttrib(GLbitfield mask)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_PUSH_ATTRIB, 1);
+ n = alloc_instruction(ctx, OPCODE_PUSH_ATTRIB, 1);
if (n) {
n[1].bf = mask;
}
@@ -2962,7 +3060,7 @@ save_PushMatrix(void)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- (void) ALLOC_INSTRUCTION(ctx, OPCODE_PUSH_MATRIX, 0);
+ (void) alloc_instruction(ctx, OPCODE_PUSH_MATRIX, 0);
if (ctx->ExecuteFlag) {
CALL_PushMatrix(ctx->Exec, ());
}
@@ -2975,7 +3073,7 @@ save_PushName(GLuint name)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_PUSH_NAME, 1);
+ n = alloc_instruction(ctx, OPCODE_PUSH_NAME, 1);
if (n) {
n[1].ui = name;
}
@@ -2991,7 +3089,7 @@ save_RasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_RASTER_POS, 4);
+ n = alloc_instruction(ctx, OPCODE_RASTER_POS, 4);
if (n) {
n[1].f = x;
n[2].f = y;
@@ -3150,7 +3248,7 @@ save_PassThrough(GLfloat token)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_PASSTHROUGH, 1);
+ n = alloc_instruction(ctx, OPCODE_PASSTHROUGH, 1);
if (n) {
n[1].f = token;
}
@@ -3166,7 +3264,7 @@ save_ReadBuffer(GLenum mode)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_READ_BUFFER, 1);
+ n = alloc_instruction(ctx, OPCODE_READ_BUFFER, 1);
if (n) {
n[1].e = mode;
}
@@ -3182,7 +3280,7 @@ save_ResetHistogram(GLenum target)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_RESET_HISTOGRAM, 1);
+ n = alloc_instruction(ctx, OPCODE_RESET_HISTOGRAM, 1);
if (n) {
n[1].e = target;
}
@@ -3198,7 +3296,7 @@ save_ResetMinmax(GLenum target)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_RESET_MIN_MAX, 1);
+ n = alloc_instruction(ctx, OPCODE_RESET_MIN_MAX, 1);
if (n) {
n[1].e = target;
}
@@ -3214,7 +3312,7 @@ save_Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_ROTATE, 4);
+ n = alloc_instruction(ctx, OPCODE_ROTATE, 4);
if (n) {
n[1].f = angle;
n[2].f = x;
@@ -3240,7 +3338,7 @@ save_Scalef(GLfloat x, GLfloat y, GLfloat z)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_SCALE, 3);
+ n = alloc_instruction(ctx, OPCODE_SCALE, 3);
if (n) {
n[1].f = x;
n[2].f = y;
@@ -3265,7 +3363,7 @@ save_Scissor(GLint x, GLint y, GLsizei width, GLsizei height)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_SCISSOR, 4);
+ n = alloc_instruction(ctx, OPCODE_SCISSOR, 4);
if (n) {
n[1].i = x;
n[2].i = y;
@@ -3299,7 +3397,7 @@ save_ShadeModel(GLenum mode)
if (ctx->Driver.CurrentSavePrimitive == PRIM_OUTSIDE_BEGIN_END)
ctx->ListState.Current.ShadeModel = mode;
- n = ALLOC_INSTRUCTION(ctx, OPCODE_SHADE_MODEL, 1);
+ n = alloc_instruction(ctx, OPCODE_SHADE_MODEL, 1);
if (n) {
n[1].e = mode;
}
@@ -3312,7 +3410,7 @@ save_StencilFunc(GLenum func, GLint ref, GLuint mask)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_STENCIL_FUNC, 3);
+ n = alloc_instruction(ctx, OPCODE_STENCIL_FUNC, 3);
if (n) {
n[1].e = func;
n[2].i = ref;
@@ -3330,7 +3428,7 @@ save_StencilMask(GLuint mask)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_STENCIL_MASK, 1);
+ n = alloc_instruction(ctx, OPCODE_STENCIL_MASK, 1);
if (n) {
n[1].ui = mask;
}
@@ -3346,7 +3444,7 @@ save_StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_STENCIL_OP, 3);
+ n = alloc_instruction(ctx, OPCODE_STENCIL_OP, 3);
if (n) {
n[1].e = fail;
n[2].e = zfail;
@@ -3364,7 +3462,7 @@ save_StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_STENCIL_FUNC_SEPARATE, 4);
+ n = alloc_instruction(ctx, OPCODE_STENCIL_FUNC_SEPARATE, 4);
if (n) {
n[1].e = face;
n[2].e = func;
@@ -3385,7 +3483,7 @@ save_StencilFuncSeparateATI(GLenum frontfunc, GLenum backfunc, GLint ref,
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
/* GL_FRONT */
- n = ALLOC_INSTRUCTION(ctx, OPCODE_STENCIL_FUNC_SEPARATE, 4);
+ n = alloc_instruction(ctx, OPCODE_STENCIL_FUNC_SEPARATE, 4);
if (n) {
n[1].e = GL_FRONT;
n[2].e = frontfunc;
@@ -3393,7 +3491,7 @@ save_StencilFuncSeparateATI(GLenum frontfunc, GLenum backfunc, GLint ref,
n[4].ui = mask;
}
/* GL_BACK */
- n = ALLOC_INSTRUCTION(ctx, OPCODE_STENCIL_FUNC_SEPARATE, 4);
+ n = alloc_instruction(ctx, OPCODE_STENCIL_FUNC_SEPARATE, 4);
if (n) {
n[1].e = GL_BACK;
n[2].e = backfunc;
@@ -3413,7 +3511,7 @@ save_StencilMaskSeparate(GLenum face, GLuint mask)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_STENCIL_MASK_SEPARATE, 2);
+ n = alloc_instruction(ctx, OPCODE_STENCIL_MASK_SEPARATE, 2);
if (n) {
n[1].e = face;
n[2].ui = mask;
@@ -3430,7 +3528,7 @@ save_StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_STENCIL_OP_SEPARATE, 4);
+ n = alloc_instruction(ctx, OPCODE_STENCIL_OP_SEPARATE, 4);
if (n) {
n[1].e = face;
n[2].e = fail;
@@ -3449,7 +3547,7 @@ save_TexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_TEXENV, 6);
+ n = alloc_instruction(ctx, OPCODE_TEXENV, 6);
if (n) {
n[1].e = target;
n[2].e = pname;
@@ -3514,7 +3612,7 @@ save_TexGenfv(GLenum coord, GLenum pname, const GLfloat *params)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_TEXGEN, 6);
+ n = alloc_instruction(ctx, OPCODE_TEXGEN, 6);
if (n) {
n[1].e = coord;
n[2].e = pname;
@@ -3589,7 +3687,7 @@ save_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_TEXPARAMETER, 6);
+ n = alloc_instruction(ctx, OPCODE_TEXPARAMETER, 6);
if (n) {
n[1].e = target;
n[2].e = pname;
@@ -3649,7 +3747,7 @@ save_TexImage1D(GLenum target,
else {
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_IMAGE1D, 8);
+ n = alloc_instruction(ctx, OPCODE_TEX_IMAGE1D, 8);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -3684,7 +3782,7 @@ save_TexImage2D(GLenum target,
else {
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_IMAGE2D, 9);
+ n = alloc_instruction(ctx, OPCODE_TEX_IMAGE2D, 9);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -3722,7 +3820,7 @@ save_TexImage3D(GLenum target,
else {
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_IMAGE3D, 10);
+ n = alloc_instruction(ctx, OPCODE_TEX_IMAGE3D, 10);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -3755,7 +3853,7 @@ save_TexSubImage1D(GLenum target, GLint level, GLint xoffset,
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_SUB_IMAGE1D, 7);
+ n = alloc_instruction(ctx, OPCODE_TEX_SUB_IMAGE1D, 7);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -3784,7 +3882,7 @@ save_TexSubImage2D(GLenum target, GLint level,
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_SUB_IMAGE2D, 9);
+ n = alloc_instruction(ctx, OPCODE_TEX_SUB_IMAGE2D, 9);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -3815,7 +3913,7 @@ save_TexSubImage3D(GLenum target, GLint level,
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_SUB_IMAGE3D, 11);
+ n = alloc_instruction(ctx, OPCODE_TEX_SUB_IMAGE3D, 11);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -3845,7 +3943,7 @@ save_Translatef(GLfloat x, GLfloat y, GLfloat z)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_TRANSLATE, 3);
+ n = alloc_instruction(ctx, OPCODE_TRANSLATE, 3);
if (n) {
n[1].f = x;
n[2].f = y;
@@ -3871,7 +3969,7 @@ save_Viewport(GLint x, GLint y, GLsizei width, GLsizei height)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_VIEWPORT, 4);
+ n = alloc_instruction(ctx, OPCODE_VIEWPORT, 4);
if (n) {
n[1].i = x;
n[2].i = y;
@@ -3890,7 +3988,7 @@ save_WindowPos4fMESA(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_WINDOW_POS, 4);
+ n = alloc_instruction(ctx, OPCODE_WINDOW_POS, 4);
if (n) {
n[1].f = x;
n[2].f = y;
@@ -4051,7 +4149,7 @@ save_ActiveTextureARB(GLenum target)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_ACTIVE_TEXTURE, 1);
+ n = alloc_instruction(ctx, OPCODE_ACTIVE_TEXTURE, 1);
if (n) {
n[1].e = target;
}
@@ -4124,7 +4222,7 @@ save_CompressedTexImage1DARB(GLenum target, GLint level,
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COMPRESSED_TEX_IMAGE_1D, 7);
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_1D, 7);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -4170,7 +4268,7 @@ save_CompressedTexImage2DARB(GLenum target, GLint level,
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COMPRESSED_TEX_IMAGE_2D, 8);
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_2D, 8);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -4217,7 +4315,7 @@ save_CompressedTexImage3DARB(GLenum target, GLint level,
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COMPRESSED_TEX_IMAGE_3D, 9);
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_IMAGE_3D, 9);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -4260,7 +4358,7 @@ save_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D, 7);
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D, 7);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -4300,7 +4398,7 @@ save_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D, 9);
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D, 9);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -4342,7 +4440,7 @@ save_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
return;
}
MEMCPY(image, data, imageSize);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D, 11);
+ n = alloc_instruction(ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D, 11);
if (n) {
n[1].e = target;
n[2].i = level;
@@ -4375,7 +4473,7 @@ save_SampleCoverageARB(GLclampf value, GLboolean invert)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_SAMPLE_COVERAGE, 2);
+ n = alloc_instruction(ctx, OPCODE_SAMPLE_COVERAGE, 2);
if (n) {
n[1].f = value;
n[2].b = invert;
@@ -4396,7 +4494,7 @@ save_BindProgramNV(GLenum target, GLuint id)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_BIND_PROGRAM_NV, 2);
+ n = alloc_instruction(ctx, OPCODE_BIND_PROGRAM_NV, 2);
if (n) {
n[1].e = target;
n[2].ui = id;
@@ -4413,7 +4511,7 @@ save_ProgramEnvParameter4fARB(GLenum target, GLuint index,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_ENV_PARAMETER_ARB, 6);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_ENV_PARAMETER_ARB, 6);
if (n) {
n[1].e = target;
n[2].ui = index;
@@ -4450,7 +4548,7 @@ save_ProgramEnvParameters4fvEXT(GLenum target, GLuint index, GLsizei count,
const GLfloat * p = params;
for (i = 0 ; i < count ; i++) {
- n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_ENV_PARAMETER_ARB, 6);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_ENV_PARAMETER_ARB, 6);
if (n) {
n[1].e = target;
n[2].ui = index;
@@ -4498,7 +4596,7 @@ save_ExecuteProgramNV(GLenum target, GLuint id, const GLfloat *params)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_EXECUTE_PROGRAM_NV, 6);
+ n = alloc_instruction(ctx, OPCODE_EXECUTE_PROGRAM_NV, 6);
if (n) {
n[1].e = target;
n[2].ui = id;
@@ -4544,7 +4642,7 @@ save_LoadProgramNV(GLenum target, GLuint id, GLsizei len,
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_LOAD_PROGRAM_NV, 4);
+ n = alloc_instruction(ctx, OPCODE_LOAD_PROGRAM_NV, 4);
if (n) {
GLubyte *programCopy = (GLubyte *) _mesa_malloc(len);
if (!programCopy) {
@@ -4571,7 +4669,7 @@ save_RequestResidentProgramsNV(GLsizei num, const GLuint * ids)
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_TRACK_MATRIX_NV, 2);
+ n = alloc_instruction(ctx, OPCODE_TRACK_MATRIX_NV, 2);
if (n) {
GLuint *idCopy = (GLuint *) _mesa_malloc(num * sizeof(GLuint));
if (!idCopy) {
@@ -4595,7 +4693,7 @@ save_TrackMatrixNV(GLenum target, GLuint address,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_TRACK_MATRIX_NV, 4);
+ n = alloc_instruction(ctx, OPCODE_TRACK_MATRIX_NV, 4);
if (n) {
n[1].e = target;
n[2].ui = address;
@@ -4620,7 +4718,7 @@ save_ProgramLocalParameter4fARB(GLenum target, GLuint index,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6);
if (n) {
n[1].e = target;
n[2].ui = index;
@@ -4642,7 +4740,7 @@ save_ProgramLocalParameter4fvARB(GLenum target, GLuint index,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6);
if (n) {
n[1].e = target;
n[2].ui = index;
@@ -4670,7 +4768,7 @@ save_ProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei count,
const GLfloat * p = params;
for (i = 0 ; i < count ; i++) {
- n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6);
if (n) {
n[1].e = target;
n[2].ui = index;
@@ -4697,7 +4795,7 @@ save_ProgramLocalParameter4dARB(GLenum target, GLuint index,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6);
if (n) {
n[1].e = target;
n[2].ui = index;
@@ -4719,7 +4817,7 @@ save_ProgramLocalParameter4dvARB(GLenum target, GLuint index,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_LOCAL_PARAMETER_ARB, 6);
if (n) {
n[1].e = target;
n[2].ui = index;
@@ -4742,7 +4840,7 @@ save_ProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name,
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_NAMED_PARAMETER_NV, 6);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_NAMED_PARAMETER_NV, 6);
if (n) {
GLubyte *nameCopy = (GLubyte *) _mesa_malloc(len);
if (!nameCopy) {
@@ -4801,7 +4899,7 @@ save_ActiveStencilFaceEXT(GLenum face)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_ACTIVE_STENCIL_FACE_EXT, 1);
+ n = alloc_instruction(ctx, OPCODE_ACTIVE_STENCIL_FACE_EXT, 1);
if (n) {
n[1].e = face;
}
@@ -4818,7 +4916,7 @@ save_DepthBoundsEXT(GLclampd zmin, GLclampd zmax)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_DEPTH_BOUNDS_EXT, 2);
+ n = alloc_instruction(ctx, OPCODE_DEPTH_BOUNDS_EXT, 2);
if (n) {
n[1].f = (GLfloat) zmin;
n[2].f = (GLfloat) zmax;
@@ -4841,7 +4939,7 @@ save_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_PROGRAM_STRING_ARB, 4);
+ n = alloc_instruction(ctx, OPCODE_PROGRAM_STRING_ARB, 4);
if (n) {
GLubyte *programCopy = (GLubyte *) _mesa_malloc(len);
if (!programCopy) {
@@ -4862,7 +4960,7 @@ save_ProgramStringARB(GLenum target, GLenum format, GLsizei len,
#endif /* FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program */
-#if FEATURE_ARB_occlusion_query
+#if FEATURE_queryobj
static void GLAPIENTRY
save_BeginQueryARB(GLenum target, GLuint id)
@@ -4870,7 +4968,7 @@ save_BeginQueryARB(GLenum target, GLuint id)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_BEGIN_QUERY_ARB, 2);
+ n = alloc_instruction(ctx, OPCODE_BEGIN_QUERY_ARB, 2);
if (n) {
n[1].e = target;
n[2].ui = id;
@@ -4887,7 +4985,7 @@ save_EndQueryARB(GLenum target)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_END_QUERY_ARB, 1);
+ n = alloc_instruction(ctx, OPCODE_END_QUERY_ARB, 1);
if (n) {
n[1].e = target;
}
@@ -4896,7 +4994,7 @@ save_EndQueryARB(GLenum target)
}
}
-#endif /* FEATURE_ARB_occlusion_query */
+#endif /* FEATURE_queryobj */
static void GLAPIENTRY
@@ -4905,7 +5003,7 @@ save_DrawBuffersARB(GLsizei count, const GLenum * buffers)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_DRAW_BUFFERS_ARB, 1 + MAX_DRAW_BUFFERS);
+ n = alloc_instruction(ctx, OPCODE_DRAW_BUFFERS_ARB, 1 + MAX_DRAW_BUFFERS);
if (n) {
GLint i;
n[1].i = count;
@@ -4926,7 +5024,7 @@ save_TexBumpParameterfvATI(GLenum pname, const GLfloat *param)
GET_CURRENT_CONTEXT(ctx);
Node *n;
- n = ALLOC_INSTRUCTION(ctx, OPCODE_TEX_BUMP_PARAMETER_ATI, 5);
+ n = alloc_instruction(ctx, OPCODE_TEX_BUMP_PARAMETER_ATI, 5);
if (n) {
n[1].ui = pname;
n[2].f = param[0];
@@ -4957,7 +5055,7 @@ save_BindFragmentShaderATI(GLuint id)
GET_CURRENT_CONTEXT(ctx);
Node *n;
- n = ALLOC_INSTRUCTION(ctx, OPCODE_BIND_FRAGMENT_SHADER_ATI, 1);
+ n = alloc_instruction(ctx, OPCODE_BIND_FRAGMENT_SHADER_ATI, 1);
if (n) {
n[1].ui = id;
}
@@ -4972,7 +5070,7 @@ save_SetFragmentShaderConstantATI(GLuint dst, const GLfloat *value)
GET_CURRENT_CONTEXT(ctx);
Node *n;
- n = ALLOC_INSTRUCTION(ctx, OPCODE_SET_FRAGMENT_SHADER_CONSTANTS_ATI, 5);
+ n = alloc_instruction(ctx, OPCODE_SET_FRAGMENT_SHADER_CONSTANTS_ATI, 5);
if (n) {
n[1].ui = dst;
n[2].f = value[0];
@@ -4992,7 +5090,7 @@ save_Attr1fNV(GLenum attr, GLfloat x)
GET_CURRENT_CONTEXT(ctx);
Node *n;
SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_ATTR_1F_NV, 2);
+ n = alloc_instruction(ctx, OPCODE_ATTR_1F_NV, 2);
if (n) {
n[1].e = attr;
n[2].f = x;
@@ -5013,7 +5111,7 @@ save_Attr2fNV(GLenum attr, GLfloat x, GLfloat y)
GET_CURRENT_CONTEXT(ctx);
Node *n;
SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_ATTR_2F_NV, 3);
+ n = alloc_instruction(ctx, OPCODE_ATTR_2F_NV, 3);
if (n) {
n[1].e = attr;
n[2].f = x;
@@ -5035,7 +5133,7 @@ save_Attr3fNV(GLenum attr, GLfloat x, GLfloat y, GLfloat z)
GET_CURRENT_CONTEXT(ctx);
Node *n;
SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_ATTR_3F_NV, 4);
+ n = alloc_instruction(ctx, OPCODE_ATTR_3F_NV, 4);
if (n) {
n[1].e = attr;
n[2].f = x;
@@ -5058,7 +5156,7 @@ save_Attr4fNV(GLenum attr, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
GET_CURRENT_CONTEXT(ctx);
Node *n;
SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_ATTR_4F_NV, 5);
+ n = alloc_instruction(ctx, OPCODE_ATTR_4F_NV, 5);
if (n) {
n[1].e = attr;
n[2].f = x;
@@ -5083,7 +5181,7 @@ save_Attr1fARB(GLenum attr, GLfloat x)
GET_CURRENT_CONTEXT(ctx);
Node *n;
SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_ATTR_1F_ARB, 2);
+ n = alloc_instruction(ctx, OPCODE_ATTR_1F_ARB, 2);
if (n) {
n[1].e = attr;
n[2].f = x;
@@ -5104,7 +5202,7 @@ save_Attr2fARB(GLenum attr, GLfloat x, GLfloat y)
GET_CURRENT_CONTEXT(ctx);
Node *n;
SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_ATTR_2F_ARB, 3);
+ n = alloc_instruction(ctx, OPCODE_ATTR_2F_ARB, 3);
if (n) {
n[1].e = attr;
n[2].f = x;
@@ -5126,7 +5224,7 @@ save_Attr3fARB(GLenum attr, GLfloat x, GLfloat y, GLfloat z)
GET_CURRENT_CONTEXT(ctx);
Node *n;
SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_ATTR_3F_ARB, 4);
+ n = alloc_instruction(ctx, OPCODE_ATTR_3F_ARB, 4);
if (n) {
n[1].e = attr;
n[2].f = x;
@@ -5149,7 +5247,7 @@ save_Attr4fARB(GLenum attr, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
GET_CURRENT_CONTEXT(ctx);
Node *n;
SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_ATTR_4F_ARB, 5);
+ n = alloc_instruction(ctx, OPCODE_ATTR_4F_ARB, 5);
if (n) {
n[1].e = attr;
n[2].f = x;
@@ -5174,7 +5272,7 @@ save_EvalCoord1f(GLfloat x)
GET_CURRENT_CONTEXT(ctx);
Node *n;
SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_EVAL_C1, 1);
+ n = alloc_instruction(ctx, OPCODE_EVAL_C1, 1);
if (n) {
n[1].f = x;
}
@@ -5195,7 +5293,7 @@ save_EvalCoord2f(GLfloat x, GLfloat y)
GET_CURRENT_CONTEXT(ctx);
Node *n;
SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_EVAL_C2, 2);
+ n = alloc_instruction(ctx, OPCODE_EVAL_C2, 2);
if (n) {
n[1].f = x;
n[2].f = y;
@@ -5218,7 +5316,7 @@ save_EvalPoint1(GLint x)
GET_CURRENT_CONTEXT(ctx);
Node *n;
SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_EVAL_P1, 1);
+ n = alloc_instruction(ctx, OPCODE_EVAL_P1, 1);
if (n) {
n[1].i = x;
}
@@ -5233,7 +5331,7 @@ save_EvalPoint2(GLint x, GLint y)
GET_CURRENT_CONTEXT(ctx);
Node *n;
SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_EVAL_P2, 2);
+ n = alloc_instruction(ctx, OPCODE_EVAL_P2, 2);
if (n) {
n[1].i = x;
n[2].i = y;
@@ -5336,7 +5434,7 @@ save_Materialfv(GLenum face, GLenum pname, const GLfloat * param)
SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_MATERIAL, 6);
+ n = alloc_instruction(ctx, OPCODE_MATERIAL, 6);
if (n) {
n[1].e = face;
n[2].e = pname;
@@ -5379,7 +5477,7 @@ save_Begin(GLenum mode)
return;
SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_BEGIN, 1);
+ n = alloc_instruction(ctx, OPCODE_BEGIN, 1);
if (n) {
n[1].e = mode;
}
@@ -5395,7 +5493,7 @@ save_End(void)
{
GET_CURRENT_CONTEXT(ctx);
SAVE_FLUSH_VERTICES(ctx);
- (void) ALLOC_INSTRUCTION(ctx, OPCODE_END, 0);
+ (void) alloc_instruction(ctx, OPCODE_END, 0);
ctx->Driver.CurrentSavePrimitive = PRIM_OUTSIDE_BEGIN_END;
if (ctx->ExecuteFlag) {
CALL_End(ctx->Exec, ());
@@ -5408,7 +5506,7 @@ save_Rectf(GLfloat a, GLfloat b, GLfloat c, GLfloat d)
GET_CURRENT_CONTEXT(ctx);
Node *n;
SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_RECTF, 4);
+ n = alloc_instruction(ctx, OPCODE_RECTF, 4);
if (n) {
n[1].f = a;
n[2].f = b;
@@ -5822,7 +5920,7 @@ save_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_BLIT_FRAMEBUFFER, 10);
+ n = alloc_instruction(ctx, OPCODE_BLIT_FRAMEBUFFER, 10);
if (n) {
n[1].i = srcX0;
n[2].i = srcY0;
@@ -5851,7 +5949,7 @@ save_ProvokingVertexEXT(GLenum mode)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_PROVOKING_VERTEX, 1);
+ n = alloc_instruction(ctx, OPCODE_PROVOKING_VERTEX, 1);
if (n) {
n[1].e = mode;
}
@@ -5869,7 +5967,7 @@ save_UseProgramObjectARB(GLhandleARB program)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_USE_PROGRAM, 1);
+ n = alloc_instruction(ctx, OPCODE_USE_PROGRAM, 1);
if (n) {
n[1].ui = program;
}
@@ -5885,7 +5983,7 @@ save_Uniform1fARB(GLint location, GLfloat x)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_1F, 2);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1F, 2);
if (n) {
n[1].i = location;
n[2].f = x;
@@ -5902,7 +6000,7 @@ save_Uniform2fARB(GLint location, GLfloat x, GLfloat y)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_2F, 3);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2F, 3);
if (n) {
n[1].i = location;
n[2].f = x;
@@ -5920,7 +6018,7 @@ save_Uniform3fARB(GLint location, GLfloat x, GLfloat y, GLfloat z)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_3F, 4);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3F, 4);
if (n) {
n[1].i = location;
n[2].f = x;
@@ -5939,7 +6037,7 @@ save_Uniform4fARB(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_4F, 5);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4F, 5);
if (n) {
n[1].i = location;
n[2].f = x;
@@ -5970,7 +6068,7 @@ save_Uniform1fvARB(GLint location, GLsizei count, const GLfloat *v)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_1FV, 3);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1FV, 3);
if (n) {
n[1].i = location;
n[2].i = count;
@@ -5987,7 +6085,7 @@ save_Uniform2fvARB(GLint location, GLsizei count, const GLfloat *v)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_2FV, 3);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2FV, 3);
if (n) {
n[1].i = location;
n[2].i = count;
@@ -6004,7 +6102,7 @@ save_Uniform3fvARB(GLint location, GLsizei count, const GLfloat *v)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_3FV, 3);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3FV, 3);
if (n) {
n[1].i = location;
n[2].i = count;
@@ -6021,7 +6119,7 @@ save_Uniform4fvARB(GLint location, GLsizei count, const GLfloat *v)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_4FV, 3);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4FV, 3);
if (n) {
n[1].i = location;
n[2].i = count;
@@ -6039,7 +6137,7 @@ save_Uniform1iARB(GLint location, GLint x)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_1I, 2);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1I, 2);
if (n) {
n[1].i = location;
n[2].i = x;
@@ -6055,7 +6153,7 @@ save_Uniform2iARB(GLint location, GLint x, GLint y)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_2I, 3);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2I, 3);
if (n) {
n[1].i = location;
n[2].i = x;
@@ -6072,7 +6170,7 @@ save_Uniform3iARB(GLint location, GLint x, GLint y, GLint z)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_3I, 4);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3I, 4);
if (n) {
n[1].i = location;
n[2].i = x;
@@ -6090,7 +6188,7 @@ save_Uniform4iARB(GLint location, GLint x, GLint y, GLint z, GLint w)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_4I, 5);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4I, 5);
if (n) {
n[1].i = location;
n[2].i = x;
@@ -6111,7 +6209,7 @@ save_Uniform1ivARB(GLint location, GLsizei count, const GLint *v)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_1IV, 3);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_1IV, 3);
if (n) {
n[1].i = location;
n[2].i = count;
@@ -6128,7 +6226,7 @@ save_Uniform2ivARB(GLint location, GLsizei count, const GLint *v)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_2IV, 3);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_2IV, 3);
if (n) {
n[1].i = location;
n[2].i = count;
@@ -6145,7 +6243,7 @@ save_Uniform3ivARB(GLint location, GLsizei count, const GLint *v)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_3IV, 3);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_3IV, 3);
if (n) {
n[1].i = location;
n[2].i = count;
@@ -6162,7 +6260,7 @@ save_Uniform4ivARB(GLint location, GLsizei count, const GLint *v)
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_4IV, 3);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_4IV, 3);
if (n) {
n[1].i = location;
n[2].i = count;
@@ -6181,7 +6279,7 @@ save_UniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_MATRIX22, 4);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX22, 4);
if (n) {
n[1].i = location;
n[2].i = count;
@@ -6200,7 +6298,7 @@ save_UniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_MATRIX33, 4);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX33, 4);
if (n) {
n[1].i = location;
n[2].i = count;
@@ -6219,7 +6317,7 @@ save_UniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_MATRIX44, 4);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX44, 4);
if (n) {
n[1].i = location;
n[2].i = count;
@@ -6239,7 +6337,7 @@ save_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_MATRIX23, 4);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX23, 4);
if (n) {
n[1].i = location;
n[2].i = count;
@@ -6258,7 +6356,7 @@ save_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_MATRIX32, 4);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX32, 4);
if (n) {
n[1].i = location;
n[2].i = count;
@@ -6278,7 +6376,7 @@ save_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_MATRIX24, 4);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX24, 4);
if (n) {
n[1].i = location;
n[2].i = count;
@@ -6297,7 +6395,7 @@ save_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_MATRIX42, 4);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX42, 4);
if (n) {
n[1].i = location;
n[2].i = count;
@@ -6317,7 +6415,7 @@ save_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_MATRIX34, 4);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX34, 4);
if (n) {
n[1].i = location;
n[2].i = count;
@@ -6336,7 +6434,7 @@ save_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
GET_CURRENT_CONTEXT(ctx);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_UNIFORM_MATRIX43, 4);
+ n = alloc_instruction(ctx, OPCODE_UNIFORM_MATRIX43, 4);
if (n) {
n[1].i = location;
n[2].i = count;
@@ -6360,7 +6458,7 @@ static void
save_error(GLcontext *ctx, GLenum error, const char *s)
{
Node *n;
- n = ALLOC_INSTRUCTION(ctx, OPCODE_ERROR, 2);
+ n = alloc_instruction(ctx, OPCODE_ERROR, 2);
if (n) {
n[1].e = error;
n[2].data = (void *) s;
@@ -6436,13 +6534,10 @@ execute_list(GLcontext *ctx, GLuint list)
done = GL_FALSE;
while (!done) {
- OpCode opcode = n[0].opcode;
- int i = (int) n[0].opcode - (int) OPCODE_EXT_0;
+ const OpCode opcode = n[0].opcode;
- if (i >= 0 && i < (GLint) ctx->ListExt.NumOpcodes) {
- /* this is a driver-extended opcode */
- ctx->ListExt.Opcode[i].Execute(ctx, &n[1]);
- n += ctx->ListExt.Opcode[i].Size;
+ if (is_ext_opcode(opcode)) {
+ n += ext_opcode_execute(ctx, n);
}
else {
switch (opcode) {
@@ -7161,7 +7256,7 @@ execute_list(GLcontext *ctx, GLuint list)
n[6].f));
break;
#endif
-#if FEATURE_ARB_occlusion_query
+#if FEATURE_queryobj
case OPCODE_BEGIN_QUERY_ARB:
CALL_BeginQueryARB(ctx->Exec, (n[1].e, n[2].ui));
break;
@@ -7432,7 +7527,7 @@ execute_list(GLcontext *ctx, GLuint list)
/**
* Test if a display list number is valid.
*/
-GLboolean GLAPIENTRY
+static GLboolean GLAPIENTRY
_mesa_IsList(GLuint list)
{
GET_CURRENT_CONTEXT(ctx);
@@ -7445,7 +7540,7 @@ _mesa_IsList(GLuint list)
/**
* Delete a sequence of consecutive display lists.
*/
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_DeleteLists(GLuint list, GLsizei range)
{
GET_CURRENT_CONTEXT(ctx);
@@ -7467,7 +7562,7 @@ _mesa_DeleteLists(GLuint list, GLsizei range)
* Return a display list number, n, such that lists n through n+range-1
* are free.
*/
-GLuint GLAPIENTRY
+static GLuint GLAPIENTRY
_mesa_GenLists(GLsizei range)
{
GET_CURRENT_CONTEXT(ctx);
@@ -7507,7 +7602,7 @@ _mesa_GenLists(GLsizei range)
/**
* Begin a new display list.
*/
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_NewList(GLuint name, GLenum mode)
{
GET_CURRENT_CONTEXT(ctx);
@@ -7557,7 +7652,7 @@ _mesa_NewList(GLuint name, GLenum mode)
/**
* End definition of current display list.
*/
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_EndList(void)
{
GET_CURRENT_CONTEXT(ctx);
@@ -7578,7 +7673,7 @@ _mesa_EndList(void)
*/
ctx->Driver.EndList(ctx);
- (void) ALLOC_INSTRUCTION(ctx, OPCODE_END_OF_LIST, 0);
+ (void) alloc_instruction(ctx, OPCODE_END_OF_LIST, 0);
/* Destroy old list, if any */
destroy_list(ctx, ctx->ListState.CurrentList->Name);
@@ -7691,7 +7786,7 @@ _mesa_CallLists(GLsizei n, GLenum type, const GLvoid * lists)
/**
* Set the offset added to list numbers in glCallLists.
*/
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_ListBase(GLuint base)
{
GET_CURRENT_CONTEXT(ctx);
@@ -8426,7 +8521,7 @@ exec_MultiModeDrawElementsIBM(const GLenum * mode,
* struct.
*/
void
-_mesa_init_dlist_table(struct _glapi_table *table)
+_mesa_init_save_table(struct _glapi_table *table)
{
_mesa_loopback_init_api_table(table);
@@ -8435,8 +8530,8 @@ _mesa_init_dlist_table(struct _glapi_table *table)
SET_AlphaFunc(table, save_AlphaFunc);
SET_Bitmap(table, save_Bitmap);
SET_BlendFunc(table, save_BlendFunc);
- SET_CallList(table, _mesa_save_CallList);
- SET_CallLists(table, _mesa_save_CallLists);
+ SET_CallList(table, save_CallList);
+ SET_CallLists(table, save_CallLists);
SET_Clear(table, save_Clear);
SET_ClearAccum(table, save_ClearAccum);
SET_ClearColor(table, save_ClearColor);
@@ -8457,8 +8552,8 @@ _mesa_init_dlist_table(struct _glapi_table *table)
SET_DrawPixels(table, save_DrawPixels);
SET_Enable(table, save_Enable);
SET_EndList(table, _mesa_EndList);
- SET_EvalMesh1(table, _mesa_save_EvalMesh1);
- SET_EvalMesh2(table, _mesa_save_EvalMesh2);
+ SET_EvalMesh1(table, save_EvalMesh1);
+ SET_EvalMesh2(table, save_EvalMesh2);
SET_Finish(table, exec_Finish);
SET_Flush(table, exec_Flush);
SET_Fogf(table, save_Fogf);
@@ -8930,7 +9025,7 @@ _mesa_init_dlist_table(struct _glapi_table *table)
SET_UnmapBufferARB(table, _mesa_UnmapBufferARB);
#endif
-#if FEATURE_ARB_occlusion_query
+#if FEATURE_queryobj
SET_BeginQueryARB(table, save_BeginQueryARB);
SET_EndQueryARB(table, save_EndQueryARB);
SET_GenQueriesARB(table, _mesa_GenQueriesARB);
@@ -9036,13 +9131,10 @@ print_list(GLcontext *ctx, GLuint list)
done = n ? GL_FALSE : GL_TRUE;
while (!done) {
- OpCode opcode = n[0].opcode;
- GLint i = (GLint) n[0].opcode - (GLint) OPCODE_EXT_0;
+ const OpCode opcode = n[0].opcode;
- if (i >= 0 && i < (GLint) ctx->ListExt.NumOpcodes) {
- /* this is a driver-extended opcode */
- ctx->ListExt.Opcode[i].Print(ctx, &n[1]);
- n += ctx->ListExt.Opcode[i].Size;
+ if (is_ext_opcode(opcode)) {
+ n += ext_opcode_print(ctx, n);
}
else {
switch (opcode) {
@@ -9297,22 +9389,21 @@ mesa_print_display_list(GLuint list)
void
_mesa_save_vtxfmt_init(GLvertexformat * vfmt)
{
- vfmt->ArrayElement = _ae_loopback_array_elt; /* generic helper */
+ _MESA_INIT_ARRAYELT_VTXFMT(vfmt, _ae_);
+
vfmt->Begin = save_Begin;
- vfmt->CallList = _mesa_save_CallList;
- vfmt->CallLists = _mesa_save_CallLists;
+
+ _MESA_INIT_DLIST_VTXFMT(vfmt, save_);
+
vfmt->Color3f = save_Color3f;
vfmt->Color3fv = save_Color3fv;
vfmt->Color4f = save_Color4f;
vfmt->Color4fv = save_Color4fv;
vfmt->EdgeFlag = save_EdgeFlag;
vfmt->End = save_End;
- vfmt->EvalCoord1f = save_EvalCoord1f;
- vfmt->EvalCoord1fv = save_EvalCoord1fv;
- vfmt->EvalCoord2f = save_EvalCoord2f;
- vfmt->EvalCoord2fv = save_EvalCoord2fv;
- vfmt->EvalPoint1 = save_EvalPoint1;
- vfmt->EvalPoint2 = save_EvalPoint2;
+
+ _MESA_INIT_EVAL_VTXFMT(vfmt, save_);
+
vfmt->FogCoordfEXT = save_FogCoordfEXT;
vfmt->FogCoordfvEXT = save_FogCoordfvEXT;
vfmt->Indexf = save_Indexf;
@@ -9361,8 +9452,6 @@ _mesa_save_vtxfmt_init(GLvertexformat * vfmt)
vfmt->VertexAttrib4fARB = save_VertexAttrib4fARB;
vfmt->VertexAttrib4fvARB = save_VertexAttrib4fvARB;
- vfmt->EvalMesh1 = _mesa_save_EvalMesh1;
- vfmt->EvalMesh2 = _mesa_save_EvalMesh2;
vfmt->Rectf = save_Rectf;
/* The driver is required to implement these as
@@ -9376,10 +9465,39 @@ _mesa_save_vtxfmt_init(GLvertexformat * vfmt)
vfmt->DrawElements = 0;
vfmt->DrawRangeElements = 0;
vfmt->MultiDrawElemementsEXT = 0;
+ vfmt->DrawElementsBaseVertex = 0;
+ vfmt->DrawRangeElementsBaseVertex = 0;
+ vfmt->MultiDrawElemementsBaseVertex = 0;
#endif
}
+void
+_mesa_install_dlist_vtxfmt(struct _glapi_table *disp,
+ const GLvertexformat *vfmt)
+{
+ SET_CallList(disp, vfmt->CallList);
+ SET_CallLists(disp, vfmt->CallLists);
+}
+
+
+void _mesa_init_dlist_dispatch(struct _glapi_table *disp)
+{
+ SET_CallList(disp, _mesa_CallList);
+ SET_CallLists(disp, _mesa_CallLists);
+
+ SET_DeleteLists(disp, _mesa_DeleteLists);
+ SET_EndList(disp, _mesa_EndList);
+ SET_GenLists(disp, _mesa_GenLists);
+ SET_IsList(disp, _mesa_IsList);
+ SET_ListBase(disp, _mesa_ListBase);
+ SET_NewList(disp, _mesa_NewList);
+}
+
+
+#endif /* FEATURE_dlist */
+
+
/**
* Initialize display list state for given context.
*/
@@ -9394,6 +9512,9 @@ _mesa_init_display_list(GLcontext *ctx)
tableInitialized = GL_TRUE;
}
+ /* extension info */
+ ctx->ListExt = CALLOC_STRUCT(gl_list_extensions);
+
/* Display list */
ctx->ListState.CallDepth = 0;
ctx->ExecuteFlag = GL_TRUE;
@@ -9404,5 +9525,15 @@ _mesa_init_display_list(GLcontext *ctx)
/* Display List group */
ctx->List.ListBase = 0;
+#if FEATURE_dlist
_mesa_save_vtxfmt_init(&ctx->ListState.ListVtxfmt);
+#endif
+}
+
+
+void
+_mesa_free_display_list_data(GLcontext *ctx)
+{
+ free(ctx->ListExt);
+ ctx->ListExt = NULL;
}
diff --git a/src/mesa/main/dlist.h b/src/mesa/main/dlist.h
index ab7ec2c8db..f37a93a7f4 100644
--- a/src/mesa/main/dlist.h
+++ b/src/mesa/main/dlist.h
@@ -33,64 +33,80 @@
#define DLIST_H
-#include "mtypes.h"
+#include "main/mtypes.h"
-#if _HAVE_FULL_GL
+#if FEATURE_dlist
-extern void
-_mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist);
+#define _MESA_INIT_DLIST_FUNCTIONS(driver, impl) \
+ do { \
+ (driver)->NewList = impl ## NewList; \
+ (driver)->EndList = impl ## EndList; \
+ (driver)->BeginCallList = impl ## BeginCallList; \
+ (driver)->EndCallList = impl ## EndCallList; \
+ (driver)->SaveFlushVertices = impl ## SaveFlushVertices; \
+ (driver)->NotifySaveBegin = impl ## NotifyBegin; \
+ } while (0)
+
+#define _MESA_INIT_DLIST_VTXFMT(vfmt, impl) \
+ do { \
+ (vfmt)->CallList = impl ## CallList; \
+ (vfmt)->CallLists = impl ## CallLists; \
+ } while (0)
extern void GLAPIENTRY _mesa_CallList( GLuint list );
extern void GLAPIENTRY _mesa_CallLists( GLsizei n, GLenum type, const GLvoid *lists );
-extern void GLAPIENTRY _mesa_DeleteLists( GLuint list, GLsizei range );
-extern void GLAPIENTRY _mesa_EndList( void );
+extern void _mesa_compile_error( GLcontext *ctx, GLenum error, const char *s );
-extern GLuint GLAPIENTRY _mesa_GenLists( GLsizei range );
+extern void *_mesa_dlist_alloc(GLcontext *ctx, GLuint opcode, GLuint sz);
-extern GLboolean GLAPIENTRY _mesa_IsList( GLuint list );
+extern GLint _mesa_dlist_alloc_opcode( GLcontext *ctx, GLuint sz,
+ void (*execute)( GLcontext *, void * ),
+ void (*destroy)( GLcontext *, void * ),
+ void (*print)( GLcontext *, void * ) );
-extern void GLAPIENTRY _mesa_ListBase( GLuint base );
+extern void _mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist);
-extern void GLAPIENTRY _mesa_NewList( GLuint list, GLenum mode );
+extern void _mesa_save_vtxfmt_init( GLvertexformat *vfmt );
-extern void GLAPIENTRY _mesa_save_CallLists( GLsizei n, GLenum type, const GLvoid *lists );
+extern void _mesa_init_save_table( struct _glapi_table *table );
-extern void GLAPIENTRY _mesa_save_CallList( GLuint list );
+extern void _mesa_install_dlist_vtxfmt(struct _glapi_table *disp,
+ const GLvertexformat *vfmt);
+extern void _mesa_init_dlist_dispatch(struct _glapi_table *disp);
+#else /* FEATURE_dlist */
-extern void _mesa_init_dlist_table( struct _glapi_table *table );
+#define _MESA_INIT_DLIST_FUNCTIONS(driver, impl) do { } while (0)
+#define _MESA_INIT_DLIST_VTXFMT(vfmt, impl) do { } while (0)
-extern void _mesa_compile_error( GLcontext *ctx, GLenum error, const char *s );
+static INLINE void
+_mesa_delete_list(GLcontext *ctx, struct gl_display_list *dlist)
+{
+ /* there should be no list to delete */
+ ASSERT_NO_FEATURE();
+}
+static INLINE void
+_mesa_install_dlist_vtxfmt(struct _glapi_table *disp,
+ const GLvertexformat *vfmt)
+{
+}
-extern void *_mesa_alloc_instruction(GLcontext *ctx, GLuint opcode, GLuint sz);
+static INLINE void
+_mesa_init_dlist_dispatch(struct _glapi_table *disp)
+{
+}
-extern GLint _mesa_alloc_opcode( GLcontext *ctx, GLuint sz,
- void (*execute)( GLcontext *, void * ),
- void (*destroy)( GLcontext *, void * ),
- void (*print)( GLcontext *, void * ) );
+#endif /* FEATURE_dlist */
extern void _mesa_init_display_list( GLcontext * ctx );
-extern void _mesa_save_vtxfmt_init( GLvertexformat *vfmt );
-
-
-#else
-
-/** No-op */
-#define _mesa_init_dlist_table(t,ts) ((void)0)
-
-/** No-op */
-#define _mesa_init_display_list(c) ((void)0)
-
-/** No-op */
-#define _mesa_save_vtxfmt_init(v) ((void)0)
+extern void _mesa_free_display_list_data(GLcontext *ctx);
-#endif
-#endif
+#endif /* DLIST_H */
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index aef6585641..5d4b53af4c 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -33,8 +33,11 @@
#include "image.h"
#include "readpix.h"
#include "state.h"
+#include "glapi/dispatch.h"
+#if FEATURE_drawpix
+
/**
* If a fragment program is enabled, check that it's valid.
@@ -47,12 +50,10 @@ valid_fragment_program(GLcontext *ctx)
}
-#if _HAVE_FULL_GL
-
/*
* Execute glDrawPixels
*/
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_DrawPixels( GLsizei width, GLsizei height,
GLenum format, GLenum type, const GLvoid *pixels )
{
@@ -140,7 +141,7 @@ end:
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
GLenum type )
{
@@ -225,11 +226,8 @@ end:
_mesa_set_vp_override(ctx, GL_FALSE);
}
-#endif /* _HAVE_FULL_GL */
-
-
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_Bitmap( GLsizei width, GLsizei height,
GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove,
const GLubyte *bitmap )
@@ -309,3 +307,15 @@ _mesa_Bitmap( GLsizei width, GLsizei height,
ctx->Current.RasterPos[0] += xmove;
ctx->Current.RasterPos[1] += ymove;
}
+
+
+void
+_mesa_init_drawpix_dispatch(struct _glapi_table *disp)
+{
+ SET_Bitmap(disp, _mesa_Bitmap);
+ SET_CopyPixels(disp, _mesa_CopyPixels);
+ SET_DrawPixels(disp, _mesa_DrawPixels);
+}
+
+
+#endif /* FEATURE_drawpix */
diff --git a/src/mesa/main/drawpix.h b/src/mesa/main/drawpix.h
index 6177adad6d..8ffb1a6d88 100644
--- a/src/mesa/main/drawpix.h
+++ b/src/mesa/main/drawpix.h
@@ -22,28 +22,35 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
+#ifndef DRAWPIX_H
+#define DRAWPIX_H
-#ifndef DRAWPIXELS_H
-#define DRAWPIXELS_H
+#include "main/mtypes.h"
-#include "main/glheader.h"
+#if FEATURE_drawpix
-extern void GLAPIENTRY
-_mesa_DrawPixels( GLsizei width, GLsizei height,
- GLenum format, GLenum type, const GLvoid *pixels );
+#define _MESA_INIT_DRAWPIX_FUNCTIONS(driver, impl) \
+ do { \
+ (driver)->DrawPixels = impl ## DrawPixels; \
+ (driver)->CopyPixels = impl ## CopyPixels; \
+ (driver)->Bitmap = impl ## Bitmap; \
+ } while (0)
+extern void
+_mesa_init_drawpix_dispatch(struct _glapi_table *disp);
-extern void GLAPIENTRY
-_mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
- GLenum type );
+#else /* FEATURE_drawpix */
+#define _MESA_INIT_DRAWPIX_FUNCTIONS(driver, impl) do { } while (0)
-extern void GLAPIENTRY
-_mesa_Bitmap( GLsizei width, GLsizei height,
- GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove,
- const GLubyte *bitmap );
+static INLINE void
+_mesa_init_drawpix_dispatch(struct _glapi_table *disp)
+{
+}
+#endif /* FEATURE_drawpix */
-#endif
+
+#endif /* DRAWPIX_H */
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 4a00440ab1..12ce14c5d0 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -36,8 +36,8 @@
#include "simple_list.h"
#include "mtypes.h"
#include "enums.h"
-#include "math/m_matrix.h"
#include "api_arrayelt.h"
+#include "texstate.h"
@@ -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;
@@ -229,8 +230,7 @@ get_texcoord_unit(GLcontext *ctx)
static GLboolean
enable_texture(GLcontext *ctx, GLboolean state, GLbitfield texBit)
{
- const GLuint curr = ctx->Texture.CurrentUnit;
- struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr];
+ struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
const GLbitfield newenabled = state
? (texUnit->Enabled | texBit) : (texUnit->Enabled & ~texBit);
@@ -942,6 +942,14 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
ctx->Depth.BoundsTest = state;
break;
+ case GL_DEPTH_CLAMP:
+ if (ctx->Transform.DepthClamp == state)
+ return;
+ CHECK_EXTENSION(ARB_depth_clamp, cap);
+ FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
+ ctx->Transform.DepthClamp = state;
+ break;
+
#if FEATURE_ATI_fragment_shader
case GL_FRAGMENT_SHADER_ATI:
CHECK_EXTENSION(ATI_fragment_shader, cap);
@@ -1390,6 +1398,11 @@ _mesa_IsEnabled( GLenum cap )
CHECK_EXTENSION(EXT_depth_bounds_test);
return ctx->Depth.BoundsTest;
+ /* GL_ARB_depth_clamp */
+ case GL_DEPTH_CLAMP:
+ CHECK_EXTENSION(ARB_depth_clamp);
+ return ctx->Transform.DepthClamp;
+
#if FEATURE_ATI_fragment_shader
case GL_FRAGMENT_SHADER_ATI:
CHECK_EXTENSION(ATI_fragment_shader);
diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c
index 9f650dadd3..606d50c59a 100644
--- a/src/mesa/main/enums.c
+++ b/src/mesa/main/enums.c
@@ -391,6 +391,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_DEPTH_BOUNDS_EXT\0"
"GL_DEPTH_BOUNDS_TEST_EXT\0"
"GL_DEPTH_BUFFER_BIT\0"
+ "GL_DEPTH_CLAMP\0"
"GL_DEPTH_CLAMP_NV\0"
"GL_DEPTH_CLEAR_VALUE\0"
"GL_DEPTH_COMPONENT\0"
@@ -518,6 +519,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_FEEDBACK_BUFFER_SIZE\0"
"GL_FEEDBACK_BUFFER_TYPE\0"
"GL_FILL\0"
+ "GL_FIRST_VERTEX_CONVENTION\0"
"GL_FIRST_VERTEX_CONVENTION_EXT\0"
"GL_FLAT\0"
"GL_FLOAT\0"
@@ -701,6 +703,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_INVERSE_TRANSPOSE_NV\0"
"GL_INVERT\0"
"GL_KEEP\0"
+ "GL_LAST_VERTEX_CONVENTION\0"
"GL_LAST_VERTEX_CONVENTION_EXT\0"
"GL_LEFT\0"
"GL_LEQUAL\0"
@@ -1287,6 +1290,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_PROJECTION\0"
"GL_PROJECTION_MATRIX\0"
"GL_PROJECTION_STACK_DEPTH\0"
+ "GL_PROVOKING_VERTEX\0"
"GL_PROVOKING_VERTEX_EXT\0"
"GL_PROXY_COLOR_TABLE\0"
"GL_PROXY_HISTOGRAM\0"
@@ -1308,6 +1312,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_Q\0"
"GL_QUADRATIC_ATTENUATION\0"
"GL_QUADS\0"
+ "GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION\0"
"GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT\0"
"GL_QUAD_MESH_SUN\0"
"GL_QUAD_STRIP\0"
@@ -1895,7 +1900,7 @@ LONGSTRING static const char enum_string_table[] =
"GL_ZOOM_Y\0"
;
-static const enum_elt all_enums[1857] =
+static const enum_elt all_enums[1862] =
{
{ 0, 0x00000600 }, /* GL_2D */
{ 6, 0x00001407 }, /* GL_2_BYTES */
@@ -2252,1588 +2257,1593 @@ static const enum_elt all_enums[1857] =
{ 7262, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
{ 7282, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
{ 7307, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
- { 7327, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
- { 7345, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
- { 7366, 0x00001902 }, /* GL_DEPTH_COMPONENT */
- { 7385, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
- { 7406, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
- { 7431, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
- { 7457, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
- { 7478, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
- { 7503, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
- { 7529, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
- { 7550, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
- { 7575, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
- { 7601, 0x00000B74 }, /* GL_DEPTH_FUNC */
- { 7615, 0x00000B70 }, /* GL_DEPTH_RANGE */
- { 7630, 0x00000D1E }, /* GL_DEPTH_SCALE */
- { 7645, 0x000084F9 }, /* GL_DEPTH_STENCIL */
- { 7662, 0x0000821A }, /* GL_DEPTH_STENCIL_ATTACHMENT */
- { 7690, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
- { 7710, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
- { 7738, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
- { 7766, 0x00000B71 }, /* GL_DEPTH_TEST */
- { 7780, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
- { 7802, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
- { 7828, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
- { 7847, 0x00001201 }, /* GL_DIFFUSE */
- { 7858, 0x00000BD0 }, /* GL_DITHER */
- { 7868, 0x00000A02 }, /* GL_DOMAIN */
- { 7878, 0x00001100 }, /* GL_DONT_CARE */
- { 7891, 0x000086AE }, /* GL_DOT3_RGB */
- { 7903, 0x000086AF }, /* GL_DOT3_RGBA */
- { 7916, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
- { 7933, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
- { 7950, 0x000086AE }, /* GL_DOT3_RGB_ARB */
- { 7966, 0x00008740 }, /* GL_DOT3_RGB_EXT */
- { 7982, 0x0000140A }, /* GL_DOUBLE */
- { 7992, 0x00000C32 }, /* GL_DOUBLEBUFFER */
- { 8008, 0x00000C01 }, /* GL_DRAW_BUFFER */
- { 8023, 0x00008825 }, /* GL_DRAW_BUFFER0 */
- { 8039, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
- { 8059, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
- { 8079, 0x00008826 }, /* GL_DRAW_BUFFER1 */
- { 8095, 0x0000882F }, /* GL_DRAW_BUFFER10 */
- { 8112, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
- { 8133, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
- { 8154, 0x00008830 }, /* GL_DRAW_BUFFER11 */
- { 8171, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
- { 8192, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
- { 8213, 0x00008831 }, /* GL_DRAW_BUFFER12 */
- { 8230, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
- { 8251, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
- { 8272, 0x00008832 }, /* GL_DRAW_BUFFER13 */
- { 8289, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
- { 8310, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
- { 8331, 0x00008833 }, /* GL_DRAW_BUFFER14 */
- { 8348, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
- { 8369, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
- { 8390, 0x00008834 }, /* GL_DRAW_BUFFER15 */
- { 8407, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
- { 8428, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
- { 8449, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
- { 8469, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
- { 8489, 0x00008827 }, /* GL_DRAW_BUFFER2 */
- { 8505, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
- { 8525, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
- { 8545, 0x00008828 }, /* GL_DRAW_BUFFER3 */
- { 8561, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
- { 8581, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
- { 8601, 0x00008829 }, /* GL_DRAW_BUFFER4 */
- { 8617, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
- { 8637, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
- { 8657, 0x0000882A }, /* GL_DRAW_BUFFER5 */
- { 8673, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
- { 8693, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
- { 8713, 0x0000882B }, /* GL_DRAW_BUFFER6 */
- { 8729, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
- { 8749, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
- { 8769, 0x0000882C }, /* GL_DRAW_BUFFER7 */
- { 8785, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
- { 8805, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
- { 8825, 0x0000882D }, /* GL_DRAW_BUFFER8 */
- { 8841, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
- { 8861, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
- { 8881, 0x0000882E }, /* GL_DRAW_BUFFER9 */
- { 8897, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
- { 8917, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
- { 8937, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER */
- { 8957, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
- { 8989, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
- { 9013, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
- { 9033, 0x00000304 }, /* GL_DST_ALPHA */
- { 9046, 0x00000306 }, /* GL_DST_COLOR */
- { 9059, 0x0000877A }, /* GL_DU8DV8_ATI */
- { 9073, 0x00008779 }, /* GL_DUDV_ATI */
- { 9085, 0x000088EA }, /* GL_DYNAMIC_COPY */
- { 9101, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
- { 9121, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
- { 9137, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
- { 9157, 0x000088E9 }, /* GL_DYNAMIC_READ */
- { 9173, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
- { 9193, 0x00000B43 }, /* GL_EDGE_FLAG */
- { 9206, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
- { 9225, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
- { 9259, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
- { 9297, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
- { 9324, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- { 9350, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
- { 9374, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- { 9406, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
- { 9442, 0x00001600 }, /* GL_EMISSION */
- { 9454, 0x00002000 }, /* GL_ENABLE_BIT */
- { 9468, 0x00000202 }, /* GL_EQUAL */
- { 9477, 0x00001509 }, /* GL_EQUIV */
- { 9486, 0x00010000 }, /* GL_EVAL_BIT */
- { 9498, 0x00000800 }, /* GL_EXP */
- { 9505, 0x00000801 }, /* GL_EXP2 */
- { 9513, 0x00001F03 }, /* GL_EXTENSIONS */
- { 9527, 0x00002400 }, /* GL_EYE_LINEAR */
- { 9541, 0x00002502 }, /* GL_EYE_PLANE */
- { 9554, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
- { 9579, 0x0000855B }, /* GL_EYE_RADIAL_NV */
- { 9596, 0x00000000 }, /* GL_FALSE */
- { 9605, 0x00001101 }, /* GL_FASTEST */
- { 9616, 0x00001C01 }, /* GL_FEEDBACK */
- { 9628, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
- { 9655, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
- { 9679, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
- { 9703, 0x00001B02 }, /* GL_FILL */
- { 9711, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION_EXT */
- { 9742, 0x00001D00 }, /* GL_FLAT */
- { 9750, 0x00001406 }, /* GL_FLOAT */
- { 9759, 0x00008B5A }, /* GL_FLOAT_MAT2 */
- { 9773, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
- { 9791, 0x00008B65 }, /* GL_FLOAT_MAT2x3 */
- { 9807, 0x00008B66 }, /* GL_FLOAT_MAT2x4 */
- { 9823, 0x00008B5B }, /* GL_FLOAT_MAT3 */
- { 9837, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
- { 9855, 0x00008B67 }, /* GL_FLOAT_MAT3x2 */
- { 9871, 0x00008B68 }, /* GL_FLOAT_MAT3x4 */
- { 9887, 0x00008B5C }, /* GL_FLOAT_MAT4 */
- { 9901, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
- { 9919, 0x00008B69 }, /* GL_FLOAT_MAT4x2 */
- { 9935, 0x00008B6A }, /* GL_FLOAT_MAT4x3 */
- { 9951, 0x00008B50 }, /* GL_FLOAT_VEC2 */
- { 9965, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
- { 9983, 0x00008B51 }, /* GL_FLOAT_VEC3 */
- { 9997, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
- { 10015, 0x00008B52 }, /* GL_FLOAT_VEC4 */
- { 10029, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
- { 10047, 0x00000B60 }, /* GL_FOG */
- { 10054, 0x00000080 }, /* GL_FOG_BIT */
- { 10065, 0x00000B66 }, /* GL_FOG_COLOR */
- { 10078, 0x00008451 }, /* GL_FOG_COORD */
- { 10091, 0x00008451 }, /* GL_FOG_COORDINATE */
- { 10109, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
- { 10133, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- { 10172, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
- { 10215, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
- { 10247, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
- { 10278, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
- { 10307, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
- { 10332, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
- { 10351, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
- { 10385, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
- { 10412, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
- { 10438, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
- { 10462, 0x00008450 }, /* GL_FOG_COORD_SRC */
- { 10479, 0x00000B62 }, /* GL_FOG_DENSITY */
- { 10494, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
- { 10518, 0x00000B64 }, /* GL_FOG_END */
- { 10529, 0x00000C54 }, /* GL_FOG_HINT */
- { 10541, 0x00000B61 }, /* GL_FOG_INDEX */
- { 10554, 0x00000B65 }, /* GL_FOG_MODE */
- { 10566, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
- { 10585, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
- { 10610, 0x00000B63 }, /* GL_FOG_START */
- { 10623, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
- { 10641, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
- { 10665, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
- { 10684, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
- { 10707, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
- { 10742, 0x00008D40 }, /* GL_FRAMEBUFFER */
- { 10757, 0x00008215 }, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
- { 10794, 0x00008214 }, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
- { 10830, 0x00008210 }, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
- { 10871, 0x00008211 }, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
- { 10912, 0x00008216 }, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
- { 10949, 0x00008213 }, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
- { 10986, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
- { 11024, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
- { 11066, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
- { 11104, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
- { 11146, 0x00008212 }, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
- { 11181, 0x00008217 }, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
- { 11220, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
- { 11269, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
- { 11317, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
- { 11369, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
- { 11409, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
- { 11453, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
- { 11493, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
- { 11537, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
- { 11564, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE */
- { 11588, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
- { 11616, 0x00008218 }, /* GL_FRAMEBUFFER_DEFAULT */
- { 11639, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
- { 11658, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
- { 11695, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
- { 11736, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
- { 11777, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
- { 11819, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
- { 11870, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
- { 11908, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
- { 11953, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
- { 12002, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
- { 12040, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
- { 12082, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
- { 12114, 0x00008219 }, /* GL_FRAMEBUFFER_UNDEFINED */
- { 12139, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED */
- { 12166, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
- { 12197, 0x00000404 }, /* GL_FRONT */
- { 12206, 0x00000408 }, /* GL_FRONT_AND_BACK */
- { 12224, 0x00000B46 }, /* GL_FRONT_FACE */
- { 12238, 0x00000400 }, /* GL_FRONT_LEFT */
- { 12252, 0x00000401 }, /* GL_FRONT_RIGHT */
- { 12267, 0x00008006 }, /* GL_FUNC_ADD */
- { 12279, 0x00008006 }, /* GL_FUNC_ADD_EXT */
- { 12295, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
- { 12320, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
- { 12349, 0x0000800A }, /* GL_FUNC_SUBTRACT */
- { 12366, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
- { 12387, 0x00008191 }, /* GL_GENERATE_MIPMAP */
- { 12406, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
- { 12430, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
- { 12459, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
- { 12483, 0x00000206 }, /* GL_GEQUAL */
- { 12493, 0x00000204 }, /* GL_GREATER */
- { 12504, 0x00001904 }, /* GL_GREEN */
- { 12513, 0x00000D19 }, /* GL_GREEN_BIAS */
- { 12527, 0x00000D53 }, /* GL_GREEN_BITS */
- { 12541, 0x00000D18 }, /* GL_GREEN_SCALE */
- { 12556, 0x00008000 }, /* GL_HINT_BIT */
- { 12568, 0x00008024 }, /* GL_HISTOGRAM */
- { 12581, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
- { 12605, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
- { 12633, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
- { 12656, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
- { 12683, 0x00008024 }, /* GL_HISTOGRAM_EXT */
- { 12700, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
- { 12720, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
- { 12744, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
- { 12768, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
- { 12796, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
- { 12824, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
- { 12856, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
- { 12878, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
- { 12904, 0x0000802D }, /* GL_HISTOGRAM_SINK */
- { 12922, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
- { 12944, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
- { 12963, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
- { 12986, 0x0000862A }, /* GL_IDENTITY_NV */
- { 13001, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
- { 13021, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
- { 13061, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
- { 13099, 0x00001E02 }, /* GL_INCR */
- { 13107, 0x00008507 }, /* GL_INCR_WRAP */
- { 13120, 0x00008507 }, /* GL_INCR_WRAP_EXT */
- { 13137, 0x00008222 }, /* GL_INDEX */
- { 13146, 0x00008077 }, /* GL_INDEX_ARRAY */
- { 13161, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
- { 13191, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
- { 13225, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
- { 13248, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
- { 13270, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
- { 13290, 0x00000D51 }, /* GL_INDEX_BITS */
- { 13304, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
- { 13325, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
- { 13343, 0x00000C30 }, /* GL_INDEX_MODE */
- { 13357, 0x00000D13 }, /* GL_INDEX_OFFSET */
- { 13373, 0x00000D12 }, /* GL_INDEX_SHIFT */
- { 13388, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
- { 13407, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
- { 13426, 0x00001404 }, /* GL_INT */
- { 13433, 0x00008049 }, /* GL_INTENSITY */
- { 13446, 0x0000804C }, /* GL_INTENSITY12 */
- { 13461, 0x0000804C }, /* GL_INTENSITY12_EXT */
- { 13480, 0x0000804D }, /* GL_INTENSITY16 */
- { 13495, 0x0000804D }, /* GL_INTENSITY16_EXT */
- { 13514, 0x0000804A }, /* GL_INTENSITY4 */
- { 13528, 0x0000804A }, /* GL_INTENSITY4_EXT */
- { 13546, 0x0000804B }, /* GL_INTENSITY8 */
- { 13560, 0x0000804B }, /* GL_INTENSITY8_EXT */
- { 13578, 0x00008049 }, /* GL_INTENSITY_EXT */
- { 13595, 0x00008575 }, /* GL_INTERPOLATE */
- { 13610, 0x00008575 }, /* GL_INTERPOLATE_ARB */
- { 13629, 0x00008575 }, /* GL_INTERPOLATE_EXT */
- { 13648, 0x00008B53 }, /* GL_INT_VEC2 */
- { 13660, 0x00008B53 }, /* GL_INT_VEC2_ARB */
- { 13676, 0x00008B54 }, /* GL_INT_VEC3 */
- { 13688, 0x00008B54 }, /* GL_INT_VEC3_ARB */
- { 13704, 0x00008B55 }, /* GL_INT_VEC4 */
- { 13716, 0x00008B55 }, /* GL_INT_VEC4_ARB */
- { 13732, 0x00000500 }, /* GL_INVALID_ENUM */
- { 13748, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */
- { 13781, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
- { 13818, 0x00000502 }, /* GL_INVALID_OPERATION */
- { 13839, 0x00000501 }, /* GL_INVALID_VALUE */
- { 13856, 0x0000862B }, /* GL_INVERSE_NV */
- { 13870, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
- { 13894, 0x0000150A }, /* GL_INVERT */
- { 13904, 0x00001E00 }, /* GL_KEEP */
- { 13912, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */
- { 13942, 0x00000406 }, /* GL_LEFT */
- { 13950, 0x00000203 }, /* GL_LEQUAL */
- { 13960, 0x00000201 }, /* GL_LESS */
- { 13968, 0x00004000 }, /* GL_LIGHT0 */
- { 13978, 0x00004001 }, /* GL_LIGHT1 */
- { 13988, 0x00004002 }, /* GL_LIGHT2 */
- { 13998, 0x00004003 }, /* GL_LIGHT3 */
- { 14008, 0x00004004 }, /* GL_LIGHT4 */
- { 14018, 0x00004005 }, /* GL_LIGHT5 */
- { 14028, 0x00004006 }, /* GL_LIGHT6 */
- { 14038, 0x00004007 }, /* GL_LIGHT7 */
- { 14048, 0x00000B50 }, /* GL_LIGHTING */
- { 14060, 0x00000040 }, /* GL_LIGHTING_BIT */
- { 14076, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
- { 14099, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
- { 14128, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
- { 14161, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- { 14189, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
- { 14213, 0x00001B01 }, /* GL_LINE */
- { 14221, 0x00002601 }, /* GL_LINEAR */
- { 14231, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
- { 14253, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
- { 14283, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
- { 14314, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
- { 14338, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
- { 14363, 0x00000001 }, /* GL_LINES */
- { 14372, 0x00000004 }, /* GL_LINE_BIT */
- { 14384, 0x00000002 }, /* GL_LINE_LOOP */
- { 14397, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
- { 14417, 0x00000B20 }, /* GL_LINE_SMOOTH */
- { 14432, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
- { 14452, 0x00000B24 }, /* GL_LINE_STIPPLE */
- { 14468, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
- { 14492, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
- { 14515, 0x00000003 }, /* GL_LINE_STRIP */
- { 14529, 0x00000702 }, /* GL_LINE_TOKEN */
- { 14543, 0x00000B21 }, /* GL_LINE_WIDTH */
- { 14557, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
- { 14583, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
- { 14603, 0x00008B82 }, /* GL_LINK_STATUS */
- { 14618, 0x00000B32 }, /* GL_LIST_BASE */
- { 14631, 0x00020000 }, /* GL_LIST_BIT */
- { 14643, 0x00000B33 }, /* GL_LIST_INDEX */
- { 14657, 0x00000B30 }, /* GL_LIST_MODE */
- { 14670, 0x00000101 }, /* GL_LOAD */
- { 14678, 0x00000BF1 }, /* GL_LOGIC_OP */
- { 14690, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
- { 14707, 0x00008CA1 }, /* GL_LOWER_LEFT */
- { 14721, 0x00001909 }, /* GL_LUMINANCE */
- { 14734, 0x00008041 }, /* GL_LUMINANCE12 */
- { 14749, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
- { 14772, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
- { 14799, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
- { 14821, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
- { 14847, 0x00008041 }, /* GL_LUMINANCE12_EXT */
- { 14866, 0x00008042 }, /* GL_LUMINANCE16 */
- { 14881, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
- { 14904, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
- { 14931, 0x00008042 }, /* GL_LUMINANCE16_EXT */
- { 14950, 0x0000803F }, /* GL_LUMINANCE4 */
- { 14964, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
- { 14985, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
- { 15010, 0x0000803F }, /* GL_LUMINANCE4_EXT */
- { 15028, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
- { 15049, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
- { 15074, 0x00008040 }, /* GL_LUMINANCE8 */
- { 15088, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
- { 15109, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
- { 15134, 0x00008040 }, /* GL_LUMINANCE8_EXT */
- { 15152, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
- { 15171, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
- { 15187, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
- { 15207, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
- { 15229, 0x00000D91 }, /* GL_MAP1_INDEX */
- { 15243, 0x00000D92 }, /* GL_MAP1_NORMAL */
- { 15258, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
- { 15282, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
- { 15306, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
- { 15330, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
- { 15354, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
- { 15371, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
- { 15388, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
- { 15416, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
- { 15445, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
- { 15474, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
- { 15503, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
- { 15532, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
- { 15561, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
- { 15590, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
- { 15618, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
- { 15646, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
- { 15674, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
- { 15702, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
- { 15730, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
- { 15758, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
- { 15786, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
- { 15814, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
- { 15842, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
- { 15858, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
- { 15878, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
- { 15900, 0x00000DB1 }, /* GL_MAP2_INDEX */
- { 15914, 0x00000DB2 }, /* GL_MAP2_NORMAL */
- { 15929, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
- { 15953, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
- { 15977, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
- { 16001, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
- { 16025, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
- { 16042, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
- { 16059, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
- { 16087, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
- { 16116, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
- { 16145, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
- { 16174, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
- { 16203, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
- { 16232, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
- { 16261, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
- { 16289, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
- { 16317, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
- { 16345, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
- { 16373, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
- { 16401, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
- { 16429, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
- { 16457, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
- { 16485, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
- { 16513, 0x00000D10 }, /* GL_MAP_COLOR */
- { 16526, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */
- { 16552, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */
- { 16581, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */
- { 16609, 0x00000001 }, /* GL_MAP_READ_BIT */
- { 16625, 0x00000D11 }, /* GL_MAP_STENCIL */
- { 16640, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */
- { 16666, 0x00000002 }, /* GL_MAP_WRITE_BIT */
- { 16683, 0x000088C0 }, /* GL_MATRIX0_ARB */
- { 16698, 0x00008630 }, /* GL_MATRIX0_NV */
- { 16712, 0x000088CA }, /* GL_MATRIX10_ARB */
- { 16728, 0x000088CB }, /* GL_MATRIX11_ARB */
- { 16744, 0x000088CC }, /* GL_MATRIX12_ARB */
- { 16760, 0x000088CD }, /* GL_MATRIX13_ARB */
- { 16776, 0x000088CE }, /* GL_MATRIX14_ARB */
- { 16792, 0x000088CF }, /* GL_MATRIX15_ARB */
- { 16808, 0x000088D0 }, /* GL_MATRIX16_ARB */
- { 16824, 0x000088D1 }, /* GL_MATRIX17_ARB */
- { 16840, 0x000088D2 }, /* GL_MATRIX18_ARB */
- { 16856, 0x000088D3 }, /* GL_MATRIX19_ARB */
- { 16872, 0x000088C1 }, /* GL_MATRIX1_ARB */
- { 16887, 0x00008631 }, /* GL_MATRIX1_NV */
- { 16901, 0x000088D4 }, /* GL_MATRIX20_ARB */
- { 16917, 0x000088D5 }, /* GL_MATRIX21_ARB */
- { 16933, 0x000088D6 }, /* GL_MATRIX22_ARB */
- { 16949, 0x000088D7 }, /* GL_MATRIX23_ARB */
- { 16965, 0x000088D8 }, /* GL_MATRIX24_ARB */
- { 16981, 0x000088D9 }, /* GL_MATRIX25_ARB */
- { 16997, 0x000088DA }, /* GL_MATRIX26_ARB */
- { 17013, 0x000088DB }, /* GL_MATRIX27_ARB */
- { 17029, 0x000088DC }, /* GL_MATRIX28_ARB */
- { 17045, 0x000088DD }, /* GL_MATRIX29_ARB */
- { 17061, 0x000088C2 }, /* GL_MATRIX2_ARB */
- { 17076, 0x00008632 }, /* GL_MATRIX2_NV */
- { 17090, 0x000088DE }, /* GL_MATRIX30_ARB */
- { 17106, 0x000088DF }, /* GL_MATRIX31_ARB */
- { 17122, 0x000088C3 }, /* GL_MATRIX3_ARB */
- { 17137, 0x00008633 }, /* GL_MATRIX3_NV */
- { 17151, 0x000088C4 }, /* GL_MATRIX4_ARB */
- { 17166, 0x00008634 }, /* GL_MATRIX4_NV */
- { 17180, 0x000088C5 }, /* GL_MATRIX5_ARB */
- { 17195, 0x00008635 }, /* GL_MATRIX5_NV */
- { 17209, 0x000088C6 }, /* GL_MATRIX6_ARB */
- { 17224, 0x00008636 }, /* GL_MATRIX6_NV */
- { 17238, 0x000088C7 }, /* GL_MATRIX7_ARB */
- { 17253, 0x00008637 }, /* GL_MATRIX7_NV */
- { 17267, 0x000088C8 }, /* GL_MATRIX8_ARB */
- { 17282, 0x000088C9 }, /* GL_MATRIX9_ARB */
- { 17297, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
- { 17323, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
- { 17357, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
- { 17388, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
- { 17421, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
- { 17452, 0x00000BA0 }, /* GL_MATRIX_MODE */
- { 17467, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
- { 17489, 0x00008008 }, /* GL_MAX */
- { 17496, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
- { 17519, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
- { 17551, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
- { 17577, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
- { 17610, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
- { 17636, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- { 17670, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
- { 17689, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
- { 17718, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
- { 17750, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
- { 17786, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
- { 17822, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
- { 17862, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
- { 17888, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
- { 17918, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
- { 17943, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
- { 17972, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
- { 18001, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
- { 18034, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
- { 18054, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
- { 18078, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
- { 18102, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
- { 18126, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
- { 18151, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
- { 18169, 0x00008008 }, /* GL_MAX_EXT */
- { 18180, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
- { 18215, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
- { 18254, 0x00000D31 }, /* GL_MAX_LIGHTS */
- { 18268, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
- { 18288, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
- { 18326, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
- { 18355, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
- { 18379, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
- { 18407, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
- { 18430, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
- { 18467, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
- { 18503, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
- { 18530, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
- { 18559, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
- { 18593, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
- { 18629, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
- { 18656, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
- { 18688, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
- { 18724, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
- { 18753, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
- { 18782, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
- { 18810, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
- { 18848, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- { 18892, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- { 18935, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
- { 18969, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- { 19008, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
- { 19045, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
- { 19083, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- { 19126, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- { 19169, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
- { 19199, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
- { 19230, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
- { 19266, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
- { 19302, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
- { 19332, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
- { 19366, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
- { 19399, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
- { 19428, 0x00008D57 }, /* GL_MAX_SAMPLES */
- { 19443, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */
- { 19470, 0x00008504 }, /* GL_MAX_SHININESS_NV */
- { 19490, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
- { 19514, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
- { 19536, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
- { 19562, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
- { 19589, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
- { 19620, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
- { 19644, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
- { 19678, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
- { 19698, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
- { 19725, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
- { 19746, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
- { 19771, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
- { 19796, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
- { 19831, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
- { 19853, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
- { 19879, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
- { 19901, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
- { 19927, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
- { 19961, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
- { 19999, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
- { 20032, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
- { 20069, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
- { 20093, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
- { 20114, 0x00008007 }, /* GL_MIN */
- { 20121, 0x0000802E }, /* GL_MINMAX */
- { 20131, 0x0000802E }, /* GL_MINMAX_EXT */
- { 20145, 0x0000802F }, /* GL_MINMAX_FORMAT */
- { 20162, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
- { 20183, 0x00008030 }, /* GL_MINMAX_SINK */
- { 20198, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
- { 20217, 0x00008007 }, /* GL_MIN_EXT */
- { 20228, 0x00008370 }, /* GL_MIRRORED_REPEAT */
- { 20247, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
- { 20270, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
- { 20293, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
- { 20313, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
- { 20333, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
- { 20363, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
- { 20391, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
- { 20419, 0x00001700 }, /* GL_MODELVIEW */
- { 20432, 0x00001700 }, /* GL_MODELVIEW0_ARB */
- { 20450, 0x0000872A }, /* GL_MODELVIEW10_ARB */
- { 20469, 0x0000872B }, /* GL_MODELVIEW11_ARB */
- { 20488, 0x0000872C }, /* GL_MODELVIEW12_ARB */
- { 20507, 0x0000872D }, /* GL_MODELVIEW13_ARB */
- { 20526, 0x0000872E }, /* GL_MODELVIEW14_ARB */
- { 20545, 0x0000872F }, /* GL_MODELVIEW15_ARB */
- { 20564, 0x00008730 }, /* GL_MODELVIEW16_ARB */
- { 20583, 0x00008731 }, /* GL_MODELVIEW17_ARB */
- { 20602, 0x00008732 }, /* GL_MODELVIEW18_ARB */
- { 20621, 0x00008733 }, /* GL_MODELVIEW19_ARB */
- { 20640, 0x0000850A }, /* GL_MODELVIEW1_ARB */
- { 20658, 0x00008734 }, /* GL_MODELVIEW20_ARB */
- { 20677, 0x00008735 }, /* GL_MODELVIEW21_ARB */
- { 20696, 0x00008736 }, /* GL_MODELVIEW22_ARB */
- { 20715, 0x00008737 }, /* GL_MODELVIEW23_ARB */
- { 20734, 0x00008738 }, /* GL_MODELVIEW24_ARB */
- { 20753, 0x00008739 }, /* GL_MODELVIEW25_ARB */
- { 20772, 0x0000873A }, /* GL_MODELVIEW26_ARB */
- { 20791, 0x0000873B }, /* GL_MODELVIEW27_ARB */
- { 20810, 0x0000873C }, /* GL_MODELVIEW28_ARB */
- { 20829, 0x0000873D }, /* GL_MODELVIEW29_ARB */
- { 20848, 0x00008722 }, /* GL_MODELVIEW2_ARB */
- { 20866, 0x0000873E }, /* GL_MODELVIEW30_ARB */
- { 20885, 0x0000873F }, /* GL_MODELVIEW31_ARB */
- { 20904, 0x00008723 }, /* GL_MODELVIEW3_ARB */
- { 20922, 0x00008724 }, /* GL_MODELVIEW4_ARB */
- { 20940, 0x00008725 }, /* GL_MODELVIEW5_ARB */
- { 20958, 0x00008726 }, /* GL_MODELVIEW6_ARB */
- { 20976, 0x00008727 }, /* GL_MODELVIEW7_ARB */
- { 20994, 0x00008728 }, /* GL_MODELVIEW8_ARB */
- { 21012, 0x00008729 }, /* GL_MODELVIEW9_ARB */
- { 21030, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
- { 21050, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
- { 21077, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
- { 21102, 0x00002100 }, /* GL_MODULATE */
- { 21114, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
- { 21134, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
- { 21161, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
- { 21186, 0x00000103 }, /* GL_MULT */
- { 21194, 0x0000809D }, /* GL_MULTISAMPLE */
- { 21209, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
- { 21229, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
- { 21248, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
- { 21267, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
- { 21291, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
- { 21314, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
- { 21344, 0x00002A25 }, /* GL_N3F_V3F */
- { 21355, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
- { 21375, 0x0000150E }, /* GL_NAND */
- { 21383, 0x00002600 }, /* GL_NEAREST */
- { 21394, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
- { 21425, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
- { 21457, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
- { 21482, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
- { 21508, 0x00000200 }, /* GL_NEVER */
- { 21517, 0x00001102 }, /* GL_NICEST */
- { 21527, 0x00000000 }, /* GL_NONE */
- { 21535, 0x00001505 }, /* GL_NOOP */
- { 21543, 0x00001508 }, /* GL_NOR */
- { 21550, 0x00000BA1 }, /* GL_NORMALIZE */
- { 21563, 0x00008075 }, /* GL_NORMAL_ARRAY */
- { 21579, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
- { 21610, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
- { 21645, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
- { 21669, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
- { 21692, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
- { 21713, 0x00008511 }, /* GL_NORMAL_MAP */
- { 21727, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
- { 21745, 0x00008511 }, /* GL_NORMAL_MAP_NV */
- { 21762, 0x00000205 }, /* GL_NOTEQUAL */
- { 21774, 0x00000000 }, /* GL_NO_ERROR */
- { 21786, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
- { 21820, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
- { 21858, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
- { 21890, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
- { 21932, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
- { 21962, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
- { 22002, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
- { 22033, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
- { 22062, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
- { 22090, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
- { 22120, 0x00002401 }, /* GL_OBJECT_LINEAR */
- { 22137, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
- { 22163, 0x00002501 }, /* GL_OBJECT_PLANE */
- { 22179, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
- { 22214, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
- { 22236, 0x00009112 }, /* GL_OBJECT_TYPE */
- { 22251, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
- { 22270, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
- { 22300, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
- { 22321, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
- { 22349, 0x00000001 }, /* GL_ONE */
- { 22356, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
- { 22384, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
- { 22416, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
- { 22444, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
- { 22476, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
- { 22499, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
- { 22522, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
- { 22545, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
- { 22568, 0x00008598 }, /* GL_OPERAND0_ALPHA */
- { 22586, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
- { 22608, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
- { 22630, 0x00008590 }, /* GL_OPERAND0_RGB */
- { 22646, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
- { 22666, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
- { 22686, 0x00008599 }, /* GL_OPERAND1_ALPHA */
- { 22704, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
- { 22726, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
- { 22748, 0x00008591 }, /* GL_OPERAND1_RGB */
- { 22764, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
- { 22784, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
- { 22804, 0x0000859A }, /* GL_OPERAND2_ALPHA */
- { 22822, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
- { 22844, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
- { 22866, 0x00008592 }, /* GL_OPERAND2_RGB */
- { 22882, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
- { 22902, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
- { 22922, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
- { 22943, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
- { 22962, 0x00001507 }, /* GL_OR */
- { 22968, 0x00000A01 }, /* GL_ORDER */
- { 22977, 0x0000150D }, /* GL_OR_INVERTED */
- { 22992, 0x0000150B }, /* GL_OR_REVERSE */
- { 23006, 0x00000505 }, /* GL_OUT_OF_MEMORY */
- { 23023, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
- { 23041, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
- { 23062, 0x00008758 }, /* GL_PACK_INVERT_MESA */
- { 23082, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
- { 23100, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
- { 23119, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
- { 23139, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
- { 23159, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
- { 23177, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
- { 23196, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
- { 23221, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
- { 23245, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
- { 23266, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
- { 23288, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
- { 23310, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
- { 23335, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
- { 23359, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
- { 23380, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
- { 23402, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
- { 23424, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
- { 23446, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
- { 23477, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
- { 23497, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
- { 23522, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
- { 23542, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
- { 23567, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
- { 23587, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
- { 23612, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
- { 23632, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
- { 23657, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
- { 23677, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
- { 23702, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
- { 23722, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
- { 23747, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
- { 23767, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
- { 23792, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
- { 23812, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
- { 23837, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
- { 23857, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
- { 23882, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
- { 23902, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
- { 23927, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
- { 23945, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */
- { 23966, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */
- { 23995, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
- { 24028, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
- { 24053, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */
- { 24076, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
- { 24107, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
- { 24142, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
- { 24169, 0x00001B00 }, /* GL_POINT */
- { 24178, 0x00000000 }, /* GL_POINTS */
- { 24188, 0x00000002 }, /* GL_POINT_BIT */
- { 24201, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
- { 24231, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
- { 24265, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
- { 24299, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
- { 24334, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
- { 24363, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
- { 24396, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
- { 24429, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
- { 24463, 0x00000B11 }, /* GL_POINT_SIZE */
- { 24477, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
- { 24503, 0x00008127 }, /* GL_POINT_SIZE_MAX */
- { 24521, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
- { 24543, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
- { 24565, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
- { 24588, 0x00008126 }, /* GL_POINT_SIZE_MIN */
- { 24606, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
- { 24628, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
- { 24650, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
- { 24673, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
- { 24693, 0x00000B10 }, /* GL_POINT_SMOOTH */
- { 24709, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
- { 24730, 0x00008861 }, /* GL_POINT_SPRITE */
- { 24746, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
- { 24766, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
- { 24795, 0x00008861 }, /* GL_POINT_SPRITE_NV */
- { 24814, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
- { 24840, 0x00000701 }, /* GL_POINT_TOKEN */
- { 24855, 0x00000009 }, /* GL_POLYGON */
- { 24866, 0x00000008 }, /* GL_POLYGON_BIT */
- { 24881, 0x00000B40 }, /* GL_POLYGON_MODE */
- { 24897, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
- { 24920, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
- { 24945, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
- { 24968, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
- { 24991, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
- { 25015, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
- { 25039, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
- { 25057, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
- { 25080, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
- { 25099, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
- { 25122, 0x00000703 }, /* GL_POLYGON_TOKEN */
- { 25139, 0x00001203 }, /* GL_POSITION */
- { 25151, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
- { 25183, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
- { 25219, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
- { 25252, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
- { 25289, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
- { 25320, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
- { 25355, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
- { 25387, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
- { 25423, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
- { 25456, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
- { 25488, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
- { 25524, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
- { 25557, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
- { 25594, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
- { 25624, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
- { 25658, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
- { 25689, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
- { 25724, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
- { 25755, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
- { 25790, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
- { 25822, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
- { 25858, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
- { 25888, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
- { 25922, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
- { 25953, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
- { 25988, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
- { 26020, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
- { 26051, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
- { 26086, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
- { 26118, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
- { 26154, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
- { 26183, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
- { 26216, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
- { 26246, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
- { 26280, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
- { 26319, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
- { 26352, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
- { 26392, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
- { 26426, 0x00008578 }, /* GL_PREVIOUS */
- { 26438, 0x00008578 }, /* GL_PREVIOUS_ARB */
- { 26454, 0x00008578 }, /* GL_PREVIOUS_EXT */
- { 26470, 0x00008577 }, /* GL_PRIMARY_COLOR */
- { 26487, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
- { 26508, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
- { 26529, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
- { 26562, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
- { 26594, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
- { 26617, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
- { 26640, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
- { 26670, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
- { 26699, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
- { 26727, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
- { 26749, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
- { 26777, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
- { 26805, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
- { 26827, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
- { 26848, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- { 26888, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- { 26927, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
- { 26957, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- { 26992, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
- { 27025, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
- { 27059, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- { 27098, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- { 27137, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
- { 27159, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
- { 27185, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
- { 27209, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
- { 27232, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
- { 27254, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
- { 27275, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
- { 27296, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
- { 27323, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
- { 27355, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
- { 27387, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
- { 27422, 0x00001701 }, /* GL_PROJECTION */
- { 27436, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
- { 27457, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
- { 27483, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */
- { 27507, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
- { 27528, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
- { 27547, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
- { 27570, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
- { 27609, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
- { 27647, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
- { 27667, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
- { 27697, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
- { 27721, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
- { 27741, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
- { 27771, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
- { 27795, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
- { 27815, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
- { 27848, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
- { 27874, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
- { 27904, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
- { 27935, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
- { 27965, 0x00002003 }, /* GL_Q */
- { 27970, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
- { 27995, 0x00000007 }, /* GL_QUADS */
- { 28004, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */
- { 28052, 0x00008614 }, /* GL_QUAD_MESH_SUN */
- { 28069, 0x00000008 }, /* GL_QUAD_STRIP */
- { 28083, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
- { 28105, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
- { 28131, 0x00008866 }, /* GL_QUERY_RESULT */
- { 28147, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
- { 28167, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
- { 28193, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
- { 28223, 0x00002002 }, /* GL_R */
- { 28228, 0x00002A10 }, /* GL_R3_G3_B2 */
- { 28240, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
- { 28273, 0x00000C02 }, /* GL_READ_BUFFER */
- { 28288, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */
- { 28308, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
- { 28340, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
- { 28364, 0x000088B8 }, /* GL_READ_ONLY */
- { 28377, 0x000088B8 }, /* GL_READ_ONLY_ARB */
- { 28394, 0x000088BA }, /* GL_READ_WRITE */
- { 28408, 0x000088BA }, /* GL_READ_WRITE_ARB */
- { 28426, 0x00001903 }, /* GL_RED */
- { 28433, 0x00008016 }, /* GL_REDUCE */
- { 28443, 0x00008016 }, /* GL_REDUCE_EXT */
- { 28457, 0x00000D15 }, /* GL_RED_BIAS */
- { 28469, 0x00000D52 }, /* GL_RED_BITS */
- { 28481, 0x00000D14 }, /* GL_RED_SCALE */
- { 28494, 0x00008512 }, /* GL_REFLECTION_MAP */
- { 28512, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
- { 28534, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
- { 28555, 0x00001C00 }, /* GL_RENDER */
- { 28565, 0x00008D41 }, /* GL_RENDERBUFFER */
- { 28581, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */
- { 28608, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
- { 28636, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */
- { 28662, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */
- { 28689, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
- { 28709, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */
- { 28736, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */
- { 28759, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
- { 28786, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
- { 28818, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
- { 28854, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */
- { 28879, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */
- { 28903, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */
- { 28932, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */
- { 28954, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
- { 28980, 0x00001F01 }, /* GL_RENDERER */
- { 28992, 0x00000C40 }, /* GL_RENDER_MODE */
- { 29007, 0x00002901 }, /* GL_REPEAT */
- { 29017, 0x00001E01 }, /* GL_REPLACE */
- { 29028, 0x00008062 }, /* GL_REPLACE_EXT */
- { 29043, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
- { 29066, 0x0000803A }, /* GL_RESCALE_NORMAL */
- { 29084, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
- { 29106, 0x00000102 }, /* GL_RETURN */
- { 29116, 0x00001907 }, /* GL_RGB */
- { 29123, 0x00008052 }, /* GL_RGB10 */
- { 29132, 0x00008059 }, /* GL_RGB10_A2 */
- { 29144, 0x00008059 }, /* GL_RGB10_A2_EXT */
- { 29160, 0x00008052 }, /* GL_RGB10_EXT */
- { 29173, 0x00008053 }, /* GL_RGB12 */
- { 29182, 0x00008053 }, /* GL_RGB12_EXT */
- { 29195, 0x00008054 }, /* GL_RGB16 */
- { 29204, 0x00008054 }, /* GL_RGB16_EXT */
- { 29217, 0x0000804E }, /* GL_RGB2_EXT */
- { 29229, 0x0000804F }, /* GL_RGB4 */
- { 29237, 0x0000804F }, /* GL_RGB4_EXT */
- { 29249, 0x000083A1 }, /* GL_RGB4_S3TC */
- { 29262, 0x00008050 }, /* GL_RGB5 */
- { 29270, 0x00008057 }, /* GL_RGB5_A1 */
- { 29281, 0x00008057 }, /* GL_RGB5_A1_EXT */
- { 29296, 0x00008050 }, /* GL_RGB5_EXT */
- { 29308, 0x00008051 }, /* GL_RGB8 */
- { 29316, 0x00008051 }, /* GL_RGB8_EXT */
- { 29328, 0x00001908 }, /* GL_RGBA */
- { 29336, 0x0000805A }, /* GL_RGBA12 */
- { 29346, 0x0000805A }, /* GL_RGBA12_EXT */
- { 29360, 0x0000805B }, /* GL_RGBA16 */
- { 29370, 0x0000805B }, /* GL_RGBA16_EXT */
- { 29384, 0x00008055 }, /* GL_RGBA2 */
- { 29393, 0x00008055 }, /* GL_RGBA2_EXT */
- { 29406, 0x00008056 }, /* GL_RGBA4 */
- { 29415, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
- { 29434, 0x00008056 }, /* GL_RGBA4_EXT */
- { 29447, 0x000083A3 }, /* GL_RGBA4_S3TC */
- { 29461, 0x00008058 }, /* GL_RGBA8 */
- { 29470, 0x00008058 }, /* GL_RGBA8_EXT */
- { 29483, 0x00008F97 }, /* GL_RGBA8_SNORM */
- { 29498, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
- { 29516, 0x00000C31 }, /* GL_RGBA_MODE */
- { 29529, 0x000083A2 }, /* GL_RGBA_S3TC */
- { 29542, 0x00008F93 }, /* GL_RGBA_SNORM */
- { 29556, 0x000083A0 }, /* GL_RGB_S3TC */
- { 29568, 0x00008573 }, /* GL_RGB_SCALE */
- { 29581, 0x00008573 }, /* GL_RGB_SCALE_ARB */
- { 29598, 0x00008573 }, /* GL_RGB_SCALE_EXT */
- { 29615, 0x00000407 }, /* GL_RIGHT */
- { 29624, 0x00002000 }, /* GL_S */
- { 29629, 0x00008B5D }, /* GL_SAMPLER_1D */
- { 29643, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
- { 29664, 0x00008B5E }, /* GL_SAMPLER_2D */
- { 29678, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
- { 29699, 0x00008B5F }, /* GL_SAMPLER_3D */
- { 29713, 0x00008B60 }, /* GL_SAMPLER_CUBE */
- { 29729, 0x000080A9 }, /* GL_SAMPLES */
- { 29740, 0x000086B4 }, /* GL_SAMPLES_3DFX */
- { 29756, 0x000080A9 }, /* GL_SAMPLES_ARB */
- { 29771, 0x00008914 }, /* GL_SAMPLES_PASSED */
- { 29789, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
- { 29811, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
- { 29839, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
- { 29871, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
- { 29894, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
- { 29921, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
- { 29939, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
- { 29962, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
- { 29984, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
- { 30003, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
- { 30026, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
- { 30052, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
- { 30082, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
- { 30107, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
- { 30136, 0x00080000 }, /* GL_SCISSOR_BIT */
- { 30151, 0x00000C10 }, /* GL_SCISSOR_BOX */
- { 30166, 0x00000C11 }, /* GL_SCISSOR_TEST */
- { 30182, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
- { 30207, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
- { 30247, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
- { 30291, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
- { 30324, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
- { 30354, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
- { 30386, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
- { 30416, 0x00001C02 }, /* GL_SELECT */
- { 30426, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
- { 30454, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
- { 30479, 0x00008012 }, /* GL_SEPARABLE_2D */
- { 30495, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
- { 30522, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
- { 30553, 0x0000150F }, /* GL_SET */
- { 30560, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
- { 30581, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
- { 30605, 0x00008B4F }, /* GL_SHADER_TYPE */
- { 30620, 0x00000B54 }, /* GL_SHADE_MODEL */
- { 30635, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
- { 30663, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
- { 30686, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
- { 30716, 0x00001601 }, /* GL_SHININESS */
- { 30729, 0x00001402 }, /* GL_SHORT */
- { 30738, 0x00009119 }, /* GL_SIGNALED */
- { 30750, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */
- { 30771, 0x000081F9 }, /* GL_SINGLE_COLOR */
- { 30787, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
- { 30807, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
- { 30826, 0x00008C46 }, /* GL_SLUMINANCE */
- { 30840, 0x00008C47 }, /* GL_SLUMINANCE8 */
- { 30855, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */
- { 30877, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */
- { 30897, 0x00001D01 }, /* GL_SMOOTH */
- { 30907, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
- { 30940, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
- { 30967, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
- { 31000, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
- { 31027, 0x00008588 }, /* GL_SOURCE0_ALPHA */
- { 31044, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
- { 31065, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
- { 31086, 0x00008580 }, /* GL_SOURCE0_RGB */
- { 31101, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
- { 31120, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
- { 31139, 0x00008589 }, /* GL_SOURCE1_ALPHA */
- { 31156, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
- { 31177, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
- { 31198, 0x00008581 }, /* GL_SOURCE1_RGB */
- { 31213, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
- { 31232, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
- { 31251, 0x0000858A }, /* GL_SOURCE2_ALPHA */
- { 31268, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
- { 31289, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
- { 31310, 0x00008582 }, /* GL_SOURCE2_RGB */
- { 31325, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
- { 31344, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
- { 31363, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
- { 31383, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
- { 31401, 0x00001202 }, /* GL_SPECULAR */
- { 31413, 0x00002402 }, /* GL_SPHERE_MAP */
- { 31427, 0x00001206 }, /* GL_SPOT_CUTOFF */
- { 31442, 0x00001204 }, /* GL_SPOT_DIRECTION */
- { 31460, 0x00001205 }, /* GL_SPOT_EXPONENT */
- { 31477, 0x00008588 }, /* GL_SRC0_ALPHA */
- { 31491, 0x00008580 }, /* GL_SRC0_RGB */
- { 31503, 0x00008589 }, /* GL_SRC1_ALPHA */
- { 31517, 0x00008581 }, /* GL_SRC1_RGB */
- { 31529, 0x0000858A }, /* GL_SRC2_ALPHA */
- { 31543, 0x00008582 }, /* GL_SRC2_RGB */
- { 31555, 0x00000302 }, /* GL_SRC_ALPHA */
- { 31568, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
- { 31590, 0x00000300 }, /* GL_SRC_COLOR */
- { 31603, 0x00008C40 }, /* GL_SRGB */
- { 31611, 0x00008C41 }, /* GL_SRGB8 */
- { 31620, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */
- { 31636, 0x00008C42 }, /* GL_SRGB_ALPHA */
- { 31650, 0x00000503 }, /* GL_STACK_OVERFLOW */
- { 31668, 0x00000504 }, /* GL_STACK_UNDERFLOW */
- { 31687, 0x000088E6 }, /* GL_STATIC_COPY */
- { 31702, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
- { 31721, 0x000088E4 }, /* GL_STATIC_DRAW */
- { 31736, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
- { 31755, 0x000088E5 }, /* GL_STATIC_READ */
- { 31770, 0x000088E5 }, /* GL_STATIC_READ_ARB */
- { 31789, 0x00001802 }, /* GL_STENCIL */
- { 31800, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */
- { 31822, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
- { 31848, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
- { 31869, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */
- { 31894, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
- { 31915, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */
- { 31940, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
- { 31972, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */
- { 32008, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
- { 32040, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */
- { 32076, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
- { 32096, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
- { 32123, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
- { 32149, 0x00000D57 }, /* GL_STENCIL_BITS */
- { 32165, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
- { 32187, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
- { 32210, 0x00000B94 }, /* GL_STENCIL_FAIL */
- { 32226, 0x00000B92 }, /* GL_STENCIL_FUNC */
- { 32242, 0x00001901 }, /* GL_STENCIL_INDEX */
- { 32259, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
- { 32282, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
- { 32304, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
- { 32326, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
- { 32348, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
- { 32369, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
- { 32396, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
- { 32423, 0x00000B97 }, /* GL_STENCIL_REF */
- { 32438, 0x00000B90 }, /* GL_STENCIL_TEST */
- { 32454, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
- { 32483, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
- { 32505, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
- { 32526, 0x00000C33 }, /* GL_STEREO */
- { 32536, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */
- { 32560, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */
- { 32585, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */
- { 32609, 0x000088E2 }, /* GL_STREAM_COPY */
- { 32624, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
- { 32643, 0x000088E0 }, /* GL_STREAM_DRAW */
- { 32658, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
- { 32677, 0x000088E1 }, /* GL_STREAM_READ */
- { 32692, 0x000088E1 }, /* GL_STREAM_READ_ARB */
- { 32711, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
- { 32728, 0x000084E7 }, /* GL_SUBTRACT */
- { 32740, 0x000084E7 }, /* GL_SUBTRACT_ARB */
- { 32756, 0x00009113 }, /* GL_SYNC_CONDITION */
- { 32774, 0x00009116 }, /* GL_SYNC_FENCE */
- { 32788, 0x00009115 }, /* GL_SYNC_FLAGS */
- { 32802, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */
- { 32829, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
- { 32859, 0x00009114 }, /* GL_SYNC_STATUS */
- { 32874, 0x00002001 }, /* GL_T */
- { 32879, 0x00002A2A }, /* GL_T2F_C3F_V3F */
- { 32894, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
- { 32913, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
- { 32929, 0x00002A2B }, /* GL_T2F_N3F_V3F */
- { 32944, 0x00002A27 }, /* GL_T2F_V3F */
- { 32955, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
- { 32974, 0x00002A28 }, /* GL_T4F_V4F */
- { 32985, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
- { 33008, 0x00001702 }, /* GL_TEXTURE */
- { 33019, 0x000084C0 }, /* GL_TEXTURE0 */
- { 33031, 0x000084C0 }, /* GL_TEXTURE0_ARB */
- { 33047, 0x000084C1 }, /* GL_TEXTURE1 */
- { 33059, 0x000084CA }, /* GL_TEXTURE10 */
- { 33072, 0x000084CA }, /* GL_TEXTURE10_ARB */
- { 33089, 0x000084CB }, /* GL_TEXTURE11 */
- { 33102, 0x000084CB }, /* GL_TEXTURE11_ARB */
- { 33119, 0x000084CC }, /* GL_TEXTURE12 */
- { 33132, 0x000084CC }, /* GL_TEXTURE12_ARB */
- { 33149, 0x000084CD }, /* GL_TEXTURE13 */
- { 33162, 0x000084CD }, /* GL_TEXTURE13_ARB */
- { 33179, 0x000084CE }, /* GL_TEXTURE14 */
- { 33192, 0x000084CE }, /* GL_TEXTURE14_ARB */
- { 33209, 0x000084CF }, /* GL_TEXTURE15 */
- { 33222, 0x000084CF }, /* GL_TEXTURE15_ARB */
- { 33239, 0x000084D0 }, /* GL_TEXTURE16 */
- { 33252, 0x000084D0 }, /* GL_TEXTURE16_ARB */
- { 33269, 0x000084D1 }, /* GL_TEXTURE17 */
- { 33282, 0x000084D1 }, /* GL_TEXTURE17_ARB */
- { 33299, 0x000084D2 }, /* GL_TEXTURE18 */
- { 33312, 0x000084D2 }, /* GL_TEXTURE18_ARB */
- { 33329, 0x000084D3 }, /* GL_TEXTURE19 */
- { 33342, 0x000084D3 }, /* GL_TEXTURE19_ARB */
- { 33359, 0x000084C1 }, /* GL_TEXTURE1_ARB */
- { 33375, 0x000084C2 }, /* GL_TEXTURE2 */
- { 33387, 0x000084D4 }, /* GL_TEXTURE20 */
- { 33400, 0x000084D4 }, /* GL_TEXTURE20_ARB */
- { 33417, 0x000084D5 }, /* GL_TEXTURE21 */
- { 33430, 0x000084D5 }, /* GL_TEXTURE21_ARB */
- { 33447, 0x000084D6 }, /* GL_TEXTURE22 */
- { 33460, 0x000084D6 }, /* GL_TEXTURE22_ARB */
- { 33477, 0x000084D7 }, /* GL_TEXTURE23 */
- { 33490, 0x000084D7 }, /* GL_TEXTURE23_ARB */
- { 33507, 0x000084D8 }, /* GL_TEXTURE24 */
- { 33520, 0x000084D8 }, /* GL_TEXTURE24_ARB */
- { 33537, 0x000084D9 }, /* GL_TEXTURE25 */
- { 33550, 0x000084D9 }, /* GL_TEXTURE25_ARB */
- { 33567, 0x000084DA }, /* GL_TEXTURE26 */
- { 33580, 0x000084DA }, /* GL_TEXTURE26_ARB */
- { 33597, 0x000084DB }, /* GL_TEXTURE27 */
- { 33610, 0x000084DB }, /* GL_TEXTURE27_ARB */
- { 33627, 0x000084DC }, /* GL_TEXTURE28 */
- { 33640, 0x000084DC }, /* GL_TEXTURE28_ARB */
- { 33657, 0x000084DD }, /* GL_TEXTURE29 */
- { 33670, 0x000084DD }, /* GL_TEXTURE29_ARB */
- { 33687, 0x000084C2 }, /* GL_TEXTURE2_ARB */
- { 33703, 0x000084C3 }, /* GL_TEXTURE3 */
- { 33715, 0x000084DE }, /* GL_TEXTURE30 */
- { 33728, 0x000084DE }, /* GL_TEXTURE30_ARB */
- { 33745, 0x000084DF }, /* GL_TEXTURE31 */
- { 33758, 0x000084DF }, /* GL_TEXTURE31_ARB */
- { 33775, 0x000084C3 }, /* GL_TEXTURE3_ARB */
- { 33791, 0x000084C4 }, /* GL_TEXTURE4 */
- { 33803, 0x000084C4 }, /* GL_TEXTURE4_ARB */
- { 33819, 0x000084C5 }, /* GL_TEXTURE5 */
- { 33831, 0x000084C5 }, /* GL_TEXTURE5_ARB */
- { 33847, 0x000084C6 }, /* GL_TEXTURE6 */
- { 33859, 0x000084C6 }, /* GL_TEXTURE6_ARB */
- { 33875, 0x000084C7 }, /* GL_TEXTURE7 */
- { 33887, 0x000084C7 }, /* GL_TEXTURE7_ARB */
- { 33903, 0x000084C8 }, /* GL_TEXTURE8 */
- { 33915, 0x000084C8 }, /* GL_TEXTURE8_ARB */
- { 33931, 0x000084C9 }, /* GL_TEXTURE9 */
- { 33943, 0x000084C9 }, /* GL_TEXTURE9_ARB */
- { 33959, 0x00000DE0 }, /* GL_TEXTURE_1D */
- { 33973, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
- { 33997, 0x00000DE1 }, /* GL_TEXTURE_2D */
- { 34011, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
- { 34035, 0x0000806F }, /* GL_TEXTURE_3D */
- { 34049, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
- { 34071, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
- { 34097, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
- { 34119, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
- { 34141, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
- { 34173, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
- { 34195, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
- { 34227, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
- { 34249, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
- { 34277, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
- { 34309, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
- { 34342, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
- { 34374, 0x00040000 }, /* GL_TEXTURE_BIT */
- { 34389, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
- { 34410, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
- { 34435, 0x00001005 }, /* GL_TEXTURE_BORDER */
- { 34453, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
- { 34477, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
- { 34508, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
- { 34538, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
- { 34568, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
- { 34603, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
- { 34634, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- { 34672, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
- { 34699, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
- { 34731, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
- { 34765, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
- { 34789, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
- { 34817, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
- { 34841, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
- { 34869, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
- { 34902, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
- { 34926, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
- { 34948, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
- { 34970, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
- { 34996, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
- { 35030, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
- { 35063, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
- { 35100, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
- { 35128, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
- { 35160, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
- { 35183, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
- { 35221, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
- { 35263, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
- { 35294, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
- { 35322, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
- { 35352, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
- { 35380, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
- { 35400, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
- { 35424, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
- { 35455, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
- { 35490, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
- { 35521, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
- { 35556, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
- { 35587, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
- { 35622, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
- { 35653, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
- { 35688, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
- { 35719, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
- { 35754, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
- { 35785, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
- { 35820, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
- { 35849, 0x00008071 }, /* GL_TEXTURE_DEPTH */
- { 35866, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
- { 35888, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
- { 35914, 0x00002300 }, /* GL_TEXTURE_ENV */
- { 35929, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
- { 35950, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
- { 35970, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
- { 35996, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
- { 36016, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
- { 36033, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
- { 36050, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
- { 36067, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
- { 36084, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
- { 36109, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
- { 36131, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
- { 36157, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
- { 36175, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
- { 36201, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
- { 36227, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
- { 36257, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
- { 36284, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
- { 36309, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
- { 36329, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
- { 36353, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
- { 36380, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
- { 36407, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
- { 36434, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
- { 36460, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
- { 36490, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
- { 36512, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
- { 36530, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
- { 36560, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
- { 36588, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
- { 36616, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
- { 36644, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
- { 36665, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
- { 36684, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
- { 36706, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
- { 36725, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
- { 36745, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
- { 36775, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */
- { 36806, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
- { 36831, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
- { 36855, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
- { 36875, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
- { 36899, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
- { 36919, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
- { 36942, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */
- { 36966, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */
- { 36996, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
- { 37021, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
- { 37055, 0x00001000 }, /* GL_TEXTURE_WIDTH */
- { 37072, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
- { 37090, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
- { 37108, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
- { 37126, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */
- { 37145, 0xFFFFFFFFFFFFFFFF }, /* GL_TIMEOUT_IGNORED */
- { 37164, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
- { 37184, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
- { 37203, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- { 37232, 0x00001000 }, /* GL_TRANSFORM_BIT */
- { 37249, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
- { 37275, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
- { 37305, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- { 37337, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- { 37367, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
- { 37401, 0x0000862C }, /* GL_TRANSPOSE_NV */
- { 37417, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- { 37448, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
- { 37483, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- { 37511, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
- { 37543, 0x00000004 }, /* GL_TRIANGLES */
- { 37556, 0x00000006 }, /* GL_TRIANGLE_FAN */
- { 37572, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
- { 37593, 0x00000005 }, /* GL_TRIANGLE_STRIP */
- { 37611, 0x00000001 }, /* GL_TRUE */
- { 37619, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
- { 37639, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
- { 37662, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
- { 37682, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
- { 37703, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
- { 37725, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
- { 37747, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
- { 37767, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
- { 37788, 0x00009118 }, /* GL_UNSIGNALED */
- { 37802, 0x00001401 }, /* GL_UNSIGNED_BYTE */
- { 37819, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- { 37846, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
- { 37869, 0x00001405 }, /* GL_UNSIGNED_INT */
- { 37885, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
- { 37912, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
- { 37933, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
- { 37957, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- { 37988, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
- { 38012, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- { 38040, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
- { 38063, 0x00001403 }, /* GL_UNSIGNED_SHORT */
- { 38081, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- { 38111, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- { 38137, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- { 38167, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- { 38193, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
- { 38217, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- { 38245, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- { 38273, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
- { 38300, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- { 38332, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
- { 38363, 0x00008CA2 }, /* GL_UPPER_LEFT */
- { 38377, 0x00002A20 }, /* GL_V2F */
- { 38384, 0x00002A21 }, /* GL_V3F */
- { 38391, 0x00008B83 }, /* GL_VALIDATE_STATUS */
- { 38410, 0x00001F00 }, /* GL_VENDOR */
- { 38420, 0x00001F02 }, /* GL_VERSION */
- { 38431, 0x00008074 }, /* GL_VERTEX_ARRAY */
- { 38447, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
- { 38471, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
- { 38501, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- { 38532, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
- { 38567, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
- { 38591, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
- { 38612, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
- { 38635, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
- { 38656, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- { 38683, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- { 38711, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- { 38739, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- { 38767, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- { 38795, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- { 38823, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- { 38851, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- { 38878, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- { 38905, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- { 38932, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- { 38959, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- { 38986, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- { 39013, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- { 39040, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- { 39067, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- { 39094, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- { 39132, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
- { 39174, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- { 39205, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
- { 39240, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
- { 39274, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
- { 39312, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- { 39343, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
- { 39378, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- { 39406, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
- { 39438, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- { 39468, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
- { 39502, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
- { 39530, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
- { 39562, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
- { 39582, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
- { 39604, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
- { 39633, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
- { 39654, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- { 39683, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
- { 39716, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
- { 39748, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- { 39775, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
- { 39806, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
- { 39836, 0x00008B31 }, /* GL_VERTEX_SHADER */
- { 39853, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
- { 39874, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
- { 39901, 0x00000BA2 }, /* GL_VIEWPORT */
- { 39913, 0x00000800 }, /* GL_VIEWPORT_BIT */
- { 39929, 0x0000911D }, /* GL_WAIT_FAILED */
- { 39944, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
- { 39964, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- { 39995, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
- { 40030, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- { 40058, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- { 40083, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- { 40110, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- { 40135, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
- { 40159, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
- { 40178, 0x000088B9 }, /* GL_WRITE_ONLY */
- { 40192, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
- { 40210, 0x00001506 }, /* GL_XOR */
- { 40217, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
- { 40236, 0x00008757 }, /* GL_YCBCR_MESA */
- { 40250, 0x00000000 }, /* GL_ZERO */
- { 40258, 0x00000D16 }, /* GL_ZOOM_X */
- { 40268, 0x00000D17 }, /* GL_ZOOM_Y */
+ { 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 */
};
static const unsigned reduced_enums[1347] =
{
- 475, /* GL_FALSE */
- 691, /* GL_LINES */
- 693, /* GL_LINE_LOOP */
- 700, /* GL_LINE_STRIP */
- 1743, /* GL_TRIANGLES */
- 1746, /* GL_TRIANGLE_STRIP */
- 1744, /* GL_TRIANGLE_FAN */
- 1271, /* GL_QUADS */
- 1274, /* GL_QUAD_STRIP */
- 1158, /* GL_POLYGON */
- 1170, /* GL_POLYGON_STIPPLE_BIT */
- 1119, /* GL_PIXEL_MODE_BIT */
- 678, /* GL_LIGHTING_BIT */
- 504, /* GL_FOG_BIT */
+ 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 */
8, /* GL_ACCUM */
- 710, /* GL_LOAD */
- 1326, /* GL_RETURN */
- 991, /* GL_MULT */
+ 713, /* GL_LOAD */
+ 1331, /* GL_RETURN */
+ 994, /* GL_MULT */
23, /* GL_ADD */
- 1007, /* GL_NEVER */
- 668, /* GL_LESS */
- 465, /* GL_EQUAL */
- 667, /* GL_LEQUAL */
- 590, /* GL_GREATER */
- 1022, /* GL_NOTEQUAL */
- 589, /* GL_GEQUAL */
+ 1010, /* GL_NEVER */
+ 671, /* GL_LESS */
+ 466, /* GL_EQUAL */
+ 670, /* GL_LEQUAL */
+ 592, /* GL_GREATER */
+ 1025, /* GL_NOTEQUAL */
+ 591, /* GL_GEQUAL */
47, /* GL_ALWAYS */
- 1467, /* GL_SRC_COLOR */
- 1052, /* GL_ONE_MINUS_SRC_COLOR */
- 1465, /* GL_SRC_ALPHA */
- 1051, /* GL_ONE_MINUS_SRC_ALPHA */
- 444, /* GL_DST_ALPHA */
- 1049, /* GL_ONE_MINUS_DST_ALPHA */
- 445, /* GL_DST_COLOR */
- 1050, /* GL_ONE_MINUS_DST_COLOR */
- 1466, /* GL_SRC_ALPHA_SATURATE */
- 577, /* GL_FRONT_LEFT */
- 578, /* GL_FRONT_RIGHT */
+ 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 */
69, /* GL_BACK_LEFT */
70, /* GL_BACK_RIGHT */
- 574, /* GL_FRONT */
+ 576, /* GL_FRONT */
68, /* GL_BACK */
- 666, /* GL_LEFT */
- 1368, /* GL_RIGHT */
- 575, /* GL_FRONT_AND_BACK */
+ 669, /* GL_LEFT */
+ 1373, /* GL_RIGHT */
+ 577, /* GL_FRONT_AND_BACK */
63, /* GL_AUX0 */
64, /* GL_AUX1 */
65, /* GL_AUX2 */
66, /* GL_AUX3 */
- 656, /* GL_INVALID_ENUM */
- 660, /* GL_INVALID_VALUE */
- 659, /* GL_INVALID_OPERATION */
- 1472, /* GL_STACK_OVERFLOW */
- 1473, /* GL_STACK_UNDERFLOW */
- 1077, /* GL_OUT_OF_MEMORY */
- 657, /* GL_INVALID_FRAMEBUFFER_OPERATION */
+ 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 */
0, /* GL_2D */
2, /* GL_3D */
3, /* GL_3D_COLOR */
4, /* GL_3D_COLOR_TEXTURE */
6, /* GL_4D_COLOR_TEXTURE */
- 1097, /* GL_PASS_THROUGH_TOKEN */
- 1157, /* GL_POINT_TOKEN */
- 701, /* GL_LINE_TOKEN */
- 1171, /* GL_POLYGON_TOKEN */
+ 1100, /* GL_PASS_THROUGH_TOKEN */
+ 1160, /* GL_POINT_TOKEN */
+ 704, /* GL_LINE_TOKEN */
+ 1174, /* GL_POLYGON_TOKEN */
74, /* GL_BITMAP_TOKEN */
- 443, /* GL_DRAW_PIXEL_TOKEN */
+ 444, /* GL_DRAW_PIXEL_TOKEN */
301, /* GL_COPY_PIXEL_TOKEN */
- 694, /* GL_LINE_RESET_TOKEN */
- 468, /* GL_EXP */
- 469, /* GL_EXP2 */
+ 697, /* GL_LINE_RESET_TOKEN */
+ 469, /* GL_EXP */
+ 470, /* GL_EXP2 */
337, /* GL_CW */
125, /* GL_CCW */
146, /* GL_COEFF */
- 1074, /* GL_ORDER */
- 381, /* GL_DOMAIN */
+ 1077, /* GL_ORDER */
+ 382, /* GL_DOMAIN */
311, /* GL_CURRENT_COLOR */
314, /* GL_CURRENT_INDEX */
320, /* GL_CURRENT_NORMAL */
@@ -3844,519 +3854,519 @@ static const unsigned reduced_enums[1347] =
328, /* GL_CURRENT_RASTER_POSITION */
329, /* GL_CURRENT_RASTER_POSITION_VALID */
326, /* GL_CURRENT_RASTER_DISTANCE */
- 1150, /* GL_POINT_SMOOTH */
- 1139, /* GL_POINT_SIZE */
- 1149, /* GL_POINT_SIZE_RANGE */
- 1140, /* GL_POINT_SIZE_GRANULARITY */
- 695, /* GL_LINE_SMOOTH */
- 702, /* GL_LINE_WIDTH */
- 704, /* GL_LINE_WIDTH_RANGE */
- 703, /* GL_LINE_WIDTH_GRANULARITY */
- 697, /* GL_LINE_STIPPLE */
- 698, /* GL_LINE_STIPPLE_PATTERN */
- 699, /* GL_LINE_STIPPLE_REPEAT */
- 709, /* GL_LIST_MODE */
- 874, /* GL_MAX_LIST_NESTING */
- 706, /* GL_LIST_BASE */
- 708, /* GL_LIST_INDEX */
- 1160, /* GL_POLYGON_MODE */
- 1167, /* GL_POLYGON_SMOOTH */
- 1169, /* GL_POLYGON_STIPPLE */
- 454, /* GL_EDGE_FLAG */
+ 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 */
304, /* GL_CULL_FACE */
305, /* GL_CULL_FACE_MODE */
- 576, /* GL_FRONT_FACE */
- 677, /* GL_LIGHTING */
- 682, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
- 683, /* GL_LIGHT_MODEL_TWO_SIDE */
- 679, /* GL_LIGHT_MODEL_AMBIENT */
- 1414, /* GL_SHADE_MODEL */
+ 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 */
193, /* GL_COLOR_MATERIAL_FACE */
194, /* GL_COLOR_MATERIAL_PARAMETER */
192, /* GL_COLOR_MATERIAL */
- 503, /* GL_FOG */
- 525, /* GL_FOG_INDEX */
- 521, /* GL_FOG_DENSITY */
- 529, /* GL_FOG_START */
- 523, /* GL_FOG_END */
- 526, /* GL_FOG_MODE */
- 505, /* GL_FOG_COLOR */
- 368, /* GL_DEPTH_RANGE */
- 375, /* GL_DEPTH_TEST */
- 378, /* GL_DEPTH_WRITEMASK */
- 356, /* GL_DEPTH_CLEAR_VALUE */
- 367, /* GL_DEPTH_FUNC */
+ 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 */
12, /* GL_ACCUM_CLEAR_VALUE */
- 1508, /* GL_STENCIL_TEST */
- 1496, /* GL_STENCIL_CLEAR_VALUE */
- 1498, /* GL_STENCIL_FUNC */
- 1510, /* GL_STENCIL_VALUE_MASK */
- 1497, /* GL_STENCIL_FAIL */
- 1505, /* GL_STENCIL_PASS_DEPTH_FAIL */
- 1506, /* GL_STENCIL_PASS_DEPTH_PASS */
- 1507, /* GL_STENCIL_REF */
- 1511, /* GL_STENCIL_WRITEMASK */
- 843, /* GL_MATRIX_MODE */
- 1012, /* GL_NORMALIZE */
- 1837, /* GL_VIEWPORT */
- 986, /* GL_MODELVIEW_STACK_DEPTH */
- 1250, /* GL_PROJECTION_STACK_DEPTH */
- 1718, /* GL_TEXTURE_STACK_DEPTH */
- 984, /* GL_MODELVIEW_MATRIX */
- 1249, /* GL_PROJECTION_MATRIX */
- 1701, /* GL_TEXTURE_MATRIX */
+ 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 */
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 */
- 380, /* GL_DITHER */
+ 381, /* GL_DITHER */
78, /* GL_BLEND_DST */
87, /* GL_BLEND_SRC */
75, /* GL_BLEND */
- 712, /* GL_LOGIC_OP_MODE */
- 630, /* GL_INDEX_LOGIC_OP */
+ 715, /* GL_LOGIC_OP_MODE */
+ 632, /* GL_INDEX_LOGIC_OP */
191, /* GL_COLOR_LOGIC_OP */
67, /* GL_AUX_BUFFERS */
- 391, /* GL_DRAW_BUFFER */
- 1284, /* GL_READ_BUFFER */
- 1395, /* GL_SCISSOR_BOX */
- 1396, /* GL_SCISSOR_TEST */
- 629, /* GL_INDEX_CLEAR_VALUE */
- 634, /* GL_INDEX_WRITEMASK */
+ 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 */
188, /* GL_COLOR_CLEAR_VALUE */
230, /* GL_COLOR_WRITEMASK */
- 631, /* GL_INDEX_MODE */
- 1361, /* GL_RGBA_MODE */
- 390, /* GL_DOUBLEBUFFER */
- 1512, /* GL_STEREO */
- 1319, /* GL_RENDER_MODE */
- 1098, /* GL_PERSPECTIVE_CORRECTION_HINT */
- 1151, /* GL_POINT_SMOOTH_HINT */
- 696, /* GL_LINE_SMOOTH_HINT */
- 1168, /* GL_POLYGON_SMOOTH_HINT */
- 524, /* GL_FOG_HINT */
- 1682, /* GL_TEXTURE_GEN_S */
- 1683, /* GL_TEXTURE_GEN_T */
- 1681, /* GL_TEXTURE_GEN_R */
- 1680, /* GL_TEXTURE_GEN_Q */
- 1111, /* GL_PIXEL_MAP_I_TO_I */
- 1117, /* GL_PIXEL_MAP_S_TO_S */
- 1113, /* GL_PIXEL_MAP_I_TO_R */
- 1109, /* GL_PIXEL_MAP_I_TO_G */
- 1107, /* GL_PIXEL_MAP_I_TO_B */
- 1105, /* GL_PIXEL_MAP_I_TO_A */
- 1115, /* GL_PIXEL_MAP_R_TO_R */
- 1103, /* GL_PIXEL_MAP_G_TO_G */
- 1101, /* GL_PIXEL_MAP_B_TO_B */
- 1099, /* GL_PIXEL_MAP_A_TO_A */
- 1112, /* GL_PIXEL_MAP_I_TO_I_SIZE */
- 1118, /* GL_PIXEL_MAP_S_TO_S_SIZE */
- 1114, /* GL_PIXEL_MAP_I_TO_R_SIZE */
- 1110, /* GL_PIXEL_MAP_I_TO_G_SIZE */
- 1108, /* GL_PIXEL_MAP_I_TO_B_SIZE */
- 1106, /* GL_PIXEL_MAP_I_TO_A_SIZE */
- 1116, /* GL_PIXEL_MAP_R_TO_R_SIZE */
- 1104, /* GL_PIXEL_MAP_G_TO_G_SIZE */
- 1102, /* GL_PIXEL_MAP_B_TO_B_SIZE */
- 1100, /* GL_PIXEL_MAP_A_TO_A_SIZE */
- 1755, /* GL_UNPACK_SWAP_BYTES */
- 1750, /* GL_UNPACK_LSB_FIRST */
- 1751, /* GL_UNPACK_ROW_LENGTH */
- 1754, /* GL_UNPACK_SKIP_ROWS */
- 1753, /* GL_UNPACK_SKIP_PIXELS */
- 1748, /* GL_UNPACK_ALIGNMENT */
- 1086, /* GL_PACK_SWAP_BYTES */
- 1081, /* GL_PACK_LSB_FIRST */
- 1082, /* GL_PACK_ROW_LENGTH */
- 1085, /* GL_PACK_SKIP_ROWS */
- 1084, /* GL_PACK_SKIP_PIXELS */
- 1078, /* GL_PACK_ALIGNMENT */
- 790, /* GL_MAP_COLOR */
- 795, /* GL_MAP_STENCIL */
- 633, /* GL_INDEX_SHIFT */
- 632, /* GL_INDEX_OFFSET */
- 1297, /* GL_RED_SCALE */
- 1295, /* GL_RED_BIAS */
- 1855, /* GL_ZOOM_X */
- 1856, /* GL_ZOOM_Y */
- 594, /* GL_GREEN_SCALE */
- 592, /* GL_GREEN_BIAS */
+ 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 */
93, /* GL_BLUE_SCALE */
91, /* GL_BLUE_BIAS */
42, /* GL_ALPHA_SCALE */
40, /* GL_ALPHA_BIAS */
- 369, /* GL_DEPTH_SCALE */
+ 370, /* GL_DEPTH_SCALE */
350, /* GL_DEPTH_BIAS */
- 869, /* GL_MAX_EVAL_ORDER */
- 873, /* GL_MAX_LIGHTS */
- 852, /* GL_MAX_CLIP_PLANES */
- 919, /* GL_MAX_TEXTURE_SIZE */
- 879, /* GL_MAX_PIXEL_MAP_TABLE */
- 848, /* GL_MAX_ATTRIB_STACK_DEPTH */
- 876, /* GL_MAX_MODELVIEW_STACK_DEPTH */
- 877, /* GL_MAX_NAME_STACK_DEPTH */
- 905, /* GL_MAX_PROJECTION_STACK_DEPTH */
- 920, /* GL_MAX_TEXTURE_STACK_DEPTH */
- 934, /* GL_MAX_VIEWPORT_DIMS */
- 849, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
- 1522, /* GL_SUBPIXEL_BITS */
- 628, /* GL_INDEX_BITS */
- 1296, /* GL_RED_BITS */
- 593, /* GL_GREEN_BITS */
+ 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 */
92, /* GL_BLUE_BITS */
41, /* GL_ALPHA_BITS */
351, /* GL_DEPTH_BITS */
- 1494, /* GL_STENCIL_BITS */
+ 1499, /* GL_STENCIL_BITS */
14, /* GL_ACCUM_RED_BITS */
13, /* GL_ACCUM_GREEN_BITS */
10, /* GL_ACCUM_BLUE_BITS */
9, /* GL_ACCUM_ALPHA_BITS */
- 1000, /* GL_NAME_STACK_DEPTH */
+ 1003, /* GL_NAME_STACK_DEPTH */
62, /* GL_AUTO_NORMAL */
- 736, /* GL_MAP1_COLOR_4 */
- 739, /* GL_MAP1_INDEX */
- 740, /* GL_MAP1_NORMAL */
- 741, /* GL_MAP1_TEXTURE_COORD_1 */
- 742, /* GL_MAP1_TEXTURE_COORD_2 */
- 743, /* GL_MAP1_TEXTURE_COORD_3 */
- 744, /* GL_MAP1_TEXTURE_COORD_4 */
- 745, /* GL_MAP1_VERTEX_3 */
- 746, /* GL_MAP1_VERTEX_4 */
- 763, /* GL_MAP2_COLOR_4 */
- 766, /* GL_MAP2_INDEX */
- 767, /* GL_MAP2_NORMAL */
- 768, /* GL_MAP2_TEXTURE_COORD_1 */
- 769, /* GL_MAP2_TEXTURE_COORD_2 */
- 770, /* GL_MAP2_TEXTURE_COORD_3 */
- 771, /* GL_MAP2_TEXTURE_COORD_4 */
- 772, /* GL_MAP2_VERTEX_3 */
- 773, /* GL_MAP2_VERTEX_4 */
- 737, /* GL_MAP1_GRID_DOMAIN */
- 738, /* GL_MAP1_GRID_SEGMENTS */
- 764, /* GL_MAP2_GRID_DOMAIN */
- 765, /* GL_MAP2_GRID_SEGMENTS */
- 1605, /* GL_TEXTURE_1D */
- 1607, /* GL_TEXTURE_2D */
- 478, /* GL_FEEDBACK_BUFFER_POINTER */
- 479, /* GL_FEEDBACK_BUFFER_SIZE */
- 480, /* GL_FEEDBACK_BUFFER_TYPE */
- 1405, /* GL_SELECTION_BUFFER_POINTER */
- 1406, /* GL_SELECTION_BUFFER_SIZE */
- 1723, /* GL_TEXTURE_WIDTH */
- 1687, /* GL_TEXTURE_HEIGHT */
- 1642, /* GL_TEXTURE_COMPONENTS */
- 1626, /* GL_TEXTURE_BORDER_COLOR */
- 1625, /* GL_TEXTURE_BORDER */
- 382, /* GL_DONT_CARE */
- 476, /* GL_FASTEST */
- 1008, /* GL_NICEST */
+ 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 */
48, /* GL_AMBIENT */
- 379, /* GL_DIFFUSE */
- 1454, /* GL_SPECULAR */
- 1172, /* GL_POSITION */
- 1457, /* GL_SPOT_DIRECTION */
- 1458, /* GL_SPOT_EXPONENT */
- 1456, /* GL_SPOT_CUTOFF */
+ 380, /* GL_DIFFUSE */
+ 1459, /* GL_SPECULAR */
+ 1175, /* GL_POSITION */
+ 1462, /* GL_SPOT_DIRECTION */
+ 1463, /* GL_SPOT_EXPONENT */
+ 1461, /* GL_SPOT_CUTOFF */
275, /* GL_CONSTANT_ATTENUATION */
- 686, /* GL_LINEAR_ATTENUATION */
- 1270, /* GL_QUADRATIC_ATTENUATION */
+ 689, /* GL_LINEAR_ATTENUATION */
+ 1274, /* GL_QUADRATIC_ATTENUATION */
244, /* GL_COMPILE */
245, /* GL_COMPILE_AND_EXECUTE */
120, /* GL_BYTE */
- 1757, /* GL_UNSIGNED_BYTE */
- 1419, /* GL_SHORT */
- 1768, /* GL_UNSIGNED_SHORT */
- 636, /* GL_INT */
- 1760, /* GL_UNSIGNED_INT */
- 484, /* GL_FLOAT */
+ 1762, /* GL_UNSIGNED_BYTE */
+ 1424, /* GL_SHORT */
+ 1773, /* GL_UNSIGNED_SHORT */
+ 638, /* GL_INT */
+ 1765, /* GL_UNSIGNED_INT */
+ 486, /* GL_FLOAT */
1, /* GL_2_BYTES */
5, /* GL_3_BYTES */
7, /* GL_4_BYTES */
- 389, /* GL_DOUBLE */
+ 390, /* GL_DOUBLE */
132, /* GL_CLEAR */
50, /* GL_AND */
52, /* GL_AND_REVERSE */
299, /* GL_COPY */
51, /* GL_AND_INVERTED */
- 1010, /* GL_NOOP */
- 1851, /* GL_XOR */
- 1073, /* GL_OR */
- 1011, /* GL_NOR */
- 466, /* GL_EQUIV */
- 663, /* GL_INVERT */
- 1076, /* GL_OR_REVERSE */
+ 1013, /* GL_NOOP */
+ 1856, /* GL_XOR */
+ 1076, /* GL_OR */
+ 1014, /* GL_NOR */
+ 467, /* GL_EQUIV */
+ 665, /* GL_INVERT */
+ 1079, /* GL_OR_REVERSE */
300, /* GL_COPY_INVERTED */
- 1075, /* GL_OR_INVERTED */
- 1001, /* GL_NAND */
- 1410, /* GL_SET */
- 463, /* GL_EMISSION */
- 1418, /* GL_SHININESS */
+ 1078, /* GL_OR_INVERTED */
+ 1004, /* GL_NAND */
+ 1415, /* GL_SET */
+ 464, /* GL_EMISSION */
+ 1423, /* GL_SHININESS */
49, /* GL_AMBIENT_AND_DIFFUSE */
190, /* GL_COLOR_INDEXES */
- 951, /* GL_MODELVIEW */
- 1248, /* GL_PROJECTION */
- 1540, /* GL_TEXTURE */
+ 954, /* GL_MODELVIEW */
+ 1251, /* GL_PROJECTION */
+ 1545, /* GL_TEXTURE */
147, /* GL_COLOR */
346, /* GL_DEPTH */
- 1480, /* GL_STENCIL */
+ 1485, /* GL_STENCIL */
189, /* GL_COLOR_INDEX */
- 1499, /* GL_STENCIL_INDEX */
- 357, /* GL_DEPTH_COMPONENT */
- 1292, /* GL_RED */
- 591, /* GL_GREEN */
+ 1504, /* GL_STENCIL_INDEX */
+ 358, /* GL_DEPTH_COMPONENT */
+ 1297, /* GL_RED */
+ 593, /* GL_GREEN */
90, /* GL_BLUE */
31, /* GL_ALPHA */
- 1327, /* GL_RGB */
- 1346, /* GL_RGBA */
- 714, /* GL_LUMINANCE */
- 735, /* GL_LUMINANCE_ALPHA */
+ 1332, /* GL_RGB */
+ 1351, /* GL_RGBA */
+ 717, /* GL_LUMINANCE */
+ 738, /* GL_LUMINANCE_ALPHA */
73, /* GL_BITMAP */
- 1128, /* GL_POINT */
- 684, /* GL_LINE */
- 481, /* GL_FILL */
- 1301, /* GL_RENDER */
- 477, /* GL_FEEDBACK */
- 1404, /* GL_SELECT */
- 483, /* GL_FLAT */
- 1429, /* GL_SMOOTH */
- 664, /* GL_KEEP */
- 1321, /* GL_REPLACE */
- 618, /* GL_INCR */
+ 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 */
342, /* GL_DECR */
- 1783, /* GL_VENDOR */
- 1318, /* GL_RENDERER */
- 1784, /* GL_VERSION */
- 470, /* GL_EXTENSIONS */
- 1369, /* GL_S */
- 1531, /* GL_T */
- 1281, /* GL_R */
- 1269, /* GL_Q */
- 987, /* GL_MODULATE */
+ 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 */
341, /* GL_DECAL */
- 1677, /* GL_TEXTURE_ENV_MODE */
- 1676, /* GL_TEXTURE_ENV_COLOR */
- 1675, /* GL_TEXTURE_ENV */
- 471, /* GL_EYE_LINEAR */
- 1034, /* GL_OBJECT_LINEAR */
- 1455, /* GL_SPHERE_MAP */
- 1679, /* GL_TEXTURE_GEN_MODE */
- 1036, /* GL_OBJECT_PLANE */
- 472, /* GL_EYE_PLANE */
- 1002, /* GL_NEAREST */
- 685, /* GL_LINEAR */
- 1006, /* GL_NEAREST_MIPMAP_NEAREST */
- 690, /* GL_LINEAR_MIPMAP_NEAREST */
- 1005, /* GL_NEAREST_MIPMAP_LINEAR */
- 689, /* GL_LINEAR_MIPMAP_LINEAR */
- 1700, /* GL_TEXTURE_MAG_FILTER */
- 1708, /* GL_TEXTURE_MIN_FILTER */
- 1725, /* GL_TEXTURE_WRAP_S */
- 1726, /* GL_TEXTURE_WRAP_T */
+ 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 */
126, /* GL_CLAMP */
- 1320, /* GL_REPEAT */
- 1166, /* GL_POLYGON_OFFSET_UNITS */
- 1165, /* GL_POLYGON_OFFSET_POINT */
- 1164, /* GL_POLYGON_OFFSET_LINE */
- 1282, /* GL_R3_G3_B2 */
- 1780, /* GL_V2F */
- 1781, /* GL_V3F */
+ 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 */
123, /* GL_C4UB_V2F */
124, /* GL_C4UB_V3F */
121, /* GL_C3F_V3F */
- 999, /* GL_N3F_V3F */
+ 1002, /* GL_N3F_V3F */
122, /* GL_C4F_N3F_V3F */
- 1536, /* GL_T2F_V3F */
- 1538, /* GL_T4F_V4F */
- 1534, /* GL_T2F_C4UB_V3F */
- 1532, /* GL_T2F_C3F_V3F */
- 1535, /* GL_T2F_N3F_V3F */
- 1533, /* GL_T2F_C4F_N3F_V3F */
- 1537, /* GL_T4F_C4F_N3F_V4F */
+ 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 */
139, /* GL_CLIP_PLANE0 */
140, /* GL_CLIP_PLANE1 */
141, /* GL_CLIP_PLANE2 */
142, /* GL_CLIP_PLANE3 */
143, /* GL_CLIP_PLANE4 */
144, /* GL_CLIP_PLANE5 */
- 669, /* GL_LIGHT0 */
- 670, /* GL_LIGHT1 */
- 671, /* GL_LIGHT2 */
- 672, /* GL_LIGHT3 */
- 673, /* GL_LIGHT4 */
- 674, /* GL_LIGHT5 */
- 675, /* GL_LIGHT6 */
- 676, /* GL_LIGHT7 */
- 595, /* GL_HINT_BIT */
+ 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 */
277, /* GL_CONSTANT_COLOR */
- 1047, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ 1050, /* GL_ONE_MINUS_CONSTANT_COLOR */
272, /* GL_CONSTANT_ALPHA */
- 1045, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ 1048, /* GL_ONE_MINUS_CONSTANT_ALPHA */
76, /* GL_BLEND_COLOR */
- 579, /* GL_FUNC_ADD */
- 935, /* GL_MIN */
- 845, /* GL_MAX */
+ 581, /* GL_FUNC_ADD */
+ 938, /* GL_MIN */
+ 848, /* GL_MAX */
81, /* GL_BLEND_EQUATION */
- 583, /* GL_FUNC_SUBTRACT */
- 581, /* GL_FUNC_REVERSE_SUBTRACT */
+ 585, /* GL_FUNC_SUBTRACT */
+ 583, /* GL_FUNC_REVERSE_SUBTRACT */
280, /* GL_CONVOLUTION_1D */
281, /* GL_CONVOLUTION_2D */
- 1407, /* GL_SEPARABLE_2D */
+ 1412, /* GL_SEPARABLE_2D */
284, /* GL_CONVOLUTION_BORDER_MODE */
288, /* GL_CONVOLUTION_FILTER_SCALE */
286, /* GL_CONVOLUTION_FILTER_BIAS */
- 1293, /* GL_REDUCE */
+ 1298, /* GL_REDUCE */
290, /* GL_CONVOLUTION_FORMAT */
294, /* GL_CONVOLUTION_WIDTH */
292, /* GL_CONVOLUTION_HEIGHT */
- 860, /* GL_MAX_CONVOLUTION_WIDTH */
- 858, /* GL_MAX_CONVOLUTION_HEIGHT */
- 1205, /* GL_POST_CONVOLUTION_RED_SCALE */
- 1201, /* GL_POST_CONVOLUTION_GREEN_SCALE */
- 1196, /* GL_POST_CONVOLUTION_BLUE_SCALE */
- 1192, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
- 1203, /* GL_POST_CONVOLUTION_RED_BIAS */
- 1199, /* GL_POST_CONVOLUTION_GREEN_BIAS */
- 1194, /* GL_POST_CONVOLUTION_BLUE_BIAS */
- 1190, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
- 596, /* GL_HISTOGRAM */
- 1253, /* GL_PROXY_HISTOGRAM */
- 612, /* GL_HISTOGRAM_WIDTH */
- 602, /* GL_HISTOGRAM_FORMAT */
- 608, /* GL_HISTOGRAM_RED_SIZE */
- 604, /* GL_HISTOGRAM_GREEN_SIZE */
- 599, /* GL_HISTOGRAM_BLUE_SIZE */
- 597, /* GL_HISTOGRAM_ALPHA_SIZE */
- 606, /* GL_HISTOGRAM_LUMINANCE_SIZE */
- 610, /* GL_HISTOGRAM_SINK */
- 936, /* GL_MINMAX */
- 938, /* GL_MINMAX_FORMAT */
- 940, /* GL_MINMAX_SINK */
- 1539, /* GL_TABLE_TOO_LARGE_EXT */
- 1759, /* GL_UNSIGNED_BYTE_3_3_2 */
- 1770, /* GL_UNSIGNED_SHORT_4_4_4_4 */
- 1772, /* GL_UNSIGNED_SHORT_5_5_5_1 */
- 1765, /* GL_UNSIGNED_INT_8_8_8_8 */
- 1761, /* GL_UNSIGNED_INT_10_10_10_2 */
- 1163, /* GL_POLYGON_OFFSET_FILL */
- 1162, /* GL_POLYGON_OFFSET_FACTOR */
- 1161, /* GL_POLYGON_OFFSET_BIAS */
- 1324, /* GL_RESCALE_NORMAL */
+ 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 */
36, /* GL_ALPHA4 */
38, /* GL_ALPHA8 */
32, /* GL_ALPHA12 */
34, /* GL_ALPHA16 */
- 725, /* GL_LUMINANCE4 */
- 731, /* GL_LUMINANCE8 */
- 715, /* GL_LUMINANCE12 */
- 721, /* GL_LUMINANCE16 */
- 726, /* GL_LUMINANCE4_ALPHA4 */
- 729, /* GL_LUMINANCE6_ALPHA2 */
- 732, /* GL_LUMINANCE8_ALPHA8 */
- 718, /* GL_LUMINANCE12_ALPHA4 */
- 716, /* GL_LUMINANCE12_ALPHA12 */
- 722, /* GL_LUMINANCE16_ALPHA16 */
- 637, /* GL_INTENSITY */
- 642, /* GL_INTENSITY4 */
- 644, /* GL_INTENSITY8 */
- 638, /* GL_INTENSITY12 */
- 640, /* GL_INTENSITY16 */
- 1336, /* GL_RGB2_EXT */
- 1337, /* GL_RGB4 */
- 1340, /* GL_RGB5 */
- 1344, /* GL_RGB8 */
- 1328, /* GL_RGB10 */
- 1332, /* GL_RGB12 */
- 1334, /* GL_RGB16 */
- 1351, /* GL_RGBA2 */
- 1353, /* GL_RGBA4 */
- 1341, /* GL_RGB5_A1 */
- 1357, /* GL_RGBA8 */
- 1329, /* GL_RGB10_A2 */
- 1347, /* GL_RGBA12 */
- 1349, /* GL_RGBA16 */
- 1715, /* GL_TEXTURE_RED_SIZE */
- 1685, /* GL_TEXTURE_GREEN_SIZE */
- 1623, /* GL_TEXTURE_BLUE_SIZE */
- 1610, /* GL_TEXTURE_ALPHA_SIZE */
- 1698, /* GL_TEXTURE_LUMINANCE_SIZE */
- 1689, /* GL_TEXTURE_INTENSITY_SIZE */
- 1322, /* GL_REPLACE_EXT */
- 1257, /* GL_PROXY_TEXTURE_1D */
- 1260, /* GL_PROXY_TEXTURE_2D */
- 1721, /* GL_TEXTURE_TOO_LARGE_EXT */
- 1710, /* GL_TEXTURE_PRIORITY */
- 1717, /* GL_TEXTURE_RESIDENT */
- 1613, /* GL_TEXTURE_BINDING_1D */
- 1615, /* GL_TEXTURE_BINDING_2D */
- 1617, /* GL_TEXTURE_BINDING_3D */
- 1083, /* GL_PACK_SKIP_IMAGES */
- 1079, /* GL_PACK_IMAGE_HEIGHT */
- 1752, /* GL_UNPACK_SKIP_IMAGES */
- 1749, /* GL_UNPACK_IMAGE_HEIGHT */
- 1609, /* GL_TEXTURE_3D */
- 1263, /* GL_PROXY_TEXTURE_3D */
- 1672, /* GL_TEXTURE_DEPTH */
- 1724, /* GL_TEXTURE_WRAP_R */
- 846, /* GL_MAX_3D_TEXTURE_SIZE */
- 1785, /* GL_VERTEX_ARRAY */
- 1013, /* GL_NORMAL_ARRAY */
+ 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 */
148, /* GL_COLOR_ARRAY */
- 622, /* GL_INDEX_ARRAY */
- 1650, /* GL_TEXTURE_COORD_ARRAY */
- 455, /* GL_EDGE_FLAG_ARRAY */
- 1791, /* GL_VERTEX_ARRAY_SIZE */
- 1793, /* GL_VERTEX_ARRAY_TYPE */
- 1792, /* GL_VERTEX_ARRAY_STRIDE */
- 1018, /* GL_NORMAL_ARRAY_TYPE */
- 1017, /* GL_NORMAL_ARRAY_STRIDE */
+ 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 */
152, /* GL_COLOR_ARRAY_SIZE */
154, /* GL_COLOR_ARRAY_TYPE */
153, /* GL_COLOR_ARRAY_STRIDE */
- 627, /* GL_INDEX_ARRAY_TYPE */
- 626, /* GL_INDEX_ARRAY_STRIDE */
- 1654, /* GL_TEXTURE_COORD_ARRAY_SIZE */
- 1656, /* GL_TEXTURE_COORD_ARRAY_TYPE */
- 1655, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
- 459, /* GL_EDGE_FLAG_ARRAY_STRIDE */
- 1790, /* GL_VERTEX_ARRAY_POINTER */
- 1016, /* GL_NORMAL_ARRAY_POINTER */
+ 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 */
151, /* GL_COLOR_ARRAY_POINTER */
- 625, /* GL_INDEX_ARRAY_POINTER */
- 1653, /* GL_TEXTURE_COORD_ARRAY_POINTER */
- 458, /* GL_EDGE_FLAG_ARRAY_POINTER */
- 992, /* GL_MULTISAMPLE */
- 1381, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
- 1383, /* GL_SAMPLE_ALPHA_TO_ONE */
- 1388, /* GL_SAMPLE_COVERAGE */
- 1385, /* GL_SAMPLE_BUFFERS */
- 1376, /* GL_SAMPLES */
- 1392, /* GL_SAMPLE_COVERAGE_VALUE */
- 1390, /* GL_SAMPLE_COVERAGE_INVERT */
+ 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 */
195, /* GL_COLOR_MATRIX */
197, /* GL_COLOR_MATRIX_STACK_DEPTH */
- 854, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
- 1188, /* GL_POST_COLOR_MATRIX_RED_SCALE */
- 1184, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
- 1179, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
- 1175, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
- 1186, /* GL_POST_COLOR_MATRIX_RED_BIAS */
- 1182, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
- 1177, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
- 1173, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
- 1633, /* GL_TEXTURE_COLOR_TABLE_SGI */
- 1264, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
- 1635, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ 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 */
80, /* GL_BLEND_DST_RGB */
89, /* GL_BLEND_SRC_RGB */
79, /* GL_BLEND_DST_ALPHA */
88, /* GL_BLEND_SRC_ALPHA */
201, /* GL_COLOR_TABLE */
- 1198, /* GL_POST_CONVOLUTION_COLOR_TABLE */
- 1181, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
- 1252, /* GL_PROXY_COLOR_TABLE */
- 1256, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
- 1255, /* GL_PROXY_POST_COLOR_MATRIX_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 */
225, /* GL_COLOR_TABLE_SCALE */
205, /* GL_COLOR_TABLE_BIAS */
210, /* GL_COLOR_TABLE_FORMAT */
@@ -4369,380 +4379,380 @@ static const unsigned reduced_enums[1347] =
216, /* GL_COLOR_TABLE_INTENSITY_SIZE */
71, /* GL_BGR */
72, /* GL_BGRA */
- 868, /* GL_MAX_ELEMENTS_VERTICES */
- 867, /* GL_MAX_ELEMENTS_INDICES */
- 1688, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ 871, /* GL_MAX_ELEMENTS_VERTICES */
+ 870, /* GL_MAX_ELEMENTS_INDICES */
+ 1693, /* GL_TEXTURE_INDEX_SIZE_EXT */
145, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
- 1145, /* GL_POINT_SIZE_MIN */
- 1141, /* GL_POINT_SIZE_MAX */
- 1135, /* GL_POINT_FADE_THRESHOLD_SIZE */
- 1131, /* GL_POINT_DISTANCE_ATTENUATION */
+ 1148, /* GL_POINT_SIZE_MIN */
+ 1144, /* GL_POINT_SIZE_MAX */
+ 1138, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ 1134, /* GL_POINT_DISTANCE_ATTENUATION */
127, /* GL_CLAMP_TO_BORDER */
130, /* GL_CLAMP_TO_EDGE */
- 1709, /* GL_TEXTURE_MIN_LOD */
- 1707, /* GL_TEXTURE_MAX_LOD */
- 1612, /* GL_TEXTURE_BASE_LEVEL */
- 1706, /* GL_TEXTURE_MAX_LEVEL */
- 615, /* GL_IGNORE_BORDER_HP */
+ 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 */
276, /* GL_CONSTANT_BORDER_HP */
- 1323, /* GL_REPLICATE_BORDER_HP */
+ 1328, /* GL_REPLICATE_BORDER_HP */
282, /* GL_CONVOLUTION_BORDER_COLOR */
- 1042, /* GL_OCCLUSION_TEST_HP */
- 1043, /* GL_OCCLUSION_TEST_RESULT_HP */
- 687, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
- 1627, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
- 1629, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
- 1631, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
- 1632, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- 1630, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
- 1628, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
- 850, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
- 851, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
- 1208, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
- 1210, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
- 1207, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
- 1209, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
- 1696, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
- 1697, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
- 1695, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
- 585, /* GL_GENERATE_MIPMAP */
- 586, /* GL_GENERATE_MIPMAP_HINT */
- 527, /* GL_FOG_OFFSET_SGIX */
- 528, /* GL_FOG_OFFSET_VALUE_SGIX */
- 1641, /* GL_TEXTURE_COMPARE_SGIX */
- 1640, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
- 1692, /* GL_TEXTURE_LEQUAL_R_SGIX */
- 1684, /* GL_TEXTURE_GEQUAL_R_SGIX */
- 358, /* GL_DEPTH_COMPONENT16 */
- 361, /* GL_DEPTH_COMPONENT24 */
- 364, /* GL_DEPTH_COMPONENT32 */
+ 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 */
306, /* GL_CULL_VERTEX_EXT */
308, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
307, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
- 1848, /* GL_WRAP_BORDER_SUN */
- 1634, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
- 680, /* GL_LIGHT_MODEL_COLOR_CONTROL */
- 1422, /* GL_SINGLE_COLOR */
- 1408, /* GL_SEPARATE_SPECULAR_COLOR */
- 1417, /* GL_SHARED_TEXTURE_PALETTE_EXT */
- 538, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
- 539, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
- 546, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
- 541, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
- 537, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
- 536, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
- 540, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
- 547, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
- 558, /* GL_FRAMEBUFFER_DEFAULT */
- 571, /* GL_FRAMEBUFFER_UNDEFINED */
- 371, /* GL_DEPTH_STENCIL_ATTACHMENT */
- 621, /* GL_INDEX */
- 1758, /* GL_UNSIGNED_BYTE_2_3_3_REV */
- 1773, /* GL_UNSIGNED_SHORT_5_6_5 */
- 1774, /* GL_UNSIGNED_SHORT_5_6_5_REV */
- 1771, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
- 1769, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
- 1766, /* GL_UNSIGNED_INT_8_8_8_8_REV */
- 1764, /* GL_UNSIGNED_INT_2_10_10_10_REV */
- 1704, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
- 1705, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
- 1703, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
- 943, /* GL_MIRRORED_REPEAT */
- 1364, /* GL_RGB_S3TC */
- 1339, /* GL_RGB4_S3TC */
- 1362, /* GL_RGBA_S3TC */
- 1356, /* GL_RGBA4_S3TC */
- 1360, /* GL_RGBA_DXT5_S3TC */
- 1354, /* GL_RGBA4_DXT5_S3TC */
+ 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 */
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 */
- 1004, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
- 1003, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
- 688, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
- 514, /* GL_FOG_COORDINATE_SOURCE */
- 506, /* GL_FOG_COORD */
- 530, /* GL_FRAGMENT_DEPTH */
+ 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 */
312, /* GL_CURRENT_FOG_COORD */
- 513, /* GL_FOG_COORDINATE_ARRAY_TYPE */
- 512, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
- 511, /* GL_FOG_COORDINATE_ARRAY_POINTER */
- 508, /* GL_FOG_COORDINATE_ARRAY */
+ 515, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+ 514, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+ 513, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+ 510, /* GL_FOG_COORDINATE_ARRAY */
199, /* GL_COLOR_SUM */
332, /* GL_CURRENT_SECONDARY_COLOR */
- 1401, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
- 1403, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
- 1402, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
- 1400, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
- 1397, /* GL_SECONDARY_COLOR_ARRAY */
+ 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 */
330, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
28, /* GL_ALIASED_POINT_SIZE_RANGE */
27, /* GL_ALIASED_LINE_WIDTH_RANGE */
- 1541, /* GL_TEXTURE0 */
- 1543, /* GL_TEXTURE1 */
- 1565, /* GL_TEXTURE2 */
- 1587, /* GL_TEXTURE3 */
- 1593, /* GL_TEXTURE4 */
- 1595, /* GL_TEXTURE5 */
- 1597, /* GL_TEXTURE6 */
- 1599, /* GL_TEXTURE7 */
- 1601, /* GL_TEXTURE8 */
- 1603, /* GL_TEXTURE9 */
- 1544, /* GL_TEXTURE10 */
- 1546, /* GL_TEXTURE11 */
- 1548, /* GL_TEXTURE12 */
- 1550, /* GL_TEXTURE13 */
- 1552, /* GL_TEXTURE14 */
- 1554, /* GL_TEXTURE15 */
- 1556, /* GL_TEXTURE16 */
- 1558, /* GL_TEXTURE17 */
- 1560, /* GL_TEXTURE18 */
- 1562, /* GL_TEXTURE19 */
- 1566, /* GL_TEXTURE20 */
- 1568, /* GL_TEXTURE21 */
- 1570, /* GL_TEXTURE22 */
- 1572, /* GL_TEXTURE23 */
- 1574, /* GL_TEXTURE24 */
- 1576, /* GL_TEXTURE25 */
- 1578, /* GL_TEXTURE26 */
- 1580, /* GL_TEXTURE27 */
- 1582, /* GL_TEXTURE28 */
- 1584, /* GL_TEXTURE29 */
- 1588, /* GL_TEXTURE30 */
- 1590, /* GL_TEXTURE31 */
+ 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 */
18, /* GL_ACTIVE_TEXTURE */
133, /* GL_CLIENT_ACTIVE_TEXTURE */
- 921, /* GL_MAX_TEXTURE_UNITS */
- 1736, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
- 1739, /* GL_TRANSPOSE_PROJECTION_MATRIX */
- 1741, /* GL_TRANSPOSE_TEXTURE_MATRIX */
- 1733, /* GL_TRANSPOSE_COLOR_MATRIX */
- 1523, /* GL_SUBTRACT */
- 908, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
+ 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 */
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 */
- 1648, /* GL_TEXTURE_COMPRESSION_HINT */
- 1713, /* GL_TEXTURE_RECTANGLE_ARB */
- 1620, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
- 1267, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
- 906, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
- 370, /* GL_DEPTH_STENCIL */
- 1762, /* GL_UNSIGNED_INT_24_8 */
- 917, /* GL_MAX_TEXTURE_LOD_BIAS */
- 1702, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
- 918, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
- 1678, /* GL_TEXTURE_FILTER_CONTROL */
- 1693, /* GL_TEXTURE_LOD_BIAS */
+ 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 */
232, /* GL_COMBINE4 */
- 911, /* GL_MAX_SHININESS_NV */
- 912, /* GL_MAX_SPOT_EXPONENT_NV */
- 619, /* GL_INCR_WRAP */
+ 914, /* GL_MAX_SHININESS_NV */
+ 915, /* GL_MAX_SPOT_EXPONENT_NV */
+ 621, /* GL_INCR_WRAP */
343, /* GL_DECR_WRAP */
- 963, /* GL_MODELVIEW1_ARB */
- 1019, /* GL_NORMAL_MAP */
- 1298, /* GL_REFLECTION_MAP */
- 1657, /* GL_TEXTURE_CUBE_MAP */
- 1618, /* GL_TEXTURE_BINDING_CUBE_MAP */
- 1665, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
- 1659, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
- 1667, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
- 1661, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
- 1669, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
- 1663, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
- 1265, /* GL_PROXY_TEXTURE_CUBE_MAP */
- 862, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
- 998, /* GL_MULTISAMPLE_FILTER_HINT_NV */
- 522, /* GL_FOG_DISTANCE_MODE_NV */
- 474, /* GL_EYE_RADIAL_NV */
- 473, /* GL_EYE_PLANE_ABSOLUTE_NV */
+ 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 */
231, /* GL_COMBINE */
238, /* GL_COMBINE_RGB */
233, /* GL_COMBINE_ALPHA */
- 1365, /* GL_RGB_SCALE */
+ 1370, /* GL_RGB_SCALE */
24, /* GL_ADD_SIGNED */
- 647, /* GL_INTERPOLATE */
+ 649, /* GL_INTERPOLATE */
271, /* GL_CONSTANT */
- 1214, /* GL_PRIMARY_COLOR */
- 1211, /* GL_PREVIOUS */
- 1437, /* GL_SOURCE0_RGB */
- 1443, /* GL_SOURCE1_RGB */
- 1449, /* GL_SOURCE2_RGB */
- 1453, /* GL_SOURCE3_RGB_NV */
- 1434, /* GL_SOURCE0_ALPHA */
- 1440, /* GL_SOURCE1_ALPHA */
- 1446, /* GL_SOURCE2_ALPHA */
- 1452, /* GL_SOURCE3_ALPHA_NV */
- 1056, /* GL_OPERAND0_RGB */
- 1062, /* GL_OPERAND1_RGB */
- 1068, /* GL_OPERAND2_RGB */
- 1072, /* GL_OPERAND3_RGB_NV */
- 1053, /* GL_OPERAND0_ALPHA */
- 1059, /* GL_OPERAND1_ALPHA */
- 1065, /* GL_OPERAND2_ALPHA */
- 1071, /* GL_OPERAND3_ALPHA_NV */
- 1786, /* GL_VERTEX_ARRAY_BINDING */
- 1711, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
- 1712, /* GL_TEXTURE_RANGE_POINTER_APPLE */
- 1852, /* GL_YCBCR_422_APPLE */
- 1775, /* GL_UNSIGNED_SHORT_8_8_APPLE */
- 1777, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
- 1720, /* GL_TEXTURE_STORAGE_HINT_APPLE */
- 1514, /* GL_STORAGE_PRIVATE_APPLE */
- 1513, /* GL_STORAGE_CACHED_APPLE */
- 1515, /* GL_STORAGE_SHARED_APPLE */
- 1424, /* GL_SLICE_ACCUM_SUN */
- 1273, /* GL_QUAD_MESH_SUN */
- 1745, /* GL_TRIANGLE_MESH_SUN */
- 1825, /* GL_VERTEX_PROGRAM_ARB */
- 1836, /* GL_VERTEX_STATE_PROGRAM_NV */
- 1812, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
- 1818, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
- 1820, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
- 1822, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ 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 */
334, /* GL_CURRENT_VERTEX_ATTRIB */
- 1227, /* GL_PROGRAM_LENGTH_ARB */
- 1241, /* GL_PROGRAM_STRING_ARB */
- 985, /* GL_MODELVIEW_PROJECTION_NV */
- 614, /* GL_IDENTITY_NV */
- 661, /* GL_INVERSE_NV */
- 1738, /* GL_TRANSPOSE_NV */
- 662, /* GL_INVERSE_TRANSPOSE_NV */
- 892, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
- 891, /* GL_MAX_PROGRAM_MATRICES_ARB */
- 799, /* GL_MATRIX0_NV */
- 811, /* GL_MATRIX1_NV */
- 823, /* GL_MATRIX2_NV */
- 827, /* GL_MATRIX3_NV */
- 829, /* GL_MATRIX4_NV */
- 831, /* GL_MATRIX5_NV */
- 833, /* GL_MATRIX6_NV */
- 835, /* GL_MATRIX7_NV */
+ 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 */
318, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
315, /* GL_CURRENT_MATRIX_ARB */
- 1828, /* GL_VERTEX_PROGRAM_POINT_SIZE */
- 1831, /* GL_VERTEX_PROGRAM_TWO_SIDE */
- 1239, /* GL_PROGRAM_PARAMETER_NV */
- 1816, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
- 1243, /* GL_PROGRAM_TARGET_NV */
- 1240, /* GL_PROGRAM_RESIDENT_NV */
- 1730, /* GL_TRACK_MATRIX_NV */
- 1731, /* GL_TRACK_MATRIX_TRANSFORM_NV */
- 1826, /* GL_VERTEX_PROGRAM_BINDING_NV */
- 1221, /* GL_PROGRAM_ERROR_POSITION_ARB */
- 355, /* GL_DEPTH_CLAMP_NV */
- 1794, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
- 1801, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
- 1802, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
- 1803, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
- 1804, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
- 1805, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
- 1806, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
- 1807, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
- 1808, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
- 1809, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
- 1795, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
- 1796, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
- 1797, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
- 1798, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
- 1799, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
- 1800, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
- 747, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
- 754, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
- 755, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
- 756, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
- 757, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
- 758, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
- 759, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
- 760, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
- 761, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
- 762, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
- 748, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
- 749, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
- 750, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
- 751, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
- 752, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
- 753, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
- 774, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
- 781, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
- 782, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
- 783, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
- 784, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
- 785, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
- 786, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
- 1220, /* GL_PROGRAM_BINDING_ARB */
- 788, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
- 789, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
- 775, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
- 776, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
- 777, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
- 778, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
- 779, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
- 780, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
- 1646, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
- 1643, /* GL_TEXTURE_COMPRESSED */
- 1024, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ 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 */
269, /* GL_COMPRESSED_TEXTURE_FORMATS */
- 933, /* GL_MAX_VERTEX_UNITS_ARB */
+ 936, /* GL_MAX_VERTEX_UNITS_ARB */
22, /* GL_ACTIVE_VERTEX_UNITS_ARB */
- 1847, /* GL_WEIGHT_SUM_UNITY_ARB */
- 1824, /* GL_VERTEX_BLEND_ARB */
+ 1852, /* GL_WEIGHT_SUM_UNITY_ARB */
+ 1829, /* GL_VERTEX_BLEND_ARB */
336, /* GL_CURRENT_WEIGHT_ARB */
- 1846, /* GL_WEIGHT_ARRAY_TYPE_ARB */
- 1845, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
- 1844, /* GL_WEIGHT_ARRAY_SIZE_ARB */
- 1843, /* GL_WEIGHT_ARRAY_POINTER_ARB */
- 1840, /* GL_WEIGHT_ARRAY_ARB */
- 383, /* GL_DOT3_RGB */
- 384, /* GL_DOT3_RGBA */
+ 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 */
263, /* GL_COMPRESSED_RGB_FXT1_3DFX */
258, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
- 993, /* GL_MULTISAMPLE_3DFX */
- 1386, /* GL_SAMPLE_BUFFERS_3DFX */
- 1377, /* GL_SAMPLES_3DFX */
- 974, /* GL_MODELVIEW2_ARB */
- 977, /* GL_MODELVIEW3_ARB */
- 978, /* GL_MODELVIEW4_ARB */
- 979, /* GL_MODELVIEW5_ARB */
- 980, /* GL_MODELVIEW6_ARB */
- 981, /* GL_MODELVIEW7_ARB */
- 982, /* GL_MODELVIEW8_ARB */
- 983, /* GL_MODELVIEW9_ARB */
- 953, /* GL_MODELVIEW10_ARB */
- 954, /* GL_MODELVIEW11_ARB */
- 955, /* GL_MODELVIEW12_ARB */
- 956, /* GL_MODELVIEW13_ARB */
- 957, /* GL_MODELVIEW14_ARB */
- 958, /* GL_MODELVIEW15_ARB */
- 959, /* GL_MODELVIEW16_ARB */
- 960, /* GL_MODELVIEW17_ARB */
- 961, /* GL_MODELVIEW18_ARB */
- 962, /* GL_MODELVIEW19_ARB */
- 964, /* GL_MODELVIEW20_ARB */
- 965, /* GL_MODELVIEW21_ARB */
- 966, /* GL_MODELVIEW22_ARB */
- 967, /* GL_MODELVIEW23_ARB */
- 968, /* GL_MODELVIEW24_ARB */
- 969, /* GL_MODELVIEW25_ARB */
- 970, /* GL_MODELVIEW26_ARB */
- 971, /* GL_MODELVIEW27_ARB */
- 972, /* GL_MODELVIEW28_ARB */
- 973, /* GL_MODELVIEW29_ARB */
- 975, /* GL_MODELVIEW30_ARB */
- 976, /* GL_MODELVIEW31_ARB */
- 388, /* GL_DOT3_RGB_EXT */
- 386, /* GL_DOT3_RGBA_EXT */
- 947, /* GL_MIRROR_CLAMP_EXT */
- 950, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
- 988, /* GL_MODULATE_ADD_ATI */
- 989, /* GL_MODULATE_SIGNED_ADD_ATI */
- 990, /* GL_MODULATE_SUBTRACT_ATI */
- 1853, /* GL_YCBCR_MESA */
- 1080, /* GL_PACK_INVERT_MESA */
+ 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 */
339, /* GL_DEBUG_OBJECT_MESA */
340, /* GL_DEBUG_PRINT_MESA */
338, /* GL_DEBUG_ASSERT_MESA */
@@ -4752,292 +4762,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 */
- 447, /* GL_DUDV_ATI */
- 446, /* GL_DU8DV8_ATI */
+ 448, /* GL_DUDV_ATI */
+ 447, /* GL_DU8DV8_ATI */
114, /* GL_BUMP_ENVMAP_ATI */
118, /* GL_BUMP_TARGET_ATI */
- 1485, /* GL_STENCIL_BACK_FUNC */
- 1483, /* GL_STENCIL_BACK_FAIL */
- 1487, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
- 1489, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
- 531, /* GL_FRAGMENT_PROGRAM_ARB */
- 1218, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
- 1246, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
- 1245, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
- 1230, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- 1236, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- 1235, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- 881, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
- 904, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
- 903, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
- 894, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
- 900, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
- 899, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
- 864, /* GL_MAX_DRAW_BUFFERS */
- 392, /* GL_DRAW_BUFFER0 */
- 395, /* GL_DRAW_BUFFER1 */
- 416, /* GL_DRAW_BUFFER2 */
- 419, /* GL_DRAW_BUFFER3 */
- 422, /* GL_DRAW_BUFFER4 */
- 425, /* GL_DRAW_BUFFER5 */
- 428, /* GL_DRAW_BUFFER6 */
- 431, /* GL_DRAW_BUFFER7 */
- 434, /* GL_DRAW_BUFFER8 */
- 437, /* GL_DRAW_BUFFER9 */
- 396, /* GL_DRAW_BUFFER10 */
- 399, /* GL_DRAW_BUFFER11 */
- 402, /* GL_DRAW_BUFFER12 */
- 405, /* GL_DRAW_BUFFER13 */
- 408, /* GL_DRAW_BUFFER14 */
- 411, /* GL_DRAW_BUFFER15 */
+ 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 */
82, /* GL_BLEND_EQUATION_ALPHA */
- 844, /* GL_MATRIX_PALETTE_ARB */
- 875, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
- 878, /* GL_MAX_PALETTE_MATRICES_ARB */
+ 847, /* GL_MATRIX_PALETTE_ARB */
+ 878, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ 881, /* GL_MAX_PALETTE_MATRICES_ARB */
321, /* GL_CURRENT_PALETTE_MATRIX_ARB */
- 838, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ 841, /* GL_MATRIX_INDEX_ARRAY_ARB */
316, /* GL_CURRENT_MATRIX_INDEX_ARB */
- 840, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
- 842, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
- 841, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
- 839, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
- 1673, /* GL_TEXTURE_DEPTH_SIZE */
- 376, /* GL_DEPTH_TEXTURE_MODE */
- 1638, /* GL_TEXTURE_COMPARE_MODE */
- 1636, /* GL_TEXTURE_COMPARE_FUNC */
+ 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 */
242, /* GL_COMPARE_R_TO_TEXTURE */
- 1152, /* GL_POINT_SPRITE */
+ 1155, /* GL_POINT_SPRITE */
296, /* GL_COORD_REPLACE */
- 1156, /* GL_POINT_SPRITE_R_MODE_NV */
- 1275, /* GL_QUERY_COUNTER_BITS */
+ 1159, /* GL_POINT_SPRITE_R_MODE_NV */
+ 1280, /* GL_QUERY_COUNTER_BITS */
323, /* GL_CURRENT_QUERY */
- 1277, /* GL_QUERY_RESULT */
- 1279, /* GL_QUERY_RESULT_AVAILABLE */
- 927, /* GL_MAX_VERTEX_ATTRIBS */
- 1814, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
- 374, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
- 373, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
- 913, /* GL_MAX_TEXTURE_COORDS */
- 915, /* GL_MAX_TEXTURE_IMAGE_UNITS */
- 1223, /* GL_PROGRAM_ERROR_STRING_ARB */
- 1225, /* GL_PROGRAM_FORMAT_ASCII_ARB */
- 1224, /* GL_PROGRAM_FORMAT_ARB */
- 1722, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ 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 */
53, /* GL_ARRAY_BUFFER */
- 460, /* GL_ELEMENT_ARRAY_BUFFER */
+ 461, /* GL_ELEMENT_ARRAY_BUFFER */
54, /* GL_ARRAY_BUFFER_BINDING */
- 461, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
- 1788, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
- 1014, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ 462, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+ 1793, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ 1017, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
149, /* GL_COLOR_ARRAY_BUFFER_BINDING */
- 623, /* GL_INDEX_ARRAY_BUFFER_BINDING */
- 1651, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
- 456, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
- 1398, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
- 509, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
- 1841, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
- 1810, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
- 1226, /* GL_PROGRAM_INSTRUCTIONS_ARB */
- 887, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
- 1232, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- 896, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
- 1244, /* GL_PROGRAM_TEMPORARIES_ARB */
- 902, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
- 1234, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
- 898, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
- 1238, /* GL_PROGRAM_PARAMETERS_ARB */
- 901, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
- 1233, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
- 897, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
- 1219, /* GL_PROGRAM_ATTRIBS_ARB */
- 882, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
- 1231, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
- 895, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
- 1217, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
- 880, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
- 1229, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- 893, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
- 888, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
- 884, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
- 1247, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
- 1735, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
- 1288, /* GL_READ_ONLY */
- 1849, /* GL_WRITE_ONLY */
- 1290, /* GL_READ_WRITE */
+ 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 */
102, /* GL_BUFFER_ACCESS */
105, /* GL_BUFFER_MAPPED */
107, /* GL_BUFFER_MAP_POINTER */
- 1729, /* GL_TIME_ELAPSED_EXT */
- 798, /* GL_MATRIX0_ARB */
- 810, /* GL_MATRIX1_ARB */
- 822, /* GL_MATRIX2_ARB */
- 826, /* GL_MATRIX3_ARB */
- 828, /* GL_MATRIX4_ARB */
- 830, /* GL_MATRIX5_ARB */
- 832, /* GL_MATRIX6_ARB */
- 834, /* GL_MATRIX7_ARB */
- 836, /* GL_MATRIX8_ARB */
- 837, /* GL_MATRIX9_ARB */
- 800, /* GL_MATRIX10_ARB */
- 801, /* GL_MATRIX11_ARB */
- 802, /* GL_MATRIX12_ARB */
- 803, /* GL_MATRIX13_ARB */
- 804, /* GL_MATRIX14_ARB */
- 805, /* GL_MATRIX15_ARB */
- 806, /* GL_MATRIX16_ARB */
- 807, /* GL_MATRIX17_ARB */
- 808, /* GL_MATRIX18_ARB */
- 809, /* GL_MATRIX19_ARB */
- 812, /* GL_MATRIX20_ARB */
- 813, /* GL_MATRIX21_ARB */
- 814, /* GL_MATRIX22_ARB */
- 815, /* GL_MATRIX23_ARB */
- 816, /* GL_MATRIX24_ARB */
- 817, /* GL_MATRIX25_ARB */
- 818, /* GL_MATRIX26_ARB */
- 819, /* GL_MATRIX27_ARB */
- 820, /* GL_MATRIX28_ARB */
- 821, /* GL_MATRIX29_ARB */
- 824, /* GL_MATRIX30_ARB */
- 825, /* GL_MATRIX31_ARB */
- 1518, /* GL_STREAM_DRAW */
- 1520, /* GL_STREAM_READ */
- 1516, /* GL_STREAM_COPY */
- 1476, /* GL_STATIC_DRAW */
- 1478, /* GL_STATIC_READ */
- 1474, /* GL_STATIC_COPY */
- 450, /* GL_DYNAMIC_DRAW */
- 452, /* GL_DYNAMIC_READ */
- 448, /* GL_DYNAMIC_COPY */
- 1120, /* GL_PIXEL_PACK_BUFFER */
- 1124, /* GL_PIXEL_UNPACK_BUFFER */
- 1121, /* GL_PIXEL_PACK_BUFFER_BINDING */
- 1125, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
+ 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 */
347, /* GL_DEPTH24_STENCIL8 */
- 1719, /* GL_TEXTURE_STENCIL_SIZE */
- 1671, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
- 883, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
- 886, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
- 890, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
- 889, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
- 847, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
- 1509, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ 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 */
17, /* GL_ACTIVE_STENCIL_FACE_EXT */
- 948, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
- 1379, /* GL_SAMPLES_PASSED */
+ 951, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ 1384, /* GL_SAMPLES_PASSED */
109, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
104, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
- 532, /* GL_FRAGMENT_SHADER */
- 1834, /* GL_VERTEX_SHADER */
- 1237, /* GL_PROGRAM_OBJECT_ARB */
- 1411, /* GL_SHADER_OBJECT_ARB */
- 871, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
- 931, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
- 925, /* GL_MAX_VARYING_FLOATS */
- 929, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
- 856, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
- 1040, /* GL_OBJECT_TYPE_ARB */
- 1413, /* GL_SHADER_TYPE */
- 497, /* GL_FLOAT_VEC2 */
- 499, /* GL_FLOAT_VEC3 */
- 501, /* GL_FLOAT_VEC4 */
- 650, /* GL_INT_VEC2 */
- 652, /* GL_INT_VEC3 */
- 654, /* GL_INT_VEC4 */
+ 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 */
94, /* GL_BOOL */
96, /* GL_BOOL_VEC2 */
98, /* GL_BOOL_VEC3 */
100, /* GL_BOOL_VEC4 */
- 485, /* GL_FLOAT_MAT2 */
- 489, /* GL_FLOAT_MAT3 */
- 493, /* GL_FLOAT_MAT4 */
- 1370, /* GL_SAMPLER_1D */
- 1372, /* GL_SAMPLER_2D */
- 1374, /* GL_SAMPLER_3D */
- 1375, /* GL_SAMPLER_CUBE */
- 1371, /* GL_SAMPLER_1D_SHADOW */
- 1373, /* GL_SAMPLER_2D_SHADOW */
- 487, /* GL_FLOAT_MAT2x3 */
- 488, /* GL_FLOAT_MAT2x4 */
- 491, /* GL_FLOAT_MAT3x2 */
- 492, /* GL_FLOAT_MAT3x4 */
- 495, /* GL_FLOAT_MAT4x2 */
- 496, /* GL_FLOAT_MAT4x3 */
+ 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 */
345, /* GL_DELETE_STATUS */
246, /* GL_COMPILE_STATUS */
- 705, /* GL_LINK_STATUS */
- 1782, /* GL_VALIDATE_STATUS */
- 635, /* GL_INFO_LOG_LENGTH */
+ 708, /* GL_LINK_STATUS */
+ 1787, /* GL_VALIDATE_STATUS */
+ 637, /* GL_INFO_LOG_LENGTH */
56, /* GL_ATTACHED_SHADERS */
20, /* GL_ACTIVE_UNIFORMS */
21, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
- 1412, /* GL_SHADER_SOURCE_LENGTH */
+ 1417, /* GL_SHADER_SOURCE_LENGTH */
15, /* GL_ACTIVE_ATTRIBUTES */
16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
- 534, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
- 1415, /* GL_SHADING_LANGUAGE_VERSION */
+ 536, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+ 1420, /* GL_SHADING_LANGUAGE_VERSION */
322, /* GL_CURRENT_PROGRAM */
- 1089, /* GL_PALETTE4_RGB8_OES */
- 1091, /* GL_PALETTE4_RGBA8_OES */
- 1087, /* GL_PALETTE4_R5_G6_B5_OES */
- 1090, /* GL_PALETTE4_RGBA4_OES */
- 1088, /* GL_PALETTE4_RGB5_A1_OES */
- 1094, /* GL_PALETTE8_RGB8_OES */
- 1096, /* GL_PALETTE8_RGBA8_OES */
- 1092, /* GL_PALETTE8_R5_G6_B5_OES */
- 1095, /* GL_PALETTE8_RGBA4_OES */
- 1093, /* GL_PALETTE8_RGB5_A1_OES */
- 617, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
- 616, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
- 1767, /* GL_UNSIGNED_NORMALIZED */
- 1606, /* GL_TEXTURE_1D_ARRAY_EXT */
- 1258, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
- 1608, /* GL_TEXTURE_2D_ARRAY_EXT */
- 1261, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
- 1614, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
- 1616, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
- 1468, /* GL_SRGB */
- 1469, /* GL_SRGB8 */
- 1471, /* GL_SRGB_ALPHA */
- 1470, /* GL_SRGB8_ALPHA8 */
- 1428, /* GL_SLUMINANCE_ALPHA */
- 1427, /* GL_SLUMINANCE8_ALPHA8 */
- 1425, /* GL_SLUMINANCE */
- 1426, /* GL_SLUMINANCE8 */
+ 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 */
267, /* GL_COMPRESSED_SRGB */
268, /* GL_COMPRESSED_SRGB_ALPHA */
265, /* GL_COMPRESSED_SLUMINANCE */
266, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
- 1154, /* GL_POINT_SPRITE_COORD_ORIGIN */
- 713, /* GL_LOWER_LEFT */
- 1779, /* GL_UPPER_LEFT */
- 1491, /* GL_STENCIL_BACK_REF */
- 1492, /* GL_STENCIL_BACK_VALUE_MASK */
- 1493, /* GL_STENCIL_BACK_WRITEMASK */
- 441, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
- 1304, /* GL_RENDERBUFFER_BINDING_EXT */
- 1285, /* GL_READ_FRAMEBUFFER */
- 440, /* GL_DRAW_FRAMEBUFFER */
- 1286, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
- 1314, /* GL_RENDERBUFFER_SAMPLES */
- 544, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
- 542, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
- 553, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
- 549, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
- 551, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
- 556, /* GL_FRAMEBUFFER_COMPLETE */
- 560, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
- 566, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
- 564, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
- 562, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
- 565, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
- 563, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
- 569, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
- 572, /* GL_FRAMEBUFFER_UNSUPPORTED */
- 570, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
- 853, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
+ 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 */
155, /* GL_COLOR_ATTACHMENT0 */
157, /* GL_COLOR_ATTACHMENT1 */
171, /* GL_COLOR_ATTACHMENT2 */
@@ -5055,56 +5065,56 @@ static const unsigned reduced_enums[1347] =
166, /* GL_COLOR_ATTACHMENT14 */
168, /* GL_COLOR_ATTACHMENT15 */
348, /* GL_DEPTH_ATTACHMENT */
- 1481, /* GL_STENCIL_ATTACHMENT */
- 535, /* GL_FRAMEBUFFER */
- 1302, /* GL_RENDERBUFFER */
- 1316, /* GL_RENDERBUFFER_WIDTH */
- 1309, /* GL_RENDERBUFFER_HEIGHT */
- 1311, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
- 1504, /* GL_STENCIL_INDEX_EXT */
- 1501, /* GL_STENCIL_INDEX1_EXT */
- 1502, /* GL_STENCIL_INDEX4_EXT */
- 1503, /* GL_STENCIL_INDEX8_EXT */
- 1500, /* GL_STENCIL_INDEX16_EXT */
- 1313, /* GL_RENDERBUFFER_RED_SIZE */
- 1308, /* GL_RENDERBUFFER_GREEN_SIZE */
- 1305, /* GL_RENDERBUFFER_BLUE_SIZE */
- 1303, /* GL_RENDERBUFFER_ALPHA_SIZE */
- 1306, /* GL_RENDERBUFFER_DEPTH_SIZE */
- 1315, /* GL_RENDERBUFFER_STENCIL_SIZE */
- 568, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
- 909, /* GL_MAX_SAMPLES */
- 1272, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */
- 482, /* GL_FIRST_VERTEX_CONVENTION_EXT */
- 665, /* GL_LAST_VERTEX_CONVENTION_EXT */
- 1251, /* GL_PROVOKING_VERTEX_EXT */
+ 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 */
302, /* GL_COPY_READ_BUFFER */
303, /* GL_COPY_WRITE_BUFFER */
- 1363, /* GL_RGBA_SNORM */
- 1359, /* GL_RGBA8_SNORM */
- 1421, /* GL_SIGNED_NORMALIZED */
- 910, /* GL_MAX_SERVER_WAIT_TIMEOUT */
- 1039, /* GL_OBJECT_TYPE */
- 1525, /* GL_SYNC_CONDITION */
- 1530, /* GL_SYNC_STATUS */
- 1527, /* GL_SYNC_FLAGS */
- 1526, /* GL_SYNC_FENCE */
- 1529, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
- 1756, /* GL_UNSIGNALED */
- 1420, /* GL_SIGNALED */
+ 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 */
46, /* GL_ALREADY_SIGNALED */
- 1727, /* GL_TIMEOUT_EXPIRED */
+ 1732, /* GL_TIMEOUT_EXPIRED */
270, /* GL_CONDITION_SATISFIED */
- 1839, /* GL_WAIT_FAILED */
- 467, /* GL_EVAL_BIT */
- 1283, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
- 707, /* GL_LIST_BIT */
- 1622, /* GL_TEXTURE_BIT */
- 1394, /* GL_SCISSOR_BIT */
+ 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 */
29, /* GL_ALL_ATTRIB_BITS */
- 995, /* GL_MULTISAMPLE_BIT */
+ 998, /* GL_MULTISAMPLE_BIT */
30, /* GL_ALL_CLIENT_ATTRIB_BITS */
- 1728, /* GL_TIMEOUT_IGNORED */
+ 1733, /* GL_TIMEOUT_IGNORED */
};
typedef int (*cfunc)(const void *, const void *);
diff --git a/src/mesa/main/eval.c b/src/mesa/main/eval.c
index 3f89f9c1ea..95d6e23187 100644
--- a/src/mesa/main/eval.c
+++ b/src/mesa/main/eval.c
@@ -44,6 +44,10 @@
#include "eval.h"
#include "macros.h"
#include "mtypes.h"
+#include "glapi/dispatch.h"
+
+
+#if FEATURE_evaluators
/*
@@ -417,7 +421,7 @@ map1(GLenum target, GLfloat u1, GLfloat u2, GLint ustride,
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_Map1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride,
GLint order, const GLfloat *points )
{
@@ -425,7 +429,7 @@ _mesa_Map1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride,
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_Map1d( GLenum target, GLdouble u1, GLdouble u2, GLint stride,
GLint order, const GLdouble *points )
{
@@ -516,7 +520,7 @@ map2( GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_Map2f( GLenum target,
GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
@@ -527,7 +531,7 @@ _mesa_Map2f( GLenum target,
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_Map2d( GLenum target,
GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
@@ -539,7 +543,7 @@ _mesa_Map2d( GLenum target,
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetMapdv( GLenum target, GLenum query, GLdouble *v )
{
GET_CURRENT_CONTEXT(ctx);
@@ -604,7 +608,7 @@ _mesa_GetMapdv( GLenum target, GLenum query, GLdouble *v )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetMapfv( GLenum target, GLenum query, GLfloat *v )
{
GET_CURRENT_CONTEXT(ctx);
@@ -669,7 +673,7 @@ _mesa_GetMapfv( GLenum target, GLenum query, GLfloat *v )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetMapiv( GLenum target, GLenum query, GLint *v )
{
GET_CURRENT_CONTEXT(ctx);
@@ -735,7 +739,7 @@ _mesa_GetMapiv( GLenum target, GLenum query, GLint *v )
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_MapGrid1f( GLint un, GLfloat u1, GLfloat u2 )
{
GET_CURRENT_CONTEXT(ctx);
@@ -753,14 +757,14 @@ _mesa_MapGrid1f( GLint un, GLfloat u1, GLfloat u2 )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_MapGrid1d( GLint un, GLdouble u1, GLdouble u2 )
{
_mesa_MapGrid1f( un, (GLfloat) u1, (GLfloat) u2 );
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_MapGrid2f( GLint un, GLfloat u1, GLfloat u2,
GLint vn, GLfloat v1, GLfloat v2 )
{
@@ -788,7 +792,7 @@ _mesa_MapGrid2f( GLint un, GLfloat u1, GLfloat u2,
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_MapGrid2d( GLint un, GLdouble u1, GLdouble u2,
GLint vn, GLdouble v1, GLdouble v2 )
{
@@ -797,6 +801,41 @@ _mesa_MapGrid2d( GLint un, GLdouble u1, GLdouble u2,
}
+void
+_mesa_install_eval_vtxfmt(struct _glapi_table *disp,
+ const GLvertexformat *vfmt)
+{
+ SET_EvalCoord1f(disp, vfmt->EvalCoord1f);
+ SET_EvalCoord1fv(disp, vfmt->EvalCoord1fv);
+ SET_EvalCoord2f(disp, vfmt->EvalCoord2f);
+ SET_EvalCoord2fv(disp, vfmt->EvalCoord2fv);
+ SET_EvalPoint1(disp, vfmt->EvalPoint1);
+ SET_EvalPoint2(disp, vfmt->EvalPoint2);
+
+ SET_EvalMesh1(disp, vfmt->EvalMesh1);
+ SET_EvalMesh2(disp, vfmt->EvalMesh2);
+}
+
+
+void
+_mesa_init_eval_dispatch(struct _glapi_table *disp)
+{
+ SET_GetMapdv(disp, _mesa_GetMapdv);
+ SET_GetMapfv(disp, _mesa_GetMapfv);
+ SET_GetMapiv(disp, _mesa_GetMapiv);
+ SET_Map1d(disp, _mesa_Map1d);
+ SET_Map1f(disp, _mesa_Map1f);
+ SET_Map2d(disp, _mesa_Map2d);
+ SET_Map2f(disp, _mesa_Map2f);
+ SET_MapGrid1d(disp, _mesa_MapGrid1d);
+ SET_MapGrid1f(disp, _mesa_MapGrid1f);
+ SET_MapGrid2d(disp, _mesa_MapGrid2d);
+ SET_MapGrid2f(disp, _mesa_MapGrid2f);
+}
+
+
+#endif /* FEATURE_evaluators */
+
/**********************************************************************/
/***** Initialization *****/
diff --git a/src/mesa/main/eval.h b/src/mesa/main/eval.h
index b3ff0a96f8..ffd1bab76d 100644
--- a/src/mesa/main/eval.h
+++ b/src/mesa/main/eval.h
@@ -37,13 +37,22 @@
#define EVAL_H
-#include "mtypes.h"
+#include "main/mtypes.h"
-#if _HAVE_FULL_GL
-extern void _mesa_init_eval( GLcontext *ctx );
-extern void _mesa_free_eval_data( GLcontext *ctx );
+#if FEATURE_evaluators
+#define _MESA_INIT_EVAL_VTXFMT(vfmt, impl) \
+ do { \
+ (vfmt)->EvalCoord1f = impl ## EvalCoord1f; \
+ (vfmt)->EvalCoord1fv = impl ## EvalCoord1fv; \
+ (vfmt)->EvalCoord2f = impl ## EvalCoord2f; \
+ (vfmt)->EvalCoord2fv = impl ## EvalCoord2fv; \
+ (vfmt)->EvalPoint1 = impl ## EvalPoint1; \
+ (vfmt)->EvalPoint2 = impl ## EvalPoint2; \
+ (vfmt)->EvalMesh1 = impl ## EvalMesh1; \
+ (vfmt)->EvalMesh2 = impl ## EvalMesh2; \
+ } while (0)
extern GLuint _mesa_evaluator_components( GLenum target );
@@ -70,59 +79,32 @@ extern GLfloat *_mesa_copy_map_points2d(GLenum target,
GLint vstride, GLint vorder,
const GLdouble *points );
+extern void
+_mesa_install_eval_vtxfmt(struct _glapi_table *disp,
+ const GLvertexformat *vfmt);
+extern void
+_mesa_init_eval_dispatch(struct _glapi_table *disp);
-extern void GLAPIENTRY
-_mesa_Map1f( GLenum target, GLfloat u1, GLfloat u2, GLint stride,
- GLint order, const GLfloat *points );
-
-extern void GLAPIENTRY
-_mesa_Map2f( GLenum target,
- GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
- GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
- const GLfloat *points );
-
-extern void GLAPIENTRY
-_mesa_Map1d( GLenum target, GLdouble u1, GLdouble u2, GLint stride,
- GLint order, const GLdouble *points );
-
-extern void GLAPIENTRY
-_mesa_Map2d( GLenum target,
- GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
- GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
- const GLdouble *points );
-
-extern void GLAPIENTRY
-_mesa_MapGrid1f( GLint un, GLfloat u1, GLfloat u2 );
+#else /* FEATURE_evaluators */
-extern void GLAPIENTRY
-_mesa_MapGrid1d( GLint un, GLdouble u1, GLdouble u2 );
+#define _MESA_INIT_EVAL_VTXFMT(vfmt, impl) do { } while (0)
-extern void GLAPIENTRY
-_mesa_MapGrid2f( GLint un, GLfloat u1, GLfloat u2,
- GLint vn, GLfloat v1, GLfloat v2 );
+static INLINE void
+_mesa_install_eval_vtxfmt(struct _glapi_table *disp,
+ const GLvertexformat *vfmt)
+{
+}
-extern void GLAPIENTRY
-_mesa_MapGrid2d( GLint un, GLdouble u1, GLdouble u2,
- GLint vn, GLdouble v1, GLdouble v2 );
+static INLINE void
+_mesa_init_eval_dispatch(struct _glapi_table *disp)
+{
+}
-extern void GLAPIENTRY
-_mesa_GetMapdv( GLenum target, GLenum query, GLdouble *v );
+#endif /* FEATURE_evaluators */
-extern void GLAPIENTRY
-_mesa_GetMapfv( GLenum target, GLenum query, GLfloat *v );
-
-extern void GLAPIENTRY
-_mesa_GetMapiv( GLenum target, GLenum query, GLint *v );
-
-#else
-
-/** No-op */
-#define _mesa_init_eval( c ) ((void)0)
-
-/** No-op */
-#define _mesa_free_eval_data( c ) ((void)0)
+extern void _mesa_init_eval( GLcontext *ctx );
+extern void _mesa_free_eval_data( GLcontext *ctx );
-#endif
-#endif
+#endif /* EVAL_H */
diff --git a/src/mesa/main/execmem.c b/src/mesa/main/execmem.c
index 57c1e117c8..4c6139985f 100644
--- a/src/mesa/main/execmem.c
+++ b/src/mesa/main/execmem.c
@@ -80,11 +80,10 @@ init_heap(void)
exec_heap = mmInit( 0, EXEC_HEAP_SIZE );
if (!exec_mem)
- exec_mem = (unsigned char *) mmap(0, EXEC_HEAP_SIZE,
- PROT_EXEC | PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ exec_mem = mmap(NULL, EXEC_HEAP_SIZE, PROT_EXEC | PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- return (exec_mem != NULL);
+ return (exec_mem != MAP_FAILED);
}
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index e3070b1547..54cf37c5f4 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -47,7 +47,9 @@ static const struct {
} default_extensions[] = {
{ OFF, "GL_ARB_copy_buffer", F(ARB_copy_buffer) },
{ OFF, "GL_ARB_depth_texture", F(ARB_depth_texture) },
+ { OFF, "GL_ARB_depth_clamp", F(ARB_depth_clamp) },
{ ON, "GL_ARB_draw_buffers", F(ARB_draw_buffers) },
+ { OFF, "GL_ARB_draw_elements_base_vertex", F(ARB_draw_elements_base_vertex) },
{ OFF, "GL_ARB_fragment_program", F(ARB_fragment_program) },
{ OFF, "GL_ARB_fragment_program_shadow", F(ARB_fragment_program_shadow) },
{ OFF, "GL_ARB_fragment_shader", F(ARB_fragment_shader) },
@@ -61,6 +63,7 @@ static const struct {
{ OFF, "GL_ARB_pixel_buffer_object", F(EXT_pixel_buffer_object) },
{ OFF, "GL_ARB_point_parameters", F(EXT_point_parameters) },
{ OFF, "GL_ARB_point_sprite", F(ARB_point_sprite) },
+ { OFF, "GL_ARB_provoking_vertex", F(EXT_provoking_vertex) },
{ OFF, "GL_ARB_seamless_cube_map", F(ARB_seamless_cube_map) },
{ OFF, "GL_ARB_shader_objects", F(ARB_shader_objects) },
{ OFF, "GL_ARB_shading_language_100", F(ARB_shading_language_100) },
@@ -162,7 +165,9 @@ static const struct {
{ OFF, "GL_MESA_ycbcr_texture", F(MESA_ycbcr_texture) },
{ ON, "GL_MESA_window_pos", F(ARB_window_pos) },
{ OFF, "GL_NV_blend_square", F(NV_blend_square) },
+ { OFF, "GL_NV_depth_clamp", F(ARB_depth_clamp) },
{ 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_point_sprite", F(NV_point_sprite) },
{ OFF, "GL_NV_texture_env_combine4", F(NV_texture_env_combine4) },
@@ -192,8 +197,10 @@ void
_mesa_enable_sw_extensions(GLcontext *ctx)
{
ctx->Extensions.ARB_copy_buffer = GL_TRUE;
+ ctx->Extensions.ARB_depth_clamp = GL_TRUE;
ctx->Extensions.ARB_depth_texture = GL_TRUE;
/*ctx->Extensions.ARB_draw_buffers = GL_TRUE;*/
+ ctx->Extensions.ARB_draw_elements_base_vertex = GL_TRUE;
#if FEATURE_ARB_fragment_program
ctx->Extensions.ARB_fragment_program = GL_TRUE;
ctx->Extensions.ARB_fragment_program_shadow = GL_TRUE;
@@ -208,7 +215,7 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
ctx->Extensions.ARB_imaging = GL_TRUE;
ctx->Extensions.ARB_map_buffer_range = GL_TRUE;
ctx->Extensions.ARB_multitexture = GL_TRUE;
-#if FEATURE_ARB_occlusion_query
+#if FEATURE_queryobj
ctx->Extensions.ARB_occlusion_query = GL_TRUE;
#endif
ctx->Extensions.ARB_point_sprite = GL_TRUE;
@@ -309,6 +316,9 @@ _mesa_enable_sw_extensions(GLcontext *ctx)
#if FEATURE_NV_fragment_program
ctx->Extensions.NV_fragment_program = GL_TRUE;
#endif
+#if FEATURE_NV_fragment_program && FEATURE_ARB_fragment_program
+ ctx->Extensions.NV_fragment_program_option = GL_TRUE;
+#endif
ctx->Extensions.SGI_color_matrix = GL_TRUE;
ctx->Extensions.SGI_color_table = GL_TRUE;
ctx->Extensions.SGI_texture_color_table = GL_TRUE;
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index ed1db0feca..319d0f2ce9 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"
@@ -44,6 +46,14 @@
#include "teximage.h"
#include "texobj.h"
#include "texstore.h"
+#include "texstate.h"
+
+
+/** 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
/**
@@ -234,12 +244,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;
@@ -308,8 +313,8 @@ _mesa_framebuffer_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
static void
att_incomplete(const char *msg)
{
-#if 0
- _mesa_printf("attachment incomplete: %s\n", msg);
+#if DEBUG_FBO
+ _mesa_debug(NULL, "attachment incomplete: %s\n", msg);
#else
(void) msg;
#endif
@@ -317,6 +322,23 @@ att_incomplete(const char *msg)
/**
+ * For debug only.
+ */
+static void
+fbo_incomplete(const char *msg, int index)
+{
+#if DEBUG_FBO
+ _mesa_debug(NULL, "FBO Incomplete: %s [%d]\n", msg, index);
+#else
+ (void) msg;
+ (void) index;
+#endif
+}
+
+
+
+
+/**
* Test if an attachment point is complete and update its Complete field.
* \param format if GL_COLOR, this is a color attachment point,
* if GL_DEPTH, this is a depth component attachment point,
@@ -335,6 +357,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");
@@ -361,26 +384,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 {
@@ -391,10 +416,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 {
@@ -406,6 +430,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 ||
@@ -415,24 +442,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 {
@@ -443,13 +465,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 {
@@ -468,20 +488,6 @@ test_attachment_completeness(const GLcontext *ctx, GLenum format,
/**
- * Helpful for debugging
- */
-static void
-fbo_incomplete(const char *msg, int index)
-{
- (void) msg;
- (void) index;
- /*
- _mesa_debug(NULL, "FBO Incomplete: %s [%d]\n", msg, index);
- */
-}
-
-
-/**
* Test if the given framebuffer object is complete and update its
* Status field with the results.
* Calls the ctx->Driver.ValidateFramebuffer() function to allow the
@@ -644,6 +650,8 @@ _mesa_test_framebuffer_completeness(GLcontext *ctx, struct gl_framebuffer *fb)
return;
}
}
+#else
+ (void) j;
#endif
if (numImages == 0) {
@@ -704,18 +712,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);
- /* The above doesn't fully flush the drivers in the way that a
- * glFlush does, but that is required here:
+ /* No need to flush here since the render buffer binding has no
+ * effect on rendering state.
*/
- if (ctx->Driver.Flush)
- ctx->Driver.Flush(ctx);
-
if (renderbuffer) {
newRb = _mesa_lookup_renderbuffer(ctx, renderbuffer);
@@ -969,42 +972,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;
}
@@ -1017,6 +1005,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)
@@ -1060,7 +1095,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:
@@ -1073,22 +1110,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) {
@@ -1127,7 +1154,7 @@ check_begin_texture_render(GLcontext *ctx, struct gl_framebuffer *fb)
struct gl_renderbuffer_attachment *att = fb->Attachment + i;
struct gl_texture_object *texObj = att->Texture;
if (texObj
- && att->Texture->Image[att->CubeMapFace][att->TextureLevel]) {
+ && texObj->Image[att->CubeMapFace][att->TextureLevel]) {
ctx->Driver.RenderTexture(ctx, fb, att);
}
}
@@ -1204,11 +1231,6 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
return;
}
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
- if (ctx->Driver.Flush) {
- ctx->Driver.Flush(ctx);
- }
-
if (framebuffer) {
/* Binding a user-created framebuffer object */
newFb = _mesa_lookup_framebuffer(ctx, framebuffer);
@@ -1247,12 +1269,14 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
/*
* OK, now bind the new Draw/Read framebuffers, if they're changing.
*/
-
if (bindReadBuf) {
- if (ctx->ReadBuffer == newFbread)
+ if (ctx->ReadBuffer == newFbread) {
bindReadBuf = GL_FALSE; /* no change */
- else
+ }
+ else {
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
_mesa_reference_framebuffer(&ctx->ReadBuffer, newFbread);
+ }
}
if (bindDrawBuf) {
@@ -1261,10 +1285,13 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
check_end_texture_render(ctx, ctx->DrawBuffer);
}
- if (ctx->DrawBuffer == newFb)
+ if (ctx->DrawBuffer == newFb) {
bindDrawBuf = GL_FALSE; /* no change */
- else
+ }
+ else {
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
_mesa_reference_framebuffer(&ctx->DrawBuffer, newFb);
+ }
if (newFb->Name != 0) {
/* check if newly bound framebuffer has any texture attachments */
@@ -1285,12 +1312,7 @@ _mesa_DeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
- /* The above doesn't fully flush the drivers in the way that a
- * glFlush does, but that is required here:
- */
- if (ctx->Driver.Flush)
- ctx->Driver.Flush(ctx);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
for (i = 0; i < n; i++) {
if (framebuffers[i] > 0) {
@@ -1395,7 +1417,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);
@@ -1511,12 +1533,7 @@ framebuffer_texture(GLcontext *ctx, const char *caller, GLenum target,
return;
}
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
- /* The above doesn't fully flush the drivers in the way that a
- * glFlush does, but that is required here:
- */
- if (ctx->Driver.Flush)
- ctx->Driver.Flush(ctx);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
_glthread_LOCK_MUTEX(fb->Mutex);
if (texObj) {
@@ -1664,7 +1681,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;
}
@@ -1672,7 +1690,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;
}
}
@@ -1683,7 +1702,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)");
@@ -1692,12 +1713,7 @@ _mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment,
}
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
- /* The above doesn't fully flush the drivers in the way that a
- * glFlush does, but that is required here:
- */
- if (ctx->Driver.Flush)
- ctx->Driver.Flush(ctx);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
assert(ctx->Driver.FramebufferRenderbuffer);
ctx->Driver.FramebufferRenderbuffer(ctx, fb, attachment, rb);
@@ -1773,12 +1789,7 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
}
}
- FLUSH_CURRENT(ctx, _NEW_BUFFERS);
- /* The above doesn't fully flush the drivers in the way that a
- * glFlush does, but that is required here:
- */
- if (ctx->Driver.Flush)
- ctx->Driver.Flush(ctx);
+ /* No need to flush here */
switch (pname) {
case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT:
@@ -1839,7 +1850,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:
@@ -1849,61 +1860,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:
@@ -1936,18 +1930,18 @@ _mesa_GenerateMipmapEXT(GLenum target)
return;
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texUnit = _mesa_get_current_tex_unit(ctx);
texObj = _mesa_select_tex_object(ctx, texUnit, target);
_mesa_lock_texture(ctx, texObj);
if (target == GL_TEXTURE_CUBE_MAP) {
- int face;
-
+ GLuint face;
for (face = 0; face < 6; face++)
ctx->Driver.GenerateMipmap(ctx,
GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB + face,
texObj);
- } else {
+ }
+ else {
ctx->Driver.GenerateMipmap(ctx, target, texObj);
}
_mesa_unlock_texture(ctx, texObj);
@@ -1955,6 +1949,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.
*
@@ -2030,7 +2038,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;
@@ -2042,7 +2051,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;
@@ -2070,7 +2080,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;
@@ -2082,6 +2092,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/feedback.c b/src/mesa/main/feedback.c
index 818a804540..fcdbb75fc4 100644
--- a/src/mesa/main/feedback.c
+++ b/src/mesa/main/feedback.c
@@ -36,9 +36,10 @@
#include "feedback.h"
#include "macros.h"
#include "mtypes.h"
+#include "glapi/dispatch.h"
-#if _HAVE_FULL_GL
+#if FEATURE_feedback
#define FB_3D 0x01
@@ -49,7 +50,7 @@
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer )
{
GET_CURRENT_CONTEXT(ctx);
@@ -103,7 +104,7 @@ _mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_PassThrough( GLfloat token )
{
GET_CURRENT_CONTEXT(ctx);
@@ -153,9 +154,6 @@ _mesa_feedback_vertex(GLcontext *ctx,
}
-#endif /* _HAVE_FULL_GL */
-
-
/**********************************************************************/
/** \name Selection */
/*@{*/
@@ -173,7 +171,7 @@ _mesa_feedback_vertex(GLcontext *ctx,
* Verifies we're not in selection mode, flushes the vertices and initialize
* the fields in __GLcontextRec::Select with the given buffer.
*/
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_SelectBuffer( GLsizei size, GLuint *buffer )
{
GET_CURRENT_CONTEXT(ctx);
@@ -280,7 +278,7 @@ write_hit_record(GLcontext *ctx)
* the hit record data in gl_selection. Marks new render mode in
* __GLcontextRec::NewState.
*/
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_InitNames( void )
{
GET_CURRENT_CONTEXT(ctx);
@@ -311,7 +309,7 @@ _mesa_InitNames( void )
*
* sa __GLcontextRec::Select.
*/
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_LoadName( GLuint name )
{
GET_CURRENT_CONTEXT(ctx);
@@ -350,7 +348,7 @@ _mesa_LoadName( GLuint name )
*
* sa __GLcontextRec::Select.
*/
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_PushName( GLuint name )
{
GET_CURRENT_CONTEXT(ctx);
@@ -381,7 +379,7 @@ _mesa_PushName( GLuint name )
*
* sa __GLcontextRec::Select.
*/
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_PopName( void )
{
GET_CURRENT_CONTEXT(ctx);
@@ -424,7 +422,7 @@ _mesa_PopName( void )
* __GLcontextRec::RenderMode and notifies the driver via the
* dd_function_table::RenderMode callback.
*/
-GLint GLAPIENTRY
+static GLint GLAPIENTRY
_mesa_RenderMode( GLenum mode )
{
GET_CURRENT_CONTEXT(ctx);
@@ -507,6 +505,23 @@ _mesa_RenderMode( GLenum mode )
/*@}*/
+void
+_mesa_init_feedback_dispatch(struct _glapi_table *disp)
+{
+ SET_InitNames(disp, _mesa_InitNames);
+ SET_FeedbackBuffer(disp, _mesa_FeedbackBuffer);
+ SET_LoadName(disp, _mesa_LoadName);
+ SET_PassThrough(disp, _mesa_PassThrough);
+ SET_PopName(disp, _mesa_PopName);
+ SET_PushName(disp, _mesa_PushName);
+ SET_SelectBuffer(disp, _mesa_SelectBuffer);
+ SET_RenderMode(disp, _mesa_RenderMode);
+}
+
+
+#endif /* FEATURE_feedback */
+
+
/**********************************************************************/
/** \name Initialization */
/*@{*/
diff --git a/src/mesa/main/feedback.h b/src/mesa/main/feedback.h
index 72c2acd5ed..7a648f444f 100644
--- a/src/mesa/main/feedback.h
+++ b/src/mesa/main/feedback.h
@@ -27,11 +27,15 @@
#define FEEDBACK_H
-#include "mtypes.h"
+#include "main/mtypes.h"
-extern void
-_mesa_init_feedback( GLcontext *ctx );
+#if FEATURE_feedback
+
+#define _MESA_INIT_FEEDBACK_FUNCTIONS(driver, impl) \
+ do { \
+ (driver)->RenderMode = impl ## RenderMode; \
+ } while (0)
extern void
_mesa_feedback_vertex( GLcontext *ctx,
@@ -55,29 +59,47 @@ extern void
_mesa_update_hitflag( GLcontext *ctx, GLfloat z );
-extern void GLAPIENTRY
-_mesa_PassThrough( GLfloat token );
+extern void
+_mesa_init_feedback_dispatch(struct _glapi_table *disp);
+
+#else /* FEATURE_feedback */
-extern void GLAPIENTRY
-_mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer );
+#define _MESA_INIT_FEEDBACK_FUNCTIONS(driver, impl) do { } while (0)
-extern void GLAPIENTRY
-_mesa_SelectBuffer( GLsizei size, GLuint *buffer );
+static INLINE void
+_mesa_feedback_vertex( GLcontext *ctx,
+ const GLfloat win[4],
+ const GLfloat color[4],
+ GLfloat index,
+ const GLfloat texcoord[4] )
+{
+ /* render mode is always GL_RENDER */
+ ASSERT_NO_FEATURE();
+}
-extern void GLAPIENTRY
-_mesa_InitNames( void );
-extern void GLAPIENTRY
-_mesa_LoadName( GLuint name );
+static INLINE void
+_mesa_feedback_token( GLcontext *ctx, GLfloat token )
+{
+ /* render mode is always GL_RENDER */
+ ASSERT_NO_FEATURE();
+}
-extern void GLAPIENTRY
-_mesa_PushName( GLuint name );
+static INLINE void
+_mesa_update_hitflag( GLcontext *ctx, GLfloat z )
+{
+ /* render mode is always GL_RENDER */
+ ASSERT_NO_FEATURE();
+}
-extern void GLAPIENTRY
-_mesa_PopName( void );
+static INLINE void
+_mesa_init_feedback_dispatch(struct _glapi_table *disp)
+{
+}
-extern GLint GLAPIENTRY
-_mesa_RenderMode( GLenum mode );
+#endif /* FEATURE_feedback */
+extern void
+_mesa_init_feedback( GLcontext *ctx );
-#endif
+#endif /* FEEDBACK_H */
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
new file mode 100644
index 0000000000..7d0e2d2914
--- /dev/null
+++ b/src/mesa/main/formats.c
@@ -0,0 +1,1124 @@
+/*
+ * 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_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_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_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 0000000000..fa6359f5c8
--- /dev/null
+++ b/src/mesa/main/formats.h
@@ -0,0 +1,182 @@
+/*
+ * 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_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_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 dc79b8ca61..154dedacd5 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 604b106217..6c5ce02913 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1722,6 +1722,10 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
params[0] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMin);
params[1] = FLOAT_TO_BOOLEAN(ctx->Depth.BoundsMax);
break;
+ case GL_DEPTH_CLAMP:
+ CHECK_EXT1(ARB_depth_clamp, "GetBooleanv");
+ params[0] = ctx->Transform.DepthClamp;
+ break;
case GL_MAX_DRAW_BUFFERS_ARB:
params[0] = INT_TO_BOOLEAN(ctx->Const.MaxDrawBuffers);
break;
@@ -3553,6 +3557,10 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
params[0] = ctx->Depth.BoundsMin;
params[1] = ctx->Depth.BoundsMax;
break;
+ case GL_DEPTH_CLAMP:
+ CHECK_EXT1(ARB_depth_clamp, "GetFloatv");
+ params[0] = BOOLEAN_TO_FLOAT(ctx->Transform.DepthClamp);
+ break;
case GL_MAX_DRAW_BUFFERS_ARB:
params[0] = (GLfloat)(ctx->Const.MaxDrawBuffers);
break;
@@ -5384,6 +5392,10 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
params[0] = IROUND(ctx->Depth.BoundsMin);
params[1] = IROUND(ctx->Depth.BoundsMax);
break;
+ case GL_DEPTH_CLAMP:
+ CHECK_EXT1(ARB_depth_clamp, "GetIntegerv");
+ params[0] = BOOLEAN_TO_INT(ctx->Transform.DepthClamp);
+ break;
case GL_MAX_DRAW_BUFFERS_ARB:
params[0] = ctx->Const.MaxDrawBuffers;
break;
@@ -7216,6 +7228,10 @@ _mesa_GetInteger64v( GLenum pname, GLint64 *params )
params[0] = IROUND64(ctx->Depth.BoundsMin);
params[1] = IROUND64(ctx->Depth.BoundsMax);
break;
+ case GL_DEPTH_CLAMP:
+ CHECK_EXT1(ARB_depth_clamp, "GetInteger64v");
+ params[0] = BOOLEAN_TO_INT64(ctx->Transform.DepthClamp);
+ break;
case GL_MAX_DRAW_BUFFERS_ARB:
params[0] = (GLint64)(ctx->Const.MaxDrawBuffers);
break;
diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py
index c7babd1c81..930c3362fa 100644
--- a/src/mesa/main/get_gen.py
+++ b/src/mesa/main/get_gen.py
@@ -905,6 +905,10 @@ StateVars = [
["ctx->Depth.BoundsMin", "ctx->Depth.BoundsMax"],
"", ["EXT_depth_bounds_test"] ),
+ # GL_ARB_depth_clamp
+ ( "GL_DEPTH_CLAMP", GLboolean, ["ctx->Transform.DepthClamp"], "",
+ ["ARB_depth_clamp"] ),
+
# GL_ARB_draw_buffers
( "GL_MAX_DRAW_BUFFERS_ARB", GLint,
["ctx->Const.MaxDrawBuffers"], "", None ),
diff --git a/src/mesa/main/histogram.c b/src/mesa/main/histogram.c
index 4c46f92787..dfbe910a06 100644
--- a/src/mesa/main/histogram.c
+++ b/src/mesa/main/histogram.c
@@ -29,8 +29,11 @@
#include "context.h"
#include "image.h"
#include "histogram.h"
+#include "glapi/dispatch.h"
+#if FEATURE_histogram
+
/*
* XXX the packed pixel formats haven't been tested.
@@ -615,7 +618,11 @@ base_histogram_format( GLenum format )
*/
-void GLAPIENTRY
+/* this is defined below */
+static void GLAPIENTRY _mesa_ResetMinmax(GLenum target);
+
+
+static void GLAPIENTRY
_mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
{
GET_CURRENT_CONTEXT(ctx);
@@ -678,7 +685,7 @@ _mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvo
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
{
GET_CURRENT_CONTEXT(ctx);
@@ -738,7 +745,7 @@ _mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, G
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
@@ -785,7 +792,7 @@ _mesa_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params)
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetHistogramParameteriv(GLenum target, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
@@ -832,7 +839,7 @@ _mesa_GetHistogramParameteriv(GLenum target, GLenum pname, GLint *params)
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params)
{
GET_CURRENT_CONTEXT(ctx);
@@ -858,7 +865,7 @@ _mesa_GetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params)
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params)
{
GET_CURRENT_CONTEXT(ctx);
@@ -884,7 +891,7 @@ _mesa_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params)
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean sink)
{
GLuint i;
@@ -967,7 +974,7 @@ _mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean s
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_Minmax(GLenum target, GLenum internalFormat, GLboolean sink)
{
GET_CURRENT_CONTEXT(ctx);
@@ -995,7 +1002,7 @@ _mesa_Minmax(GLenum target, GLenum internalFormat, GLboolean sink)
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_ResetHistogram(GLenum target)
{
GLuint i;
@@ -1021,7 +1028,7 @@ _mesa_ResetHistogram(GLenum target)
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_ResetMinmax(GLenum target)
{
GET_CURRENT_CONTEXT(ctx);
@@ -1044,6 +1051,24 @@ _mesa_ResetMinmax(GLenum target)
}
+void
+_mesa_init_histogram_dispatch(struct _glapi_table *disp)
+{
+ SET_GetHistogram(disp, _mesa_GetHistogram);
+ SET_GetHistogramParameterfv(disp, _mesa_GetHistogramParameterfv);
+ SET_GetHistogramParameteriv(disp, _mesa_GetHistogramParameteriv);
+ SET_GetMinmax(disp, _mesa_GetMinmax);
+ SET_GetMinmaxParameterfv(disp, _mesa_GetMinmaxParameterfv);
+ SET_GetMinmaxParameteriv(disp, _mesa_GetMinmaxParameteriv);
+ SET_Histogram(disp, _mesa_Histogram);
+ SET_Minmax(disp, _mesa_Minmax);
+ SET_ResetHistogram(disp, _mesa_ResetHistogram);
+ SET_ResetMinmax(disp, _mesa_ResetMinmax);
+}
+
+
+#endif /* FEATURE_histogram */
+
/**********************************************************************/
/***** Initialization *****/
diff --git a/src/mesa/main/histogram.h b/src/mesa/main/histogram.h
index 367e9b11ba..dbae1bbd06 100644
--- a/src/mesa/main/histogram.h
+++ b/src/mesa/main/histogram.h
@@ -36,48 +36,22 @@
#ifndef HISTOGRAM_H
#define HISTOGRAM_H
-#include "glheader.h"
-#include "mtypes.h"
+#include "main/mtypes.h"
-#if _HAVE_FULL_GL
+#if FEATURE_histogram
-extern void GLAPIENTRY
-_mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values);
+extern void
+_mesa_init_histogram_dispatch(struct _glapi_table *disp);
-extern void GLAPIENTRY
-_mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values);
+#else /* FEATURE_histogram */
-extern void GLAPIENTRY
-_mesa_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat *params);
+static INLINE void
+_mesa_init_histogram_dispatch(struct _glapi_table *disp)
+{
+}
-extern void GLAPIENTRY
-_mesa_GetHistogramParameteriv(GLenum target, GLenum pname, GLint *params);
-
-extern void GLAPIENTRY
-_mesa_GetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat *params);
-
-extern void GLAPIENTRY
-_mesa_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params);
-
-extern void GLAPIENTRY
-_mesa_Histogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
-
-extern void GLAPIENTRY
-_mesa_Minmax(GLenum target, GLenum internalformat, GLboolean sink);
-
-extern void GLAPIENTRY
-_mesa_ResetHistogram(GLenum target);
-
-extern void GLAPIENTRY
-_mesa_ResetMinmax(GLenum target);
+#endif /* FEATURE_histogram */
extern void _mesa_init_histogram( GLcontext * ctx );
-#else
-
-/** No-op */
-#define _mesa_init_histogram( c ) ((void) 0)
-
-#endif
-
-#endif
+#endif /* HISTOGRAM_H */
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index 10c89f4368..1c8a081e9a 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -636,7 +636,7 @@ _mesa_update_material( GLcontext *ctx, GLuint bitmask )
struct gl_light *light, *list = &ctx->Light.EnabledList;
GLfloat (*mat)[4] = ctx->Light.Material.Attrib;
- if (MESA_VERBOSE&VERBOSE_IMMEDIATE)
+ if (MESA_VERBOSE & VERBOSE_MATERIAL)
_mesa_debug(ctx, "_mesa_update_material, mask 0x%x\n", bitmask);
if (!bitmask)
diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h
index e23cdb1f42..4e68bc15d8 100644
--- a/src/mesa/main/mfeatures.h
+++ b/src/mesa/main/mfeatures.h
@@ -36,12 +36,53 @@
#define _HAVE_FULL_GL 1
#endif
+/* assert that a feature is disabled and should never be used */
+#define ASSERT_NO_FEATURE() ASSERT(0)
+
+/**
+ * A feature can be anything. But most of them share certain characteristics.
+ *
+ * When a feature defines driver entries, they can be initialized by
+ * _MESA_INIT_<FEATURE>_FUNCTIONS
+ *
+ * When a feature defines vtxfmt entries, they can be initialized and
+ * installed by
+ * _MESA_INIT_<FEATURE>_VTXFMT
+ * _mesa_install_<feature>_vtxfmt
+ *
+ * When a feature defines dispatch entries, they are initialized by
+ * _mesa_init_<feature>_dispatch
+ *
+ * When a feature has states, they are initialized and freed by
+ * _mesa_init_<feature>
+ * _mesa_free_<feature>_data
+ *
+ * Except for states, the others compile to no-op when a feature is disabled.
+ *
+ * The GLAPIENTRYs and helper functions defined by a feature should also
+ * compile to no-op when it is disabled. But to save typings and to catch
+ * bugs, some of them may be unavailable, or compile to ASSERT_NO_FEATURE()
+ * when the feature is disabled.
+ *
+ * A feature following the conventions may be used without knowing if it is
+ * 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
+/* this disables vtxfmt, api_loopback, and api_noop completely */
+#define FEATURE_beginend _HAVE_FULL_GL
#define FEATURE_colortable _HAVE_FULL_GL
#define FEATURE_convolve _HAVE_FULL_GL
#define FEATURE_dispatch _HAVE_FULL_GL
-#define FEATURE_dlist _HAVE_FULL_GL
+#define FEATURE_dlist (_HAVE_FULL_GL && FEATURE_arrayelt && FEATURE_beginend)
#define FEATURE_draw_read_buffer _HAVE_FULL_GL
#define FEATURE_drawpix _HAVE_FULL_GL
#define FEATURE_evaluators _HAVE_FULL_GL
@@ -50,15 +91,15 @@
#define FEATURE_histogram _HAVE_FULL_GL
#define FEATURE_pixel_transfer _HAVE_FULL_GL
#define FEATURE_point_size_array 0
+#define FEATURE_queryobj _HAVE_FULL_GL
+#define FEATURE_rastpos _HAVE_FULL_GL
#define FEATURE_texgen _HAVE_FULL_GL
#define FEATURE_texture_fxt1 _HAVE_FULL_GL
#define FEATURE_texture_s3tc _HAVE_FULL_GL
#define FEATURE_userclip _HAVE_FULL_GL
#define FEATURE_vertex_array_byte 0
-#define FEATURE_windowpos _HAVE_FULL_GL
#define FEATURE_es2_glsl 0
-#define FEATURE_ARB_occlusion_query _HAVE_FULL_GL
#define FEATURE_ARB_fragment_program _HAVE_FULL_GL
#define FEATURE_ARB_framebuffer_object _HAVE_FULL_GL
#define FEATURE_ARB_map_buffer_range _HAVE_FULL_GL
@@ -76,7 +117,6 @@
#define FEATURE_EXT_framebuffer_object _HAVE_FULL_GL
#define FEATURE_EXT_pixel_buffer_object _HAVE_FULL_GL
#define FEATURE_EXT_texture_sRGB _HAVE_FULL_GL
-#define FEATURE_EXT_timer_query _HAVE_FULL_GL
#define FEATURE_ATI_fragment_shader _HAVE_FULL_GL
#define FEATURE_NV_fence _HAVE_FULL_GL
#define FEATURE_NV_fragment_program _HAVE_FULL_GL
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index c3928fa513..7350c7a3d2 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 f8e4e41583..94d29a7dbb 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -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. All Rights Reserved.
@@ -84,6 +84,7 @@
/*@{*/
struct _mesa_HashTable;
struct gl_attrib_node;
+struct gl_list_extensions;
struct gl_meta_state;
struct gl_pixelstore_attrib;
struct gl_program_cache;
@@ -207,7 +208,7 @@ typedef enum
VERT_RESULT_BFC0 = 13,
VERT_RESULT_BFC1 = 14,
VERT_RESULT_EDGE = 15,
- VERT_RESULT_VAR0 = 16 /**< shader varying */,
+ VERT_RESULT_VAR0 = 16, /**< shader varying */
VERT_RESULT_MAX = (VERT_RESULT_VAR0 + MAX_VARYING)
} gl_vert_result;
@@ -820,29 +821,6 @@ struct gl_list_attrib
/**
- * Used by device drivers to hook new commands into display lists.
- */
-struct gl_list_instruction
-{
- GLuint Size;
- void (*Execute)( GLcontext *ctx, void *data );
- void (*Destroy)( GLcontext *ctx, void *data );
- void (*Print)( GLcontext *ctx, void *data );
-};
-
-#define MAX_DLIST_EXT_OPCODES 16
-
-/**
- * Used by device drivers to hook new commands into display lists.
- */
-struct gl_list_extensions
-{
- struct gl_list_instruction Opcode[MAX_DLIST_EXT_OPCODES];
- GLuint NumOpcodes;
-};
-
-
-/**
* Multisample attribute group (GL_MULTISAMPLE_BIT).
*/
struct gl_multisample_attrib
@@ -1137,103 +1115,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 */
@@ -1251,16 +1146,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 */
@@ -1482,6 +1372,7 @@ struct gl_transform_attrib
GLboolean Normalize; /**< Normalize all normals? */
GLboolean RescaleNormals; /**< GL_EXT_rescale_normal */
GLboolean RasterPositionUnclipped; /**< GL_IBM_rasterpos_clip */
+ GLboolean DepthClamp; /**< GL_ARB_depth_clamp */
GLboolean CullVertexFlag; /**< True if GL_CULL_VERTEX_EXT is enabled */
GLfloat CullEyePos[4];
@@ -1833,7 +1724,6 @@ struct gl_vertex_program
struct gl_program Base; /**< base class */
GLboolean IsNVProgram; /**< is this a GL_NV_vertex_program program? */
GLboolean IsPositionInvariant;
- void *TnlData; /**< should probably use Base.DriverData */
};
@@ -1939,10 +1829,10 @@ struct ati_fragment_shader
struct atifs_instruction *Instructions[2];
struct atifs_setupinst *SetupInst[2];
GLfloat Constants[8][4];
- GLbitfield LocalConstDef; /** Indicates which constants have been set */
+ GLbitfield LocalConstDef; /**< Indicates which constants have been set */
GLubyte numArithInstr[2];
GLubyte regsAssigned[2];
- GLubyte NumPasses; /** 1 or 2 */
+ GLubyte NumPasses; /**< 1 or 2 */
GLubyte cur_pass;
GLubyte last_optype;
GLboolean interpinp1;
@@ -1956,7 +1846,7 @@ struct ati_fragment_shader
struct gl_ati_fragment_shader_state
{
GLboolean Enabled;
- GLboolean _Enabled; /** enabled and valid shader? */
+ GLboolean _Enabled; /**< enabled and valid shader? */
GLboolean Compiling;
GLfloat GlobalConstants[8][4];
struct ati_fragment_shader *Current;
@@ -2066,6 +1956,9 @@ struct gl_shader_program
#define GLSL_OPT 0x4 /**< Force optimizations (override pragmas) */
#define GLSL_NO_OPT 0x8 /**< Force no optimizations (override pragmas) */
#define GLSL_UNIFORMS 0x10 /**< Print glUniform calls */
+#define GLSL_NOP_VERT 0x20 /**< Force no-op vertex shaders */
+#define GLSL_NOP_FRAG 0x40 /**< Force no-op fragment shaders */
+#define GLSL_USE_PROG 0x80 /**< Log glUseProgram calls */
/**
@@ -2176,20 +2069,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 */
@@ -2476,7 +2361,9 @@ struct gl_extensions
GLboolean dummy; /* don't remove this! */
GLboolean ARB_copy_buffer;
GLboolean ARB_depth_texture;
+ GLboolean ARB_depth_clamp;
GLboolean ARB_draw_buffers;
+ GLboolean ARB_draw_elements_base_vertex;
GLboolean ARB_fragment_program;
GLboolean ARB_fragment_program_shadow;
GLboolean ARB_fragment_shader;
@@ -2581,6 +2468,7 @@ struct gl_extensions
GLboolean MESA_texture_signed_rgba;
GLboolean NV_blend_square;
GLboolean NV_fragment_program;
+ GLboolean NV_fragment_program_option;
GLboolean NV_light_max_exponent;
GLboolean NV_point_sprite;
GLboolean NV_texgen_reflection;
@@ -3056,7 +2944,7 @@ struct __GLcontextRec
struct gl_shine_tab *_ShineTabList; /**< MRU list of inactive shine tables */
/**@}*/
- struct gl_list_extensions ListExt; /**< driver dlist extensions */
+ struct gl_list_extensions *ListExt; /**< driver dlist extensions */
/** \name For debugging/development only */
/*@{*/
@@ -3112,11 +3000,12 @@ extern int MESA_DEBUG_FLAGS;
#endif
+/** The MESA_VERBOSE var is a bitmask of these flags */
enum _verbose
{
VERBOSE_VARRAY = 0x0001,
VERBOSE_TEXTURE = 0x0002,
- VERBOSE_IMMEDIATE = 0x0004,
+ VERBOSE_MATERIAL = 0x0004,
VERBOSE_PIPELINE = 0x0008,
VERBOSE_DRIVER = 0x0010,
VERBOSE_STATE = 0x0020,
@@ -3126,9 +3015,12 @@ enum _verbose
VERBOSE_PRIMS = 0x0400,
VERBOSE_VERTS = 0x0800,
VERBOSE_DISASSEM = 0x1000,
+ VERBOSE_DRAW = 0x2000,
+ VERBOSE_SWAPBUFFERS = 0x4000
};
+/** The MESA_DEBUG_FLAGS var is a bitmask of these flags */
enum _debug
{
DEBUG_ALWAYS_FLUSH = 0x1
diff --git a/src/mesa/main/pixel.c b/src/mesa/main/pixel.c
index fcef6dfd42..3820ebd889 100644
--- a/src/mesa/main/pixel.c
+++ b/src/mesa/main/pixel.c
@@ -36,13 +36,17 @@
#include "macros.h"
#include "pixel.h"
#include "mtypes.h"
+#include "glapi/dispatch.h"
+
+
+#if FEATURE_pixel_transfer
/**********************************************************************/
/***** glPixelZoom *****/
/**********************************************************************/
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_PixelZoom( GLfloat xfactor, GLfloat yfactor )
{
GET_CURRENT_CONTEXT(ctx);
@@ -163,7 +167,7 @@ validate_pbo_access(GLcontext *ctx, struct gl_pixelstore_attrib *pack,
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_PixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values )
{
GET_CURRENT_CONTEXT(ctx);
@@ -205,7 +209,7 @@ _mesa_PixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values )
{
GLfloat fvalues[MAX_PIXEL_MAP_TABLE];
@@ -261,7 +265,7 @@ _mesa_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values )
{
GLfloat fvalues[MAX_PIXEL_MAP_TABLE];
@@ -317,7 +321,7 @@ _mesa_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetPixelMapfv( GLenum map, GLfloat *values )
{
GET_CURRENT_CONTEXT(ctx);
@@ -362,7 +366,7 @@ _mesa_GetPixelMapfv( GLenum map, GLfloat *values )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetPixelMapuiv( GLenum map, GLuint *values )
{
GET_CURRENT_CONTEXT(ctx);
@@ -406,7 +410,7 @@ _mesa_GetPixelMapuiv( GLenum map, GLuint *values )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetPixelMapusv( GLenum map, GLushort *values )
{
GET_CURRENT_CONTEXT(ctx);
@@ -468,7 +472,7 @@ _mesa_GetPixelMapusv( GLenum map, GLushort *values )
* Implements glPixelTransfer[fi] whether called immediately or from a
* display list.
*/
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_PixelTransferf( GLenum pname, GLfloat param )
{
GET_CURRENT_CONTEXT(ctx);
@@ -662,7 +666,7 @@ _mesa_PixelTransferf( GLenum pname, GLfloat param )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_PixelTransferi( GLenum pname, GLint param )
{
_mesa_PixelTransferf( pname, (GLfloat) param );
@@ -756,6 +760,24 @@ void _mesa_update_pixel( GLcontext *ctx, GLuint new_state )
}
+void
+_mesa_init_pixel_dispatch(struct _glapi_table *disp)
+{
+ SET_GetPixelMapfv(disp, _mesa_GetPixelMapfv);
+ SET_GetPixelMapuiv(disp, _mesa_GetPixelMapuiv);
+ SET_GetPixelMapusv(disp, _mesa_GetPixelMapusv);
+ SET_PixelMapfv(disp, _mesa_PixelMapfv);
+ SET_PixelMapuiv(disp, _mesa_PixelMapuiv);
+ SET_PixelMapusv(disp, _mesa_PixelMapusv);
+ SET_PixelTransferf(disp, _mesa_PixelTransferf);
+ SET_PixelTransferi(disp, _mesa_PixelTransferi);
+ SET_PixelZoom(disp, _mesa_PixelZoom);
+}
+
+
+#endif /* FEATURE_pixel_transfer */
+
+
/**********************************************************************/
/***** Initialization *****/
/**********************************************************************/
diff --git a/src/mesa/main/pixel.h b/src/mesa/main/pixel.h
index cb6c5262a3..f4d3f1efdb 100644
--- a/src/mesa/main/pixel.h
+++ b/src/mesa/main/pixel.h
@@ -33,48 +33,35 @@
#define PIXEL_H
-#include "mtypes.h"
+#include "main/mtypes.h"
-/** \name API functions */
-/*@{*/
+#if FEATURE_pixel_transfer
-extern void GLAPIENTRY
-_mesa_GetPixelMapfv( GLenum map, GLfloat *values );
-
-extern void GLAPIENTRY
-_mesa_GetPixelMapuiv( GLenum map, GLuint *values );
-
-extern void GLAPIENTRY
-_mesa_GetPixelMapusv( GLenum map, GLushort *values );
-
-extern void GLAPIENTRY
-_mesa_PixelMapfv( GLenum map, GLsizei mapsize, const GLfloat *values );
-
-extern void GLAPIENTRY
-_mesa_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values );
-
-extern void GLAPIENTRY
-_mesa_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values );
+extern void
+_mesa_update_pixel( GLcontext *ctx, GLuint newstate );
-extern void GLAPIENTRY
-_mesa_PixelTransferf( GLenum pname, GLfloat param );
+extern void
+_mesa_init_pixel_dispatch( struct _glapi_table * disp );
-extern void GLAPIENTRY
-_mesa_PixelTransferi( GLenum pname, GLint param );
+#else /* FEATURE_pixel_transfer */
-extern void GLAPIENTRY
-_mesa_PixelZoom( GLfloat xfactor, GLfloat yfactor );
+static INLINE void
+_mesa_update_pixel(GLcontext *ctx, GLuint newstate)
+{
+}
-/*@}*/
+static INLINE void
+_mesa_init_pixel_dispatch(struct _glapi_table *disp)
+{
+}
+#endif /* FEATURE_pixel_transfer */
-extern void
-_mesa_update_pixel( GLcontext *ctx, GLuint newstate );
extern void
_mesa_init_pixel( GLcontext * ctx );
/*@}*/
-#endif
+#endif /* PIXEL_H */
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index a73c6e0508..f6eb4ee7e1 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -29,6 +29,10 @@
#include "imports.h"
#include "queryobj.h"
#include "mtypes.h"
+#include "glapi/dispatch.h"
+
+
+#if FEATURE_queryobj
/**
@@ -216,7 +220,7 @@ _mesa_IsQueryARB(GLuint id)
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_BeginQueryARB(GLenum target, GLuint id)
{
struct gl_query_object *q;
@@ -236,7 +240,6 @@ _mesa_BeginQueryARB(GLenum target, GLuint id)
return;
}
break;
-#if FEATURE_EXT_timer_query
case GL_TIME_ELAPSED_EXT:
if (!ctx->Extensions.EXT_timer_query) {
_mesa_error(ctx, GL_INVALID_ENUM, "glBeginQueryARB(target)");
@@ -247,7 +250,6 @@ _mesa_BeginQueryARB(GLenum target, GLuint id)
return;
}
break;
-#endif
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glBeginQueryARB(target)");
return;
@@ -285,17 +287,15 @@ _mesa_BeginQueryARB(GLenum target, GLuint id)
if (target == GL_SAMPLES_PASSED_ARB) {
ctx->Query.CurrentOcclusionObject = q;
}
-#if FEATURE_EXT_timer_query
else if (target == GL_TIME_ELAPSED_EXT) {
ctx->Query.CurrentTimerObject = q;
}
-#endif
ctx->Driver.BeginQuery(ctx, q);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_EndQueryARB(GLenum target)
{
struct gl_query_object *q;
@@ -313,7 +313,6 @@ _mesa_EndQueryARB(GLenum target)
q = ctx->Query.CurrentOcclusionObject;
ctx->Query.CurrentOcclusionObject = NULL;
break;
-#if FEATURE_EXT_timer_query
case GL_TIME_ELAPSED_EXT:
if (!ctx->Extensions.EXT_timer_query) {
_mesa_error(ctx, GL_INVALID_ENUM, "glEndQueryARB(target)");
@@ -322,7 +321,6 @@ _mesa_EndQueryARB(GLenum target)
q = ctx->Query.CurrentTimerObject;
ctx->Query.CurrentTimerObject = NULL;
break;
-#endif
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glEndQueryARB(target)");
return;
@@ -354,7 +352,6 @@ _mesa_GetQueryivARB(GLenum target, GLenum pname, GLint *params)
}
q = ctx->Query.CurrentOcclusionObject;
break;
-#if FEATURE_EXT_timer_query
case GL_TIME_ELAPSED_EXT:
if (!ctx->Extensions.EXT_timer_query) {
_mesa_error(ctx, GL_INVALID_ENUM, "glEndQueryARB(target)");
@@ -362,7 +359,6 @@ _mesa_GetQueryivARB(GLenum target, GLenum pname, GLint *params)
}
q = ctx->Query.CurrentTimerObject;
break;
-#endif
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetQueryivARB(target)");
return;
@@ -462,12 +458,10 @@ _mesa_GetQueryObjectuivARB(GLuint id, GLenum pname, GLuint *params)
}
-#if FEATURE_EXT_timer_query
-
/**
* New with GL_EXT_timer_query
*/
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT *params)
{
struct gl_query_object *q = NULL;
@@ -504,7 +498,7 @@ _mesa_GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT *params)
/**
* New with GL_EXT_timer_query
*/
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params)
{
struct gl_query_object *q = NULL;
@@ -537,19 +531,35 @@ _mesa_GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params)
}
}
-#endif /* FEATURE_EXT_timer_query */
+
+void
+_mesa_init_queryobj_dispatch(struct _glapi_table *disp)
+{
+ SET_GenQueriesARB(disp, _mesa_GenQueriesARB);
+ SET_DeleteQueriesARB(disp, _mesa_DeleteQueriesARB);
+ SET_IsQueryARB(disp, _mesa_IsQueryARB);
+ SET_BeginQueryARB(disp, _mesa_BeginQueryARB);
+ SET_EndQueryARB(disp, _mesa_EndQueryARB);
+ SET_GetQueryivARB(disp, _mesa_GetQueryivARB);
+ SET_GetQueryObjectivARB(disp, _mesa_GetQueryObjectivARB);
+ SET_GetQueryObjectuivARB(disp, _mesa_GetQueryObjectuivARB);
+
+ SET_GetQueryObjecti64vEXT(disp, _mesa_GetQueryObjecti64vEXT);
+ SET_GetQueryObjectui64vEXT(disp, _mesa_GetQueryObjectui64vEXT);
+}
+
+
+#endif /* FEATURE_queryobj */
/**
* Allocate/init the context state related to query objects.
*/
void
-_mesa_init_query(GLcontext *ctx)
+_mesa_init_queryobj(GLcontext *ctx)
{
-#if FEATURE_ARB_occlusion_query
ctx->Query.QueryObjects = _mesa_NewHashTable();
ctx->Query.CurrentOcclusionObject = NULL;
-#endif
}
@@ -569,7 +579,7 @@ delete_queryobj_cb(GLuint id, void *data, void *userData)
* Free the context state related to query objects.
*/
void
-_mesa_free_query_data(GLcontext *ctx)
+_mesa_free_queryobj_data(GLcontext *ctx)
{
_mesa_HashDeleteAll(ctx->Query.QueryObjects, delete_queryobj_cb, ctx);
_mesa_DeleteHashTable(ctx->Query.QueryObjects);
diff --git a/src/mesa/main/queryobj.h b/src/mesa/main/queryobj.h
index ee775ef959..6cf3c76d74 100644
--- a/src/mesa/main/queryobj.h
+++ b/src/mesa/main/queryobj.h
@@ -23,19 +23,24 @@
*/
-#ifndef OCCLUDE_H
-#define OCCLUDE_H
+#ifndef QUERYOBJ_H
+#define QUERYOBJ_H
-extern void
-_mesa_init_query(GLcontext *ctx);
+#include "main/mtypes.h"
-extern void
-_mesa_free_query_data(GLcontext *ctx);
-extern void
-_mesa_init_query_object_functions(struct dd_function_table *driver);
+#if FEATURE_queryobj
+#define _MESA_INIT_QUERYOBJ_FUNCTIONS(driver, impl) \
+ do { \
+ (driver)->NewQueryObject = impl ## NewQueryObject; \
+ (driver)->DeleteQuery = impl ## DeleteQuery; \
+ (driver)->BeginQuery = impl ## BeginQuery; \
+ (driver)->EndQuery = impl ## EndQuery; \
+ (driver)->WaitQuery = impl ## WaitQuery; \
+ (driver)->CheckQuery = impl ## CheckQuery; \
+ } while (0)
extern void GLAPIENTRY
_mesa_GenQueriesARB(GLsizei n, GLuint *ids);
@@ -47,12 +52,6 @@ extern GLboolean GLAPIENTRY
_mesa_IsQueryARB(GLuint id);
extern void GLAPIENTRY
-_mesa_BeginQueryARB(GLenum target, GLuint id);
-
-extern void GLAPIENTRY
-_mesa_EndQueryARB(GLenum target);
-
-extern void GLAPIENTRY
_mesa_GetQueryivARB(GLenum target, GLenum pname, GLint *params);
extern void GLAPIENTRY
@@ -61,11 +60,33 @@ _mesa_GetQueryObjectivARB(GLuint id, GLenum pname, GLint *params);
extern void GLAPIENTRY
_mesa_GetQueryObjectuivARB(GLuint id, GLenum pname, GLuint *params);
-extern void GLAPIENTRY
-_mesa_GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT *params);
+extern void
+_mesa_init_query_object_functions(struct dd_function_table *driver);
-extern void GLAPIENTRY
-_mesa_GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT *params);
+extern void
+_mesa_init_queryobj_dispatch(struct _glapi_table *disp);
+
+#else /* FEATURE_queryobj */
+
+#define _MESA_INIT_QUERYOBJ_FUNCTIONS(driver, impl) do { } while (0)
+
+static INLINE void
+_mesa_init_query_object_functions(struct dd_function_table *driver)
+{
+}
+
+static INLINE void
+_mesa_init_queryobj_dispatch(struct _glapi_table *disp)
+{
+}
+
+#endif /* FEATURE_queryobj */
+
+extern void
+_mesa_init_queryobj(GLcontext *ctx);
+
+extern void
+_mesa_free_queryobj_data(GLcontext *ctx);
-#endif /* OCCLUDE_H */
+#endif /* QUERYOBJ_H */
diff --git a/src/mesa/main/rastpos.c b/src/mesa/main/rastpos.c
index 9f309d6ab8..703b47ec74 100644
--- a/src/mesa/main/rastpos.c
+++ b/src/mesa/main/rastpos.c
@@ -34,6 +34,10 @@
#include "macros.h"
#include "rastpos.h"
#include "state.h"
+#include "glapi/dispatch.h"
+
+
+#if FEATURE_rastpos
/**
@@ -60,147 +64,147 @@ rasterpos(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos2d(GLdouble x, GLdouble y)
{
rasterpos((GLfloat)x, (GLfloat)y, (GLfloat)0.0, (GLfloat)1.0);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos2f(GLfloat x, GLfloat y)
{
rasterpos(x, y, 0.0F, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos2i(GLint x, GLint y)
{
rasterpos((GLfloat) x, (GLfloat) y, 0.0F, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos2s(GLshort x, GLshort y)
{
rasterpos(x, y, 0.0F, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos3d(GLdouble x, GLdouble y, GLdouble z)
{
rasterpos((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos3f(GLfloat x, GLfloat y, GLfloat z)
{
rasterpos(x, y, z, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos3i(GLint x, GLint y, GLint z)
{
rasterpos((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos3s(GLshort x, GLshort y, GLshort z)
{
rasterpos(x, y, z, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
rasterpos((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
rasterpos(x, y, z, w);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos4i(GLint x, GLint y, GLint z, GLint w)
{
rasterpos((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
{
rasterpos(x, y, z, w);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos2dv(const GLdouble *v)
{
rasterpos((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos2fv(const GLfloat *v)
{
rasterpos(v[0], v[1], 0.0F, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos2iv(const GLint *v)
{
rasterpos((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos2sv(const GLshort *v)
{
rasterpos(v[0], v[1], 0.0F, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos3dv(const GLdouble *v)
{
rasterpos((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos3fv(const GLfloat *v)
{
rasterpos(v[0], v[1], v[2], 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos3iv(const GLint *v)
{
rasterpos((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos3sv(const GLshort *v)
{
rasterpos(v[0], v[1], v[2], 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos4dv(const GLdouble *v)
{
rasterpos((GLfloat) v[0], (GLfloat) v[1],
(GLfloat) v[2], (GLfloat) v[3]);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos4fv(const GLfloat *v)
{
rasterpos(v[0], v[1], v[2], v[3]);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos4iv(const GLint *v)
{
rasterpos((GLfloat) v[0], (GLfloat) v[1],
(GLfloat) v[2], (GLfloat) v[3]);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_RasterPos4sv(const GLshort *v)
{
rasterpos(v[0], v[1], v[2], v[3]);
@@ -211,7 +215,7 @@ _mesa_RasterPos4sv(const GLshort *v)
/*** GL_ARB_window_pos / GL_MESA_window_pos ***/
/**********************************************************************/
-#if FEATURE_drawpix
+
/**
* All glWindowPosMESA and glWindowPosARB commands call this function to
* update the current raster position.
@@ -290,153 +294,152 @@ window_pos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos2dMESA(GLdouble x, GLdouble y)
{
window_pos4f((GLfloat) x, (GLfloat) y, 0.0F, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos2fMESA(GLfloat x, GLfloat y)
{
window_pos4f(x, y, 0.0F, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos2iMESA(GLint x, GLint y)
{
window_pos4f((GLfloat) x, (GLfloat) y, 0.0F, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos2sMESA(GLshort x, GLshort y)
{
window_pos4f(x, y, 0.0F, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z)
{
window_pos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z)
{
window_pos4f(x, y, z, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos3iMESA(GLint x, GLint y, GLint z)
{
window_pos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos3sMESA(GLshort x, GLshort y, GLshort z)
{
window_pos4f(x, y, z, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos4dMESA(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
window_pos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos4fMESA(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
window_pos4f(x, y, z, w);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos4iMESA(GLint x, GLint y, GLint z, GLint w)
{
window_pos4f((GLfloat) x, (GLfloat) y, (GLfloat) z, (GLfloat) w);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos4sMESA(GLshort x, GLshort y, GLshort z, GLshort w)
{
window_pos4f(x, y, z, w);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos2dvMESA(const GLdouble *v)
{
window_pos4f((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos2fvMESA(const GLfloat *v)
{
window_pos4f(v[0], v[1], 0.0F, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos2ivMESA(const GLint *v)
{
window_pos4f((GLfloat) v[0], (GLfloat) v[1], 0.0F, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos2svMESA(const GLshort *v)
{
window_pos4f(v[0], v[1], 0.0F, 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos3dvMESA(const GLdouble *v)
{
window_pos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos3fvMESA(const GLfloat *v)
{
window_pos4f(v[0], v[1], v[2], 1.0);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos3ivMESA(const GLint *v)
{
window_pos4f((GLfloat) v[0], (GLfloat) v[1], (GLfloat) v[2], 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos3svMESA(const GLshort *v)
{
window_pos4f(v[0], v[1], v[2], 1.0F);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos4dvMESA(const GLdouble *v)
{
window_pos4f((GLfloat) v[0], (GLfloat) v[1],
(GLfloat) v[2], (GLfloat) v[3]);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos4fvMESA(const GLfloat *v)
{
window_pos4f(v[0], v[1], v[2], v[3]);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos4ivMESA(const GLint *v)
{
window_pos4f((GLfloat) v[0], (GLfloat) v[1],
(GLfloat) v[2], (GLfloat) v[3]);
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_WindowPos4svMESA(const GLshort *v)
{
window_pos4f(v[0], v[1], v[2], v[3]);
}
-#endif
#if 0
@@ -477,6 +480,65 @@ void glWindowPos4fMESA( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
#endif
+void
+_mesa_init_rastpos_dispatch(struct _glapi_table *disp)
+{
+ SET_RasterPos2f(disp, _mesa_RasterPos2f);
+ SET_RasterPos2fv(disp, _mesa_RasterPos2fv);
+ SET_RasterPos2i(disp, _mesa_RasterPos2i);
+ SET_RasterPos2iv(disp, _mesa_RasterPos2iv);
+ SET_RasterPos2d(disp, _mesa_RasterPos2d);
+ SET_RasterPos2dv(disp, _mesa_RasterPos2dv);
+ SET_RasterPos2s(disp, _mesa_RasterPos2s);
+ SET_RasterPos2sv(disp, _mesa_RasterPos2sv);
+ SET_RasterPos3d(disp, _mesa_RasterPos3d);
+ SET_RasterPos3dv(disp, _mesa_RasterPos3dv);
+ SET_RasterPos3f(disp, _mesa_RasterPos3f);
+ SET_RasterPos3fv(disp, _mesa_RasterPos3fv);
+ SET_RasterPos3i(disp, _mesa_RasterPos3i);
+ SET_RasterPos3iv(disp, _mesa_RasterPos3iv);
+ SET_RasterPos3s(disp, _mesa_RasterPos3s);
+ SET_RasterPos3sv(disp, _mesa_RasterPos3sv);
+ SET_RasterPos4d(disp, _mesa_RasterPos4d);
+ SET_RasterPos4dv(disp, _mesa_RasterPos4dv);
+ SET_RasterPos4f(disp, _mesa_RasterPos4f);
+ SET_RasterPos4fv(disp, _mesa_RasterPos4fv);
+ SET_RasterPos4i(disp, _mesa_RasterPos4i);
+ SET_RasterPos4iv(disp, _mesa_RasterPos4iv);
+ SET_RasterPos4s(disp, _mesa_RasterPos4s);
+ SET_RasterPos4sv(disp, _mesa_RasterPos4sv);
+
+ /* 197. GL_MESA_window_pos */
+ SET_WindowPos2dMESA(disp, _mesa_WindowPos2dMESA);
+ SET_WindowPos2dvMESA(disp, _mesa_WindowPos2dvMESA);
+ SET_WindowPos2fMESA(disp, _mesa_WindowPos2fMESA);
+ SET_WindowPos2fvMESA(disp, _mesa_WindowPos2fvMESA);
+ SET_WindowPos2iMESA(disp, _mesa_WindowPos2iMESA);
+ SET_WindowPos2ivMESA(disp, _mesa_WindowPos2ivMESA);
+ SET_WindowPos2sMESA(disp, _mesa_WindowPos2sMESA);
+ SET_WindowPos2svMESA(disp, _mesa_WindowPos2svMESA);
+ SET_WindowPos3dMESA(disp, _mesa_WindowPos3dMESA);
+ SET_WindowPos3dvMESA(disp, _mesa_WindowPos3dvMESA);
+ SET_WindowPos3fMESA(disp, _mesa_WindowPos3fMESA);
+ SET_WindowPos3fvMESA(disp, _mesa_WindowPos3fvMESA);
+ SET_WindowPos3iMESA(disp, _mesa_WindowPos3iMESA);
+ SET_WindowPos3ivMESA(disp, _mesa_WindowPos3ivMESA);
+ SET_WindowPos3sMESA(disp, _mesa_WindowPos3sMESA);
+ SET_WindowPos3svMESA(disp, _mesa_WindowPos3svMESA);
+ SET_WindowPos4dMESA(disp, _mesa_WindowPos4dMESA);
+ SET_WindowPos4dvMESA(disp, _mesa_WindowPos4dvMESA);
+ SET_WindowPos4fMESA(disp, _mesa_WindowPos4fMESA);
+ SET_WindowPos4fvMESA(disp, _mesa_WindowPos4fvMESA);
+ SET_WindowPos4iMESA(disp, _mesa_WindowPos4iMESA);
+ SET_WindowPos4ivMESA(disp, _mesa_WindowPos4ivMESA);
+ SET_WindowPos4sMESA(disp, _mesa_WindowPos4sMESA);
+ SET_WindowPos4svMESA(disp, _mesa_WindowPos4svMESA);
+}
+
+
+#endif /* FEATURE_rastpos */
+
+
/**********************************************************************/
/** \name Initialization */
/**********************************************************************/
diff --git a/src/mesa/main/rastpos.h b/src/mesa/main/rastpos.h
index 363f86ad87..b2127225b6 100644
--- a/src/mesa/main/rastpos.h
+++ b/src/mesa/main/rastpos.h
@@ -32,162 +32,33 @@
#define RASTPOS_H
-#include "glheader.h"
+#include "main/mtypes.h"
-extern void GLAPIENTRY
-_mesa_RasterPos2d(GLdouble x, GLdouble y);
+#if FEATURE_rastpos
-extern void GLAPIENTRY
-_mesa_RasterPos2f(GLfloat x, GLfloat y);
+#define _MESA_INIT_RASTPOS_FUNCTIONS(driver, impl) \
+ do { \
+ (driver)->RasterPos = impl ## RasterPos; \
+ } while (0)
-extern void GLAPIENTRY
-_mesa_RasterPos2i(GLint x, GLint y);
+extern void
+_mesa_init_rastpos_dispatch(struct _glapi_table *disp);
-extern void GLAPIENTRY
-_mesa_RasterPos2s(GLshort x, GLshort y);
+#else /* FEATURE_rastpos */
-extern void GLAPIENTRY
-_mesa_RasterPos3d(GLdouble x, GLdouble y, GLdouble z);
+#define _MESA_INIT_RASTPOS_FUNCTIONS(driver, impl) do { } while (0)
-extern void GLAPIENTRY
-_mesa_RasterPos3f(GLfloat x, GLfloat y, GLfloat z);
+static INLINE void
+_mesa_init_rastpos_dispatch(struct _glapi_table *disp)
+{
+}
-extern void GLAPIENTRY
-_mesa_RasterPos3i(GLint x, GLint y, GLint z);
-
-extern void GLAPIENTRY
-_mesa_RasterPos3s(GLshort x, GLshort y, GLshort z);
-
-extern void GLAPIENTRY
-_mesa_RasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-
-extern void GLAPIENTRY
-_mesa_RasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-
-extern void GLAPIENTRY
-_mesa_RasterPos4i(GLint x, GLint y, GLint z, GLint w);
-
-extern void GLAPIENTRY
-_mesa_RasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w);
-
-extern void GLAPIENTRY
-_mesa_RasterPos2dv(const GLdouble *v);
-
-extern void GLAPIENTRY
-_mesa_RasterPos2fv(const GLfloat *v);
-
-extern void GLAPIENTRY
-_mesa_RasterPos2iv(const GLint *v);
-
-extern void GLAPIENTRY
-_mesa_RasterPos2sv(const GLshort *v);
-
-extern void GLAPIENTRY
-_mesa_RasterPos3dv(const GLdouble *v);
-
-extern void GLAPIENTRY
-_mesa_RasterPos3fv(const GLfloat *v);
-
-extern void GLAPIENTRY
-_mesa_RasterPos3iv(const GLint *v);
-
-extern void GLAPIENTRY
-_mesa_RasterPos3sv(const GLshort *v);
-
-extern void GLAPIENTRY
-_mesa_RasterPos4dv(const GLdouble *v);
-
-extern void GLAPIENTRY
-_mesa_RasterPos4fv(const GLfloat *v);
-
-extern void GLAPIENTRY
-_mesa_RasterPos4iv(const GLint *v);
-
-extern void GLAPIENTRY
-_mesa_RasterPos4sv(const GLshort *v);
-
-
-/**********************************************************************/
-/** \name GL_MESA_window_pos */
-/**********************************************************************/
-/*@{*/
-
-extern void GLAPIENTRY
-_mesa_WindowPos2dMESA(GLdouble x, GLdouble y);
-
-extern void GLAPIENTRY
-_mesa_WindowPos2fMESA(GLfloat x, GLfloat y);
-
-extern void GLAPIENTRY
-_mesa_WindowPos2iMESA(GLint x, GLint y);
-
-extern void GLAPIENTRY
-_mesa_WindowPos2sMESA(GLshort x, GLshort y);
-
-extern void GLAPIENTRY
-_mesa_WindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z);
-
-extern void GLAPIENTRY
-_mesa_WindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z);
-
-extern void GLAPIENTRY
-_mesa_WindowPos3iMESA(GLint x, GLint y, GLint z);
-
-extern void GLAPIENTRY
-_mesa_WindowPos3sMESA(GLshort x, GLshort y, GLshort z);
-
-extern void GLAPIENTRY
-_mesa_WindowPos4dMESA(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
-
-extern void GLAPIENTRY
-_mesa_WindowPos4fMESA(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
-
-extern void GLAPIENTRY
-_mesa_WindowPos4iMESA(GLint x, GLint y, GLint z, GLint w);
-
-extern void GLAPIENTRY
-_mesa_WindowPos4sMESA(GLshort x, GLshort y, GLshort z, GLshort w);
-
-extern void GLAPIENTRY
-_mesa_WindowPos2dvMESA(const GLdouble *v);
-
-extern void GLAPIENTRY
-_mesa_WindowPos2fvMESA(const GLfloat *v);
-
-extern void GLAPIENTRY
-_mesa_WindowPos2ivMESA(const GLint *v);
-
-extern void GLAPIENTRY
-_mesa_WindowPos2svMESA(const GLshort *v);
-
-extern void GLAPIENTRY
-_mesa_WindowPos3dvMESA(const GLdouble *v);
-
-extern void GLAPIENTRY
-_mesa_WindowPos3fvMESA(const GLfloat *v);
-
-extern void GLAPIENTRY
-_mesa_WindowPos3ivMESA(const GLint *v);
-
-extern void GLAPIENTRY
-_mesa_WindowPos3svMESA(const GLshort *v);
-
-extern void GLAPIENTRY
-_mesa_WindowPos4dvMESA(const GLdouble *v);
-
-extern void GLAPIENTRY
-_mesa_WindowPos4fvMESA(const GLfloat *v);
-
-extern void GLAPIENTRY
-_mesa_WindowPos4ivMESA(const GLint *v);
-
-extern void GLAPIENTRY
-_mesa_WindowPos4svMESA(const GLshort *v);
+#endif /* FEATURE_rastpos */
extern void
-_mesa_init_rastpos( GLcontext * ctx );
+_mesa_init_rastpos(GLcontext *ctx);
/*@}*/
-#endif
+#endif /* RASTPOS_H */
diff --git a/src/mesa/main/rbadaptors.c b/src/mesa/main/rbadaptors.c
index c1ac0606c8..1060c5796e 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 0000000000..0385ae8d7d
--- /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 <olv@0xlab.org>
+ *
+ * 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 0000000000..7fb56e3600
--- /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 <olv@0xlab.org>
+ *
+ * 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 0000000000..3886f41862
--- /dev/null
+++ b/src/mesa/main/remap_helper.h
@@ -0,0 +1,5883 @@
+/* DO NOT EDIT - This file generated automatically by remap_helper.py (from Mesa) script */
+
+/*
+ * Copyright (C) 2009 Chia-I Wu <olv@0xlab.org>
+ * 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]: DepthMask (offset 211) */
+ "i\0"
+ "glDepthMask\0"
+ "\0"
+ /* _mesa_function_pool[10728]: IsShader (will be remapped) */
+ "i\0"
+ "glIsShader\0"
+ "\0"
+ /* _mesa_function_pool[10742]: Indexf (offset 46) */
+ "f\0"
+ "glIndexf\0"
+ "\0"
+ /* _mesa_function_pool[10754]: GetImageTransformParameterivHP (dynamic) */
+ "iip\0"
+ "glGetImageTransformParameterivHP\0"
+ "\0"
+ /* _mesa_function_pool[10792]: Indexd (offset 44) */
+ "d\0"
+ "glIndexd\0"
+ "\0"
+ /* _mesa_function_pool[10804]: GetMaterialiv (offset 270) */
+ "iip\0"
+ "glGetMaterialiv\0"
+ "\0"
+ /* _mesa_function_pool[10825]: StencilOp (offset 244) */
+ "iii\0"
+ "glStencilOp\0"
+ "\0"
+ /* _mesa_function_pool[10842]: WindowPos4ivMESA (will be remapped) */
+ "p\0"
+ "glWindowPos4ivMESA\0"
+ "\0"
+ /* _mesa_function_pool[10864]: MultiTexCoord3svARB (offset 399) */
+ "ip\0"
+ "glMultiTexCoord3sv\0"
+ "glMultiTexCoord3svARB\0"
+ "\0"
+ /* _mesa_function_pool[10909]: TexEnvfv (offset 185) */
+ "iip\0"
+ "glTexEnvfv\0"
+ "\0"
+ /* _mesa_function_pool[10925]: MultiTexCoord4iARB (offset 404) */
+ "iiiii\0"
+ "glMultiTexCoord4i\0"
+ "glMultiTexCoord4iARB\0"
+ "\0"
+ /* _mesa_function_pool[10971]: Indexs (offset 50) */
+ "i\0"
+ "glIndexs\0"
+ "\0"
+ /* _mesa_function_pool[10983]: Binormal3ivEXT (dynamic) */
+ "p\0"
+ "glBinormal3ivEXT\0"
+ "\0"
+ /* _mesa_function_pool[11003]: ResizeBuffersMESA (will be remapped) */
+ "\0"
+ "glResizeBuffersMESA\0"
+ "\0"
+ /* _mesa_function_pool[11025]: GetUniformivARB (will be remapped) */
+ "iip\0"
+ "glGetUniformiv\0"
+ "glGetUniformivARB\0"
+ "\0"
+ /* _mesa_function_pool[11063]: PixelTexGenParameteriSGIS (will be remapped) */
+ "ii\0"
+ "glPixelTexGenParameteriSGIS\0"
+ "\0"
+ /* _mesa_function_pool[11095]: VertexPointervINTEL (dynamic) */
+ "iip\0"
+ "glVertexPointervINTEL\0"
+ "\0"
+ /* _mesa_function_pool[11122]: Vertex2i (offset 130) */
+ "ii\0"
+ "glVertex2i\0"
+ "\0"
+ /* _mesa_function_pool[11137]: LoadMatrixf (offset 291) */
+ "p\0"
+ "glLoadMatrixf\0"
+ "\0"
+ /* _mesa_function_pool[11154]: Vertex2f (offset 128) */
+ "ff\0"
+ "glVertex2f\0"
+ "\0"
+ /* _mesa_function_pool[11169]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
+ "pppp\0"
+ "glReplacementCodeuiColor4fNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[11222]: Color4bv (offset 26) */
+ "p\0"
+ "glColor4bv\0"
+ "\0"
+ /* _mesa_function_pool[11236]: VertexPointer (offset 321) */
+ "iiip\0"
+ "glVertexPointer\0"
+ "\0"
+ /* _mesa_function_pool[11258]: SecondaryColor3uiEXT (will be remapped) */
+ "iii\0"
+ "glSecondaryColor3ui\0"
+ "glSecondaryColor3uiEXT\0"
+ "\0"
+ /* _mesa_function_pool[11306]: StartInstrumentsSGIX (dynamic) */
+ "\0"
+ "glStartInstrumentsSGIX\0"
+ "\0"
+ /* _mesa_function_pool[11331]: SecondaryColor3usvEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3usv\0"
+ "glSecondaryColor3usvEXT\0"
+ "\0"
+ /* _mesa_function_pool[11379]: VertexAttrib2fvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2fvNV\0"
+ "\0"
+ /* _mesa_function_pool[11403]: ProgramLocalParameter4dvARB (will be remapped) */
+ "iip\0"
+ "glProgramLocalParameter4dvARB\0"
+ "\0"
+ /* _mesa_function_pool[11438]: DeleteLists (offset 4) */
+ "ii\0"
+ "glDeleteLists\0"
+ "\0"
+ /* _mesa_function_pool[11456]: LogicOp (offset 242) */
+ "i\0"
+ "glLogicOp\0"
+ "\0"
+ /* _mesa_function_pool[11469]: MatrixIndexuivARB (dynamic) */
+ "ip\0"
+ "glMatrixIndexuivARB\0"
+ "\0"
+ /* _mesa_function_pool[11493]: Vertex2s (offset 132) */
+ "ii\0"
+ "glVertex2s\0"
+ "\0"
+ /* _mesa_function_pool[11508]: RenderbufferStorageMultisample (will be remapped) */
+ "iiiii\0"
+ "glRenderbufferStorageMultisample\0"
+ "\0"
+ /* _mesa_function_pool[11548]: TexCoord4fv (offset 121) */
+ "p\0"
+ "glTexCoord4fv\0"
+ "\0"
+ /* _mesa_function_pool[11565]: Tangent3sEXT (dynamic) */
+ "iii\0"
+ "glTangent3sEXT\0"
+ "\0"
+ /* _mesa_function_pool[11585]: GlobalAlphaFactorfSUN (dynamic) */
+ "f\0"
+ "glGlobalAlphaFactorfSUN\0"
+ "\0"
+ /* _mesa_function_pool[11612]: MultiTexCoord3iARB (offset 396) */
+ "iiii\0"
+ "glMultiTexCoord3i\0"
+ "glMultiTexCoord3iARB\0"
+ "\0"
+ /* _mesa_function_pool[11657]: IsProgram (will be remapped) */
+ "i\0"
+ "glIsProgram\0"
+ "\0"
+ /* _mesa_function_pool[11672]: TexCoordPointerListIBM (dynamic) */
+ "iiipi\0"
+ "glTexCoordPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[11704]: GlobalAlphaFactorusSUN (dynamic) */
+ "i\0"
+ "glGlobalAlphaFactorusSUN\0"
+ "\0"
+ /* _mesa_function_pool[11732]: VertexAttrib2dvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2dvNV\0"
+ "\0"
+ /* _mesa_function_pool[11756]: FramebufferRenderbufferEXT (will be remapped) */
+ "iiii\0"
+ "glFramebufferRenderbuffer\0"
+ "glFramebufferRenderbufferEXT\0"
+ "\0"
+ /* _mesa_function_pool[11817]: VertexAttrib1dvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib1dvNV\0"
+ "\0"
+ /* _mesa_function_pool[11841]: GenTextures (offset 328) */
+ "ip\0"
+ "glGenTextures\0"
+ "glGenTexturesEXT\0"
+ "\0"
+ /* _mesa_function_pool[11876]: SetFenceNV (will be remapped) */
+ "ii\0"
+ "glSetFenceNV\0"
+ "\0"
+ /* _mesa_function_pool[11893]: FramebufferTexture1DEXT (will be remapped) */
+ "iiiii\0"
+ "glFramebufferTexture1D\0"
+ "glFramebufferTexture1DEXT\0"
+ "\0"
+ /* _mesa_function_pool[11949]: GetCombinerOutputParameterivNV (will be remapped) */
+ "iiip\0"
+ "glGetCombinerOutputParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[11988]: MultiModeDrawArraysIBM (will be remapped) */
+ "pppii\0"
+ "glMultiModeDrawArraysIBM\0"
+ "\0"
+ /* _mesa_function_pool[12020]: PixelTexGenParameterivSGIS (will be remapped) */
+ "ip\0"
+ "glPixelTexGenParameterivSGIS\0"
+ "\0"
+ /* _mesa_function_pool[12053]: TextureNormalEXT (dynamic) */
+ "i\0"
+ "glTextureNormalEXT\0"
+ "\0"
+ /* _mesa_function_pool[12075]: IndexPointerListIBM (dynamic) */
+ "iipi\0"
+ "glIndexPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[12103]: WeightfvARB (dynamic) */
+ "ip\0"
+ "glWeightfvARB\0"
+ "\0"
+ /* _mesa_function_pool[12121]: RasterPos2sv (offset 69) */
+ "p\0"
+ "glRasterPos2sv\0"
+ "\0"
+ /* _mesa_function_pool[12139]: Color4ubv (offset 36) */
+ "p\0"
+ "glColor4ubv\0"
+ "\0"
+ /* _mesa_function_pool[12154]: DrawBuffer (offset 202) */
+ "i\0"
+ "glDrawBuffer\0"
+ "\0"
+ /* _mesa_function_pool[12170]: TexCoord2fv (offset 105) */
+ "p\0"
+ "glTexCoord2fv\0"
+ "\0"
+ /* _mesa_function_pool[12187]: WindowPos4fMESA (will be remapped) */
+ "ffff\0"
+ "glWindowPos4fMESA\0"
+ "\0"
+ /* _mesa_function_pool[12211]: TexCoord1sv (offset 101) */
+ "p\0"
+ "glTexCoord1sv\0"
+ "\0"
+ /* _mesa_function_pool[12228]: WindowPos3dvMESA (will be remapped) */
+ "p\0"
+ "glWindowPos3dv\0"
+ "glWindowPos3dvARB\0"
+ "glWindowPos3dvMESA\0"
+ "\0"
+ /* _mesa_function_pool[12283]: DepthFunc (offset 245) */
+ "i\0"
+ "glDepthFunc\0"
+ "\0"
+ /* _mesa_function_pool[12298]: PixelMapusv (offset 253) */
+ "iip\0"
+ "glPixelMapusv\0"
+ "\0"
+ /* _mesa_function_pool[12317]: GetQueryObjecti64vEXT (will be remapped) */
+ "iip\0"
+ "glGetQueryObjecti64vEXT\0"
+ "\0"
+ /* _mesa_function_pool[12346]: MultiTexCoord1dARB (offset 376) */
+ "id\0"
+ "glMultiTexCoord1d\0"
+ "glMultiTexCoord1dARB\0"
+ "\0"
+ /* _mesa_function_pool[12389]: PointParameterivNV (will be remapped) */
+ "ip\0"
+ "glPointParameteriv\0"
+ "glPointParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[12433]: BlendFunc (offset 241) */
+ "ii\0"
+ "glBlendFunc\0"
+ "\0"
+ /* _mesa_function_pool[12449]: Uniform2fvARB (will be remapped) */
+ "iip\0"
+ "glUniform2fv\0"
+ "glUniform2fvARB\0"
+ "\0"
+ /* _mesa_function_pool[12483]: BufferParameteriAPPLE (will be remapped) */
+ "iii\0"
+ "glBufferParameteriAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[12512]: MultiTexCoord3dvARB (offset 393) */
+ "ip\0"
+ "glMultiTexCoord3dv\0"
+ "glMultiTexCoord3dvARB\0"
+ "\0"
+ /* _mesa_function_pool[12557]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ "pppp\0"
+ "glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[12613]: DeleteObjectARB (will be remapped) */
+ "i\0"
+ "glDeleteObjectARB\0"
+ "\0"
+ /* _mesa_function_pool[12634]: MatrixIndexPointerARB (dynamic) */
+ "iiip\0"
+ "glMatrixIndexPointerARB\0"
+ "\0"
+ /* _mesa_function_pool[12664]: ProgramNamedParameter4dvNV (will be remapped) */
+ "iipp\0"
+ "glProgramNamedParameter4dvNV\0"
+ "\0"
+ /* _mesa_function_pool[12699]: Tangent3fvEXT (dynamic) */
+ "p\0"
+ "glTangent3fvEXT\0"
+ "\0"
+ /* _mesa_function_pool[12718]: Flush (offset 217) */
+ "\0"
+ "glFlush\0"
+ "\0"
+ /* _mesa_function_pool[12728]: Color4uiv (offset 38) */
+ "p\0"
+ "glColor4uiv\0"
+ "\0"
+ /* _mesa_function_pool[12743]: GenVertexArrays (will be remapped) */
+ "ip\0"
+ "glGenVertexArrays\0"
+ "\0"
+ /* _mesa_function_pool[12765]: RasterPos3sv (offset 77) */
+ "p\0"
+ "glRasterPos3sv\0"
+ "\0"
+ /* _mesa_function_pool[12783]: BindFramebufferEXT (will be remapped) */
+ "ii\0"
+ "glBindFramebuffer\0"
+ "glBindFramebufferEXT\0"
+ "\0"
+ /* _mesa_function_pool[12826]: ReferencePlaneSGIX (dynamic) */
+ "p\0"
+ "glReferencePlaneSGIX\0"
+ "\0"
+ /* _mesa_function_pool[12850]: PushAttrib (offset 219) */
+ "i\0"
+ "glPushAttrib\0"
+ "\0"
+ /* _mesa_function_pool[12866]: RasterPos2i (offset 66) */
+ "ii\0"
+ "glRasterPos2i\0"
+ "\0"
+ /* _mesa_function_pool[12884]: ValidateProgramARB (will be remapped) */
+ "i\0"
+ "glValidateProgram\0"
+ "glValidateProgramARB\0"
+ "\0"
+ /* _mesa_function_pool[12926]: TexParameteriv (offset 181) */
+ "iip\0"
+ "glTexParameteriv\0"
+ "\0"
+ /* _mesa_function_pool[12948]: UnlockArraysEXT (will be remapped) */
+ "\0"
+ "glUnlockArraysEXT\0"
+ "\0"
+ /* _mesa_function_pool[12968]: TexCoord2fColor3fVertex3fSUN (dynamic) */
+ "ffffffff\0"
+ "glTexCoord2fColor3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[13009]: WindowPos3fvMESA (will be remapped) */
+ "p\0"
+ "glWindowPos3fv\0"
+ "glWindowPos3fvARB\0"
+ "glWindowPos3fvMESA\0"
+ "\0"
+ /* _mesa_function_pool[13064]: RasterPos2f (offset 64) */
+ "ff\0"
+ "glRasterPos2f\0"
+ "\0"
+ /* _mesa_function_pool[13082]: VertexAttrib1svNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib1svNV\0"
+ "\0"
+ /* _mesa_function_pool[13106]: RasterPos2d (offset 62) */
+ "dd\0"
+ "glRasterPos2d\0"
+ "\0"
+ /* _mesa_function_pool[13124]: RasterPos3fv (offset 73) */
+ "p\0"
+ "glRasterPos3fv\0"
+ "\0"
+ /* _mesa_function_pool[13142]: CopyTexSubImage3D (offset 373) */
+ "iiiiiiiii\0"
+ "glCopyTexSubImage3D\0"
+ "glCopyTexSubImage3DEXT\0"
+ "\0"
+ /* _mesa_function_pool[13196]: VertexAttrib2dARB (will be remapped) */
+ "idd\0"
+ "glVertexAttrib2d\0"
+ "glVertexAttrib2dARB\0"
+ "\0"
+ /* _mesa_function_pool[13238]: Color4ub (offset 35) */
+ "iiii\0"
+ "glColor4ub\0"
+ "\0"
+ /* _mesa_function_pool[13255]: GetInteger64v (will be remapped) */
+ "ip\0"
+ "glGetInteger64v\0"
+ "\0"
+ /* _mesa_function_pool[13275]: TextureColorMaskSGIS (dynamic) */
+ "iiii\0"
+ "glTextureColorMaskSGIS\0"
+ "\0"
+ /* _mesa_function_pool[13304]: RasterPos2s (offset 68) */
+ "ii\0"
+ "glRasterPos2s\0"
+ "\0"
+ /* _mesa_function_pool[13322]: GetColorTable (offset 343) */
+ "iiip\0"
+ "glGetColorTable\0"
+ "glGetColorTableSGI\0"
+ "glGetColorTableEXT\0"
+ "\0"
+ /* _mesa_function_pool[13382]: SelectBuffer (offset 195) */
+ "ip\0"
+ "glSelectBuffer\0"
+ "\0"
+ /* _mesa_function_pool[13401]: Indexiv (offset 49) */
+ "p\0"
+ "glIndexiv\0"
+ "\0"
+ /* _mesa_function_pool[13414]: TexCoord3i (offset 114) */
+ "iii\0"
+ "glTexCoord3i\0"
+ "\0"
+ /* _mesa_function_pool[13432]: CopyColorTable (offset 342) */
+ "iiiii\0"
+ "glCopyColorTable\0"
+ "glCopyColorTableSGI\0"
+ "\0"
+ /* _mesa_function_pool[13476]: GetHistogramParameterfv (offset 362) */
+ "iip\0"
+ "glGetHistogramParameterfv\0"
+ "glGetHistogramParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[13536]: Frustum (offset 289) */
+ "dddddd\0"
+ "glFrustum\0"
+ "\0"
+ /* _mesa_function_pool[13554]: GetString (offset 275) */
+ "i\0"
+ "glGetString\0"
+ "\0"
+ /* _mesa_function_pool[13569]: ColorPointervINTEL (dynamic) */
+ "iip\0"
+ "glColorPointervINTEL\0"
+ "\0"
+ /* _mesa_function_pool[13595]: TexEnvf (offset 184) */
+ "iif\0"
+ "glTexEnvf\0"
+ "\0"
+ /* _mesa_function_pool[13610]: TexCoord3d (offset 110) */
+ "ddd\0"
+ "glTexCoord3d\0"
+ "\0"
+ /* _mesa_function_pool[13628]: AlphaFragmentOp1ATI (will be remapped) */
+ "iiiiii\0"
+ "glAlphaFragmentOp1ATI\0"
+ "\0"
+ /* _mesa_function_pool[13658]: TexCoord3f (offset 112) */
+ "fff\0"
+ "glTexCoord3f\0"
+ "\0"
+ /* _mesa_function_pool[13676]: MultiTexCoord3ivARB (offset 397) */
+ "ip\0"
+ "glMultiTexCoord3iv\0"
+ "glMultiTexCoord3ivARB\0"
+ "\0"
+ /* _mesa_function_pool[13721]: MultiTexCoord2sARB (offset 390) */
+ "iii\0"
+ "glMultiTexCoord2s\0"
+ "glMultiTexCoord2sARB\0"
+ "\0"
+ /* _mesa_function_pool[13765]: VertexAttrib1dvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib1dv\0"
+ "glVertexAttrib1dvARB\0"
+ "\0"
+ /* _mesa_function_pool[13808]: DeleteTextures (offset 327) */
+ "ip\0"
+ "glDeleteTextures\0"
+ "glDeleteTexturesEXT\0"
+ "\0"
+ /* _mesa_function_pool[13849]: TexCoordPointerEXT (will be remapped) */
+ "iiiip\0"
+ "glTexCoordPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[13877]: TexSubImage4DSGIS (dynamic) */
+ "iiiiiiiiiiiip\0"
+ "glTexSubImage4DSGIS\0"
+ "\0"
+ /* _mesa_function_pool[13912]: TexCoord3s (offset 116) */
+ "iii\0"
+ "glTexCoord3s\0"
+ "\0"
+ /* _mesa_function_pool[13930]: GetTexLevelParameteriv (offset 285) */
+ "iiip\0"
+ "glGetTexLevelParameteriv\0"
+ "\0"
+ /* _mesa_function_pool[13961]: CombinerStageParameterfvNV (dynamic) */
+ "iip\0"
+ "glCombinerStageParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[13995]: StopInstrumentsSGIX (dynamic) */
+ "i\0"
+ "glStopInstrumentsSGIX\0"
+ "\0"
+ /* _mesa_function_pool[14020]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
+ "fffffffffffffff\0"
+ "glTexCoord4fColor4fNormal3fVertex4fSUN\0"
+ "\0"
+ /* _mesa_function_pool[14076]: ClearAccum (offset 204) */
+ "ffff\0"
+ "glClearAccum\0"
+ "\0"
+ /* _mesa_function_pool[14095]: DeformSGIX (dynamic) */
+ "i\0"
+ "glDeformSGIX\0"
+ "\0"
+ /* _mesa_function_pool[14111]: GetVertexAttribfvARB (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribfv\0"
+ "glGetVertexAttribfvARB\0"
+ "\0"
+ /* _mesa_function_pool[14159]: SecondaryColor3ivEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3iv\0"
+ "glSecondaryColor3ivEXT\0"
+ "\0"
+ /* _mesa_function_pool[14205]: TexCoord4iv (offset 123) */
+ "p\0"
+ "glTexCoord4iv\0"
+ "\0"
+ /* _mesa_function_pool[14222]: UniformMatrix4x2fv (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix4x2fv\0"
+ "\0"
+ /* _mesa_function_pool[14249]: GetDetailTexFuncSGIS (dynamic) */
+ "ip\0"
+ "glGetDetailTexFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[14276]: GetCombinerStageParameterfvNV (dynamic) */
+ "iip\0"
+ "glGetCombinerStageParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[14313]: PolygonOffset (offset 319) */
+ "ff\0"
+ "glPolygonOffset\0"
+ "\0"
+ /* _mesa_function_pool[14333]: BindVertexArray (will be remapped) */
+ "i\0"
+ "glBindVertexArray\0"
+ "\0"
+ /* _mesa_function_pool[14354]: Color4ubVertex2fvSUN (dynamic) */
+ "pp\0"
+ "glColor4ubVertex2fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[14381]: Rectd (offset 86) */
+ "dddd\0"
+ "glRectd\0"
+ "\0"
+ /* _mesa_function_pool[14395]: TexFilterFuncSGIS (dynamic) */
+ "iiip\0"
+ "glTexFilterFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[14421]: SampleMaskSGIS (will be remapped) */
+ "fi\0"
+ "glSampleMaskSGIS\0"
+ "glSampleMaskEXT\0"
+ "\0"
+ /* _mesa_function_pool[14458]: GetAttribLocationARB (will be remapped) */
+ "ip\0"
+ "glGetAttribLocation\0"
+ "glGetAttribLocationARB\0"
+ "\0"
+ /* _mesa_function_pool[14505]: RasterPos3i (offset 74) */
+ "iii\0"
+ "glRasterPos3i\0"
+ "\0"
+ /* _mesa_function_pool[14524]: VertexAttrib4ubvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4ubv\0"
+ "glVertexAttrib4ubvARB\0"
+ "\0"
+ /* _mesa_function_pool[14569]: DetailTexFuncSGIS (dynamic) */
+ "iip\0"
+ "glDetailTexFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[14594]: Normal3fVertex3fSUN (dynamic) */
+ "ffffff\0"
+ "glNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[14624]: CopyTexImage2D (offset 324) */
+ "iiiiiiii\0"
+ "glCopyTexImage2D\0"
+ "glCopyTexImage2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[14671]: GetBufferPointervARB (will be remapped) */
+ "iip\0"
+ "glGetBufferPointerv\0"
+ "glGetBufferPointervARB\0"
+ "\0"
+ /* _mesa_function_pool[14719]: ProgramEnvParameter4fARB (will be remapped) */
+ "iiffff\0"
+ "glProgramEnvParameter4fARB\0"
+ "glProgramParameter4fNV\0"
+ "\0"
+ /* _mesa_function_pool[14777]: Uniform3ivARB (will be remapped) */
+ "iip\0"
+ "glUniform3iv\0"
+ "glUniform3ivARB\0"
+ "\0"
+ /* _mesa_function_pool[14811]: Lightfv (offset 160) */
+ "iip\0"
+ "glLightfv\0"
+ "\0"
+ /* _mesa_function_pool[14826]: ClearDepth (offset 208) */
+ "d\0"
+ "glClearDepth\0"
+ "\0"
+ /* _mesa_function_pool[14842]: GetFenceivNV (will be remapped) */
+ "iip\0"
+ "glGetFenceivNV\0"
+ "\0"
+ /* _mesa_function_pool[14862]: WindowPos4dvMESA (will be remapped) */
+ "p\0"
+ "glWindowPos4dvMESA\0"
+ "\0"
+ /* _mesa_function_pool[14884]: ColorSubTable (offset 346) */
+ "iiiiip\0"
+ "glColorSubTable\0"
+ "glColorSubTableEXT\0"
+ "\0"
+ /* _mesa_function_pool[14927]: Color4fv (offset 30) */
+ "p\0"
+ "glColor4fv\0"
+ "\0"
+ /* _mesa_function_pool[14941]: MultiTexCoord4ivARB (offset 405) */
+ "ip\0"
+ "glMultiTexCoord4iv\0"
+ "glMultiTexCoord4ivARB\0"
+ "\0"
+ /* _mesa_function_pool[14986]: ProgramLocalParameters4fvEXT (will be remapped) */
+ "iiip\0"
+ "glProgramLocalParameters4fvEXT\0"
+ "\0"
+ /* _mesa_function_pool[15023]: ColorPointer (offset 308) */
+ "iiip\0"
+ "glColorPointer\0"
+ "\0"
+ /* _mesa_function_pool[15044]: Rects (offset 92) */
+ "iiii\0"
+ "glRects\0"
+ "\0"
+ /* _mesa_function_pool[15058]: GetMapAttribParameterfvNV (dynamic) */
+ "iiip\0"
+ "glGetMapAttribParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[15092]: Lightiv (offset 162) */
+ "iip\0"
+ "glLightiv\0"
+ "\0"
+ /* _mesa_function_pool[15107]: VertexAttrib4sARB (will be remapped) */
+ "iiiii\0"
+ "glVertexAttrib4s\0"
+ "glVertexAttrib4sARB\0"
+ "\0"
+ /* _mesa_function_pool[15151]: GetQueryObjectuivARB (will be remapped) */
+ "iip\0"
+ "glGetQueryObjectuiv\0"
+ "glGetQueryObjectuivARB\0"
+ "\0"
+ /* _mesa_function_pool[15199]: GetTexParameteriv (offset 283) */
+ "iip\0"
+ "glGetTexParameteriv\0"
+ "\0"
+ /* _mesa_function_pool[15224]: MapParameterivNV (dynamic) */
+ "iip\0"
+ "glMapParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[15248]: GenRenderbuffersEXT (will be remapped) */
+ "ip\0"
+ "glGenRenderbuffers\0"
+ "glGenRenderbuffersEXT\0"
+ "\0"
+ /* _mesa_function_pool[15293]: VertexAttrib2dvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2dv\0"
+ "glVertexAttrib2dvARB\0"
+ "\0"
+ /* _mesa_function_pool[15336]: EdgeFlagPointerEXT (will be remapped) */
+ "iip\0"
+ "glEdgeFlagPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[15362]: VertexAttribs2svNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs2svNV\0"
+ "\0"
+ /* _mesa_function_pool[15388]: WeightbvARB (dynamic) */
+ "ip\0"
+ "glWeightbvARB\0"
+ "\0"
+ /* _mesa_function_pool[15406]: VertexAttrib2fvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2fv\0"
+ "glVertexAttrib2fvARB\0"
+ "\0"
+ /* _mesa_function_pool[15449]: GetBufferParameterivARB (will be remapped) */
+ "iip\0"
+ "glGetBufferParameteriv\0"
+ "glGetBufferParameterivARB\0"
+ "\0"
+ /* _mesa_function_pool[15503]: Rectdv (offset 87) */
+ "pp\0"
+ "glRectdv\0"
+ "\0"
+ /* _mesa_function_pool[15516]: ListParameteriSGIX (dynamic) */
+ "iii\0"
+ "glListParameteriSGIX\0"
+ "\0"
+ /* _mesa_function_pool[15542]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
+ "iffffffffff\0"
+ "glReplacementCodeuiColor4fNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[15601]: InstrumentsBufferSGIX (dynamic) */
+ "ip\0"
+ "glInstrumentsBufferSGIX\0"
+ "\0"
+ /* _mesa_function_pool[15629]: VertexAttrib4NivARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4Niv\0"
+ "glVertexAttrib4NivARB\0"
+ "\0"
+ /* _mesa_function_pool[15674]: GetAttachedShaders (will be remapped) */
+ "iipp\0"
+ "glGetAttachedShaders\0"
+ "\0"
+ /* _mesa_function_pool[15701]: GenVertexArraysAPPLE (will be remapped) */
+ "ip\0"
+ "glGenVertexArraysAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[15728]: Materialiv (offset 172) */
+ "iip\0"
+ "glMaterialiv\0"
+ "\0"
+ /* _mesa_function_pool[15746]: PushClientAttrib (offset 335) */
+ "i\0"
+ "glPushClientAttrib\0"
+ "\0"
+ /* _mesa_function_pool[15768]: ProgramEnvParameters4fvEXT (will be remapped) */
+ "iiip\0"
+ "glProgramEnvParameters4fvEXT\0"
+ "\0"
+ /* _mesa_function_pool[15803]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ "pppp\0"
+ "glTexCoord2fColor4fNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[15849]: WindowPos2iMESA (will be remapped) */
+ "ii\0"
+ "glWindowPos2i\0"
+ "glWindowPos2iARB\0"
+ "glWindowPos2iMESA\0"
+ "\0"
+ /* _mesa_function_pool[15902]: SecondaryColor3fvEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3fv\0"
+ "glSecondaryColor3fvEXT\0"
+ "\0"
+ /* _mesa_function_pool[15948]: PolygonMode (offset 174) */
+ "ii\0"
+ "glPolygonMode\0"
+ "\0"
+ /* _mesa_function_pool[15966]: CompressedTexSubImage1DARB (will be remapped) */
+ "iiiiiip\0"
+ "glCompressedTexSubImage1D\0"
+ "glCompressedTexSubImage1DARB\0"
+ "\0"
+ /* _mesa_function_pool[16030]: GetVertexAttribivNV (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribivNV\0"
+ "\0"
+ /* _mesa_function_pool[16057]: GetProgramStringARB (will be remapped) */
+ "iip\0"
+ "glGetProgramStringARB\0"
+ "\0"
+ /* _mesa_function_pool[16084]: TexBumpParameterfvATI (will be remapped) */
+ "ip\0"
+ "glTexBumpParameterfvATI\0"
+ "\0"
+ /* _mesa_function_pool[16112]: CompileShaderARB (will be remapped) */
+ "i\0"
+ "glCompileShader\0"
+ "glCompileShaderARB\0"
+ "\0"
+ /* _mesa_function_pool[16150]: DeleteShader (will be remapped) */
+ "i\0"
+ "glDeleteShader\0"
+ "\0"
+ /* _mesa_function_pool[16168]: DisableClientState (offset 309) */
+ "i\0"
+ "glDisableClientState\0"
+ "\0"
+ /* _mesa_function_pool[16192]: TexGeni (offset 192) */
+ "iii\0"
+ "glTexGeni\0"
+ "\0"
+ /* _mesa_function_pool[16207]: TexGenf (offset 190) */
+ "iif\0"
+ "glTexGenf\0"
+ "\0"
+ /* _mesa_function_pool[16222]: Uniform3fARB (will be remapped) */
+ "ifff\0"
+ "glUniform3f\0"
+ "glUniform3fARB\0"
+ "\0"
+ /* _mesa_function_pool[16255]: TexGend (offset 188) */
+ "iid\0"
+ "glTexGend\0"
+ "\0"
+ /* _mesa_function_pool[16270]: ListParameterfvSGIX (dynamic) */
+ "iip\0"
+ "glListParameterfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[16297]: GetPolygonStipple (offset 274) */
+ "p\0"
+ "glGetPolygonStipple\0"
+ "\0"
+ /* _mesa_function_pool[16320]: Tangent3dvEXT (dynamic) */
+ "p\0"
+ "glTangent3dvEXT\0"
+ "\0"
+ /* _mesa_function_pool[16339]: GetVertexAttribfvNV (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribfvNV\0"
+ "\0"
+ /* _mesa_function_pool[16366]: WindowPos3sMESA (will be remapped) */
+ "iii\0"
+ "glWindowPos3s\0"
+ "glWindowPos3sARB\0"
+ "glWindowPos3sMESA\0"
+ "\0"
+ /* _mesa_function_pool[16420]: VertexAttrib2svNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2svNV\0"
+ "\0"
+ /* _mesa_function_pool[16444]: VertexAttribs1fvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs1fvNV\0"
+ "\0"
+ /* _mesa_function_pool[16470]: TexCoord2fVertex3fvSUN (dynamic) */
+ "pp\0"
+ "glTexCoord2fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[16499]: WindowPos4sMESA (will be remapped) */
+ "iiii\0"
+ "glWindowPos4sMESA\0"
+ "\0"
+ /* _mesa_function_pool[16523]: VertexAttrib4NuivARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4Nuiv\0"
+ "glVertexAttrib4NuivARB\0"
+ "\0"
+ /* _mesa_function_pool[16570]: ClientActiveTextureARB (offset 375) */
+ "i\0"
+ "glClientActiveTexture\0"
+ "glClientActiveTextureARB\0"
+ "\0"
+ /* _mesa_function_pool[16620]: PixelTexGenSGIX (will be remapped) */
+ "i\0"
+ "glPixelTexGenSGIX\0"
+ "\0"
+ /* _mesa_function_pool[16641]: ReplacementCodeusvSUN (dynamic) */
+ "p\0"
+ "glReplacementCodeusvSUN\0"
+ "\0"
+ /* _mesa_function_pool[16668]: Uniform4fARB (will be remapped) */
+ "iffff\0"
+ "glUniform4f\0"
+ "glUniform4fARB\0"
+ "\0"
+ /* _mesa_function_pool[16702]: Color4sv (offset 34) */
+ "p\0"
+ "glColor4sv\0"
+ "\0"
+ /* _mesa_function_pool[16716]: FlushMappedBufferRange (will be remapped) */
+ "iii\0"
+ "glFlushMappedBufferRange\0"
+ "\0"
+ /* _mesa_function_pool[16746]: IsProgramNV (will be remapped) */
+ "i\0"
+ "glIsProgramARB\0"
+ "glIsProgramNV\0"
+ "\0"
+ /* _mesa_function_pool[16778]: FlushMappedBufferRangeAPPLE (will be remapped) */
+ "iii\0"
+ "glFlushMappedBufferRangeAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[16813]: PixelZoom (offset 246) */
+ "ff\0"
+ "glPixelZoom\0"
+ "\0"
+ /* _mesa_function_pool[16829]: ReplacementCodePointerSUN (dynamic) */
+ "iip\0"
+ "glReplacementCodePointerSUN\0"
+ "\0"
+ /* _mesa_function_pool[16862]: ProgramEnvParameter4dARB (will be remapped) */
+ "iidddd\0"
+ "glProgramEnvParameter4dARB\0"
+ "glProgramParameter4dNV\0"
+ "\0"
+ /* _mesa_function_pool[16920]: ColorTableParameterfv (offset 340) */
+ "iip\0"
+ "glColorTableParameterfv\0"
+ "glColorTableParameterfvSGI\0"
+ "\0"
+ /* _mesa_function_pool[16976]: FragmentLightModelfSGIX (dynamic) */
+ "if\0"
+ "glFragmentLightModelfSGIX\0"
+ "\0"
+ /* _mesa_function_pool[17006]: Binormal3bvEXT (dynamic) */
+ "p\0"
+ "glBinormal3bvEXT\0"
+ "\0"
+ /* _mesa_function_pool[17026]: PixelMapuiv (offset 252) */
+ "iip\0"
+ "glPixelMapuiv\0"
+ "\0"
+ /* _mesa_function_pool[17045]: Color3dv (offset 12) */
+ "p\0"
+ "glColor3dv\0"
+ "\0"
+ /* _mesa_function_pool[17059]: IsTexture (offset 330) */
+ "i\0"
+ "glIsTexture\0"
+ "glIsTextureEXT\0"
+ "\0"
+ /* _mesa_function_pool[17089]: VertexWeightfvEXT (dynamic) */
+ "p\0"
+ "glVertexWeightfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[17112]: VertexAttrib1dARB (will be remapped) */
+ "id\0"
+ "glVertexAttrib1d\0"
+ "glVertexAttrib1dARB\0"
+ "\0"
+ /* _mesa_function_pool[17153]: ImageTransformParameterivHP (dynamic) */
+ "iip\0"
+ "glImageTransformParameterivHP\0"
+ "\0"
+ /* _mesa_function_pool[17188]: TexCoord4i (offset 122) */
+ "iiii\0"
+ "glTexCoord4i\0"
+ "\0"
+ /* _mesa_function_pool[17207]: DeleteQueriesARB (will be remapped) */
+ "ip\0"
+ "glDeleteQueries\0"
+ "glDeleteQueriesARB\0"
+ "\0"
+ /* _mesa_function_pool[17246]: Color4ubVertex2fSUN (dynamic) */
+ "iiiiff\0"
+ "glColor4ubVertex2fSUN\0"
+ "\0"
+ /* _mesa_function_pool[17276]: FragmentColorMaterialSGIX (dynamic) */
+ "ii\0"
+ "glFragmentColorMaterialSGIX\0"
+ "\0"
+ /* _mesa_function_pool[17308]: CurrentPaletteMatrixARB (dynamic) */
+ "i\0"
+ "glCurrentPaletteMatrixARB\0"
+ "\0"
+ /* _mesa_function_pool[17337]: GetMapdv (offset 266) */
+ "iip\0"
+ "glGetMapdv\0"
+ "\0"
+ /* _mesa_function_pool[17353]: SamplePatternSGIS (will be remapped) */
+ "i\0"
+ "glSamplePatternSGIS\0"
+ "glSamplePatternEXT\0"
+ "\0"
+ /* _mesa_function_pool[17395]: PixelStoref (offset 249) */
+ "if\0"
+ "glPixelStoref\0"
+ "\0"
+ /* _mesa_function_pool[17413]: IsQueryARB (will be remapped) */
+ "i\0"
+ "glIsQuery\0"
+ "glIsQueryARB\0"
+ "\0"
+ /* _mesa_function_pool[17439]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
+ "iiiiifff\0"
+ "glReplacementCodeuiColor4ubVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[17488]: PixelStorei (offset 250) */
+ "ii\0"
+ "glPixelStorei\0"
+ "\0"
+ /* _mesa_function_pool[17506]: VertexAttrib4usvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4usv\0"
+ "glVertexAttrib4usvARB\0"
+ "\0"
+ /* _mesa_function_pool[17551]: LinkProgramARB (will be remapped) */
+ "i\0"
+ "glLinkProgram\0"
+ "glLinkProgramARB\0"
+ "\0"
+ /* _mesa_function_pool[17585]: VertexAttrib2fNV (will be remapped) */
+ "iff\0"
+ "glVertexAttrib2fNV\0"
+ "\0"
+ /* _mesa_function_pool[17609]: ShaderSourceARB (will be remapped) */
+ "iipp\0"
+ "glShaderSource\0"
+ "glShaderSourceARB\0"
+ "\0"
+ /* _mesa_function_pool[17648]: FragmentMaterialiSGIX (dynamic) */
+ "iii\0"
+ "glFragmentMaterialiSGIX\0"
+ "\0"
+ /* _mesa_function_pool[17677]: EvalCoord2dv (offset 233) */
+ "p\0"
+ "glEvalCoord2dv\0"
+ "\0"
+ /* _mesa_function_pool[17695]: VertexAttrib3svARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib3sv\0"
+ "glVertexAttrib3svARB\0"
+ "\0"
+ /* _mesa_function_pool[17738]: ColorMaterial (offset 151) */
+ "ii\0"
+ "glColorMaterial\0"
+ "\0"
+ /* _mesa_function_pool[17758]: CompressedTexSubImage3DARB (will be remapped) */
+ "iiiiiiiiiip\0"
+ "glCompressedTexSubImage3D\0"
+ "glCompressedTexSubImage3DARB\0"
+ "\0"
+ /* _mesa_function_pool[17826]: WindowPos2ivMESA (will be remapped) */
+ "p\0"
+ "glWindowPos2iv\0"
+ "glWindowPos2ivARB\0"
+ "glWindowPos2ivMESA\0"
+ "\0"
+ /* _mesa_function_pool[17881]: IsFramebufferEXT (will be remapped) */
+ "i\0"
+ "glIsFramebuffer\0"
+ "glIsFramebufferEXT\0"
+ "\0"
+ /* _mesa_function_pool[17919]: Uniform4ivARB (will be remapped) */
+ "iip\0"
+ "glUniform4iv\0"
+ "glUniform4ivARB\0"
+ "\0"
+ /* _mesa_function_pool[17953]: GetVertexAttribdvARB (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribdv\0"
+ "glGetVertexAttribdvARB\0"
+ "\0"
+ /* _mesa_function_pool[18001]: TexBumpParameterivATI (will be remapped) */
+ "ip\0"
+ "glTexBumpParameterivATI\0"
+ "\0"
+ /* _mesa_function_pool[18029]: GetSeparableFilter (offset 359) */
+ "iiippp\0"
+ "glGetSeparableFilter\0"
+ "glGetSeparableFilterEXT\0"
+ "\0"
+ /* _mesa_function_pool[18082]: Binormal3dEXT (dynamic) */
+ "ddd\0"
+ "glBinormal3dEXT\0"
+ "\0"
+ /* _mesa_function_pool[18103]: SpriteParameteriSGIX (dynamic) */
+ "ii\0"
+ "glSpriteParameteriSGIX\0"
+ "\0"
+ /* _mesa_function_pool[18130]: RequestResidentProgramsNV (will be remapped) */
+ "ip\0"
+ "glRequestResidentProgramsNV\0"
+ "\0"
+ /* _mesa_function_pool[18162]: TagSampleBufferSGIX (dynamic) */
+ "\0"
+ "glTagSampleBufferSGIX\0"
+ "\0"
+ /* _mesa_function_pool[18186]: ReplacementCodeusSUN (dynamic) */
+ "i\0"
+ "glReplacementCodeusSUN\0"
+ "\0"
+ /* _mesa_function_pool[18212]: FeedbackBuffer (offset 194) */
+ "iip\0"
+ "glFeedbackBuffer\0"
+ "\0"
+ /* _mesa_function_pool[18234]: RasterPos2iv (offset 67) */
+ "p\0"
+ "glRasterPos2iv\0"
+ "\0"
+ /* _mesa_function_pool[18252]: TexImage1D (offset 182) */
+ "iiiiiiip\0"
+ "glTexImage1D\0"
+ "\0"
+ /* _mesa_function_pool[18275]: ListParameterivSGIX (dynamic) */
+ "iip\0"
+ "glListParameterivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[18302]: MultiDrawElementsEXT (will be remapped) */
+ "ipipi\0"
+ "glMultiDrawElements\0"
+ "glMultiDrawElementsEXT\0"
+ "\0"
+ /* _mesa_function_pool[18352]: Color3s (offset 17) */
+ "iii\0"
+ "glColor3s\0"
+ "\0"
+ /* _mesa_function_pool[18367]: Uniform1ivARB (will be remapped) */
+ "iip\0"
+ "glUniform1iv\0"
+ "glUniform1ivARB\0"
+ "\0"
+ /* _mesa_function_pool[18401]: WindowPos2sMESA (will be remapped) */
+ "ii\0"
+ "glWindowPos2s\0"
+ "glWindowPos2sARB\0"
+ "glWindowPos2sMESA\0"
+ "\0"
+ /* _mesa_function_pool[18454]: WeightusvARB (dynamic) */
+ "ip\0"
+ "glWeightusvARB\0"
+ "\0"
+ /* _mesa_function_pool[18473]: TexCoordPointer (offset 320) */
+ "iiip\0"
+ "glTexCoordPointer\0"
+ "\0"
+ /* _mesa_function_pool[18497]: FogCoordPointerEXT (will be remapped) */
+ "iip\0"
+ "glFogCoordPointer\0"
+ "glFogCoordPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[18541]: IndexMaterialEXT (dynamic) */
+ "ii\0"
+ "glIndexMaterialEXT\0"
+ "\0"
+ /* _mesa_function_pool[18564]: Color3i (offset 15) */
+ "iii\0"
+ "glColor3i\0"
+ "\0"
+ /* _mesa_function_pool[18579]: FrontFace (offset 157) */
+ "i\0"
+ "glFrontFace\0"
+ "\0"
+ /* _mesa_function_pool[18594]: EvalCoord2d (offset 232) */
+ "dd\0"
+ "glEvalCoord2d\0"
+ "\0"
+ /* _mesa_function_pool[18612]: SecondaryColor3ubvEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3ubv\0"
+ "glSecondaryColor3ubvEXT\0"
+ "\0"
+ /* _mesa_function_pool[18660]: EvalCoord2f (offset 234) */
+ "ff\0"
+ "glEvalCoord2f\0"
+ "\0"
+ /* _mesa_function_pool[18678]: VertexAttrib4dvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4dv\0"
+ "glVertexAttrib4dvARB\0"
+ "\0"
+ /* _mesa_function_pool[18721]: BindAttribLocationARB (will be remapped) */
+ "iip\0"
+ "glBindAttribLocation\0"
+ "glBindAttribLocationARB\0"
+ "\0"
+ /* _mesa_function_pool[18771]: Color3b (offset 9) */
+ "iii\0"
+ "glColor3b\0"
+ "\0"
+ /* _mesa_function_pool[18786]: MultiTexCoord2dARB (offset 384) */
+ "idd\0"
+ "glMultiTexCoord2d\0"
+ "glMultiTexCoord2dARB\0"
+ "\0"
+ /* _mesa_function_pool[18830]: ExecuteProgramNV (will be remapped) */
+ "iip\0"
+ "glExecuteProgramNV\0"
+ "\0"
+ /* _mesa_function_pool[18854]: Color3f (offset 13) */
+ "fff\0"
+ "glColor3f\0"
+ "\0"
+ /* _mesa_function_pool[18869]: LightEnviSGIX (dynamic) */
+ "ii\0"
+ "glLightEnviSGIX\0"
+ "\0"
+ /* _mesa_function_pool[18889]: Color3d (offset 11) */
+ "ddd\0"
+ "glColor3d\0"
+ "\0"
+ /* _mesa_function_pool[18904]: Normal3dv (offset 55) */
+ "p\0"
+ "glNormal3dv\0"
+ "\0"
+ /* _mesa_function_pool[18919]: Lightf (offset 159) */
+ "iif\0"
+ "glLightf\0"
+ "\0"
+ /* _mesa_function_pool[18933]: ReplacementCodeuiSUN (dynamic) */
+ "i\0"
+ "glReplacementCodeuiSUN\0"
+ "\0"
+ /* _mesa_function_pool[18959]: MatrixMode (offset 293) */
+ "i\0"
+ "glMatrixMode\0"
+ "\0"
+ /* _mesa_function_pool[18975]: GetPixelMapusv (offset 273) */
+ "ip\0"
+ "glGetPixelMapusv\0"
+ "\0"
+ /* _mesa_function_pool[18996]: Lighti (offset 161) */
+ "iii\0"
+ "glLighti\0"
+ "\0"
+ /* _mesa_function_pool[19010]: VertexAttribPointerNV (will be remapped) */
+ "iiiip\0"
+ "glVertexAttribPointerNV\0"
+ "\0"
+ /* _mesa_function_pool[19041]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
+ "iiip\0"
+ "glGetFramebufferAttachmentParameteriv\0"
+ "glGetFramebufferAttachmentParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[19126]: PixelTransformParameterfEXT (dynamic) */
+ "iif\0"
+ "glPixelTransformParameterfEXT\0"
+ "\0"
+ /* _mesa_function_pool[19161]: MultiTexCoord4dvARB (offset 401) */
+ "ip\0"
+ "glMultiTexCoord4dv\0"
+ "glMultiTexCoord4dvARB\0"
+ "\0"
+ /* _mesa_function_pool[19206]: PixelTransformParameteriEXT (dynamic) */
+ "iii\0"
+ "glPixelTransformParameteriEXT\0"
+ "\0"
+ /* _mesa_function_pool[19241]: GetDoublev (offset 260) */
+ "ip\0"
+ "glGetDoublev\0"
+ "\0"
+ /* _mesa_function_pool[19258]: MultMatrixd (offset 295) */
+ "p\0"
+ "glMultMatrixd\0"
+ "\0"
+ /* _mesa_function_pool[19275]: MultMatrixf (offset 294) */
+ "p\0"
+ "glMultMatrixf\0"
+ "\0"
+ /* _mesa_function_pool[19292]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
+ "ffiiiifff\0"
+ "glTexCoord2fColor4ubVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[19335]: Uniform1iARB (will be remapped) */
+ "ii\0"
+ "glUniform1i\0"
+ "glUniform1iARB\0"
+ "\0"
+ /* _mesa_function_pool[19366]: VertexAttribPointerARB (will be remapped) */
+ "iiiiip\0"
+ "glVertexAttribPointer\0"
+ "glVertexAttribPointerARB\0"
+ "\0"
+ /* _mesa_function_pool[19421]: SharpenTexFuncSGIS (dynamic) */
+ "iip\0"
+ "glSharpenTexFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[19447]: MultiTexCoord4fvARB (offset 403) */
+ "ip\0"
+ "glMultiTexCoord4fv\0"
+ "glMultiTexCoord4fvARB\0"
+ "\0"
+ /* _mesa_function_pool[19492]: UniformMatrix2x3fv (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix2x3fv\0"
+ "\0"
+ /* _mesa_function_pool[19519]: TrackMatrixNV (will be remapped) */
+ "iiii\0"
+ "glTrackMatrixNV\0"
+ "\0"
+ /* _mesa_function_pool[19541]: CombinerParameteriNV (will be remapped) */
+ "ii\0"
+ "glCombinerParameteriNV\0"
+ "\0"
+ /* _mesa_function_pool[19568]: DeleteAsyncMarkersSGIX (dynamic) */
+ "ii\0"
+ "glDeleteAsyncMarkersSGIX\0"
+ "\0"
+ /* _mesa_function_pool[19597]: IsAsyncMarkerSGIX (dynamic) */
+ "i\0"
+ "glIsAsyncMarkerSGIX\0"
+ "\0"
+ /* _mesa_function_pool[19620]: FrameZoomSGIX (dynamic) */
+ "i\0"
+ "glFrameZoomSGIX\0"
+ "\0"
+ /* _mesa_function_pool[19639]: Normal3fVertex3fvSUN (dynamic) */
+ "pp\0"
+ "glNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[19666]: RasterPos4sv (offset 85) */
+ "p\0"
+ "glRasterPos4sv\0"
+ "\0"
+ /* _mesa_function_pool[19684]: VertexAttrib4NsvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4Nsv\0"
+ "glVertexAttrib4NsvARB\0"
+ "\0"
+ /* _mesa_function_pool[19729]: VertexAttrib3fvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib3fv\0"
+ "glVertexAttrib3fvARB\0"
+ "\0"
+ /* _mesa_function_pool[19772]: ClearColor (offset 206) */
+ "ffff\0"
+ "glClearColor\0"
+ "\0"
+ /* _mesa_function_pool[19791]: GetSynciv (will be remapped) */
+ "iiipp\0"
+ "glGetSynciv\0"
+ "\0"
+ /* _mesa_function_pool[19810]: DeleteFramebuffersEXT (will be remapped) */
+ "ip\0"
+ "glDeleteFramebuffers\0"
+ "glDeleteFramebuffersEXT\0"
+ "\0"
+ /* _mesa_function_pool[19859]: GlobalAlphaFactorsSUN (dynamic) */
+ "i\0"
+ "glGlobalAlphaFactorsSUN\0"
+ "\0"
+ /* _mesa_function_pool[19886]: TexEnviv (offset 187) */
+ "iip\0"
+ "glTexEnviv\0"
+ "\0"
+ /* _mesa_function_pool[19902]: TexSubImage3D (offset 372) */
+ "iiiiiiiiiip\0"
+ "glTexSubImage3D\0"
+ "glTexSubImage3DEXT\0"
+ "\0"
+ /* _mesa_function_pool[19950]: Tangent3fEXT (dynamic) */
+ "fff\0"
+ "glTangent3fEXT\0"
+ "\0"
+ /* _mesa_function_pool[19970]: SecondaryColor3uivEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3uiv\0"
+ "glSecondaryColor3uivEXT\0"
+ "\0"
+ /* _mesa_function_pool[20018]: MatrixIndexubvARB (dynamic) */
+ "ip\0"
+ "glMatrixIndexubvARB\0"
+ "\0"
+ /* _mesa_function_pool[20042]: Color4fNormal3fVertex3fSUN (dynamic) */
+ "ffffffffff\0"
+ "glColor4fNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[20083]: PixelTexGenParameterfSGIS (will be remapped) */
+ "if\0"
+ "glPixelTexGenParameterfSGIS\0"
+ "\0"
+ /* _mesa_function_pool[20115]: CreateShader (will be remapped) */
+ "i\0"
+ "glCreateShader\0"
+ "\0"
+ /* _mesa_function_pool[20133]: GetColorTableParameterfv (offset 344) */
+ "iip\0"
+ "glGetColorTableParameterfv\0"
+ "glGetColorTableParameterfvSGI\0"
+ "glGetColorTableParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[20225]: FragmentLightModelfvSGIX (dynamic) */
+ "ip\0"
+ "glFragmentLightModelfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[20256]: Bitmap (offset 8) */
+ "iiffffp\0"
+ "glBitmap\0"
+ "\0"
+ /* _mesa_function_pool[20274]: MultiTexCoord3fARB (offset 394) */
+ "ifff\0"
+ "glMultiTexCoord3f\0"
+ "glMultiTexCoord3fARB\0"
+ "\0"
+ /* _mesa_function_pool[20319]: GetTexLevelParameterfv (offset 284) */
+ "iiip\0"
+ "glGetTexLevelParameterfv\0"
+ "\0"
+ /* _mesa_function_pool[20350]: GetPixelTexGenParameterfvSGIS (will be remapped) */
+ "ip\0"
+ "glGetPixelTexGenParameterfvSGIS\0"
+ "\0"
+ /* _mesa_function_pool[20386]: GenFramebuffersEXT (will be remapped) */
+ "ip\0"
+ "glGenFramebuffers\0"
+ "glGenFramebuffersEXT\0"
+ "\0"
+ /* _mesa_function_pool[20429]: GetProgramParameterdvNV (will be remapped) */
+ "iiip\0"
+ "glGetProgramParameterdvNV\0"
+ "\0"
+ /* _mesa_function_pool[20461]: Vertex2sv (offset 133) */
+ "p\0"
+ "glVertex2sv\0"
+ "\0"
+ /* _mesa_function_pool[20476]: GetIntegerv (offset 263) */
+ "ip\0"
+ "glGetIntegerv\0"
+ "\0"
+ /* _mesa_function_pool[20494]: IsVertexArrayAPPLE (will be remapped) */
+ "i\0"
+ "glIsVertexArray\0"
+ "glIsVertexArrayAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[20534]: FragmentLightfvSGIX (dynamic) */
+ "iip\0"
+ "glFragmentLightfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[20561]: DetachShader (will be remapped) */
+ "ii\0"
+ "glDetachShader\0"
+ "\0"
+ /* _mesa_function_pool[20580]: VertexAttrib4NubARB (will be remapped) */
+ "iiiii\0"
+ "glVertexAttrib4Nub\0"
+ "glVertexAttrib4NubARB\0"
+ "\0"
+ /* _mesa_function_pool[20628]: GetProgramEnvParameterfvARB (will be remapped) */
+ "iip\0"
+ "glGetProgramEnvParameterfvARB\0"
+ "\0"
+ /* _mesa_function_pool[20663]: GetTrackMatrixivNV (will be remapped) */
+ "iiip\0"
+ "glGetTrackMatrixivNV\0"
+ "\0"
+ /* _mesa_function_pool[20690]: VertexAttrib3svNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib3svNV\0"
+ "\0"
+ /* _mesa_function_pool[20714]: Uniform4fvARB (will be remapped) */
+ "iip\0"
+ "glUniform4fv\0"
+ "glUniform4fvARB\0"
+ "\0"
+ /* _mesa_function_pool[20748]: MultTransposeMatrixfARB (will be remapped) */
+ "p\0"
+ "glMultTransposeMatrixf\0"
+ "glMultTransposeMatrixfARB\0"
+ "\0"
+ /* _mesa_function_pool[20800]: GetTexEnviv (offset 277) */
+ "iip\0"
+ "glGetTexEnviv\0"
+ "\0"
+ /* _mesa_function_pool[20819]: ColorFragmentOp1ATI (will be remapped) */
+ "iiiiiii\0"
+ "glColorFragmentOp1ATI\0"
+ "\0"
+ /* _mesa_function_pool[20850]: GetUniformfvARB (will be remapped) */
+ "iip\0"
+ "glGetUniformfv\0"
+ "glGetUniformfvARB\0"
+ "\0"
+ /* _mesa_function_pool[20888]: PopClientAttrib (offset 334) */
+ "\0"
+ "glPopClientAttrib\0"
+ "\0"
+ /* _mesa_function_pool[20908]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ "iffffffffffff\0"
+ "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[20979]: DetachObjectARB (will be remapped) */
+ "ii\0"
+ "glDetachObjectARB\0"
+ "\0"
+ /* _mesa_function_pool[21001]: VertexBlendARB (dynamic) */
+ "i\0"
+ "glVertexBlendARB\0"
+ "\0"
+ /* _mesa_function_pool[21021]: WindowPos3iMESA (will be remapped) */
+ "iii\0"
+ "glWindowPos3i\0"
+ "glWindowPos3iARB\0"
+ "glWindowPos3iMESA\0"
+ "\0"
+ /* _mesa_function_pool[21075]: SeparableFilter2D (offset 360) */
+ "iiiiiipp\0"
+ "glSeparableFilter2D\0"
+ "glSeparableFilter2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[21128]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glReplacementCodeuiColor4ubVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[21173]: Map1d (offset 220) */
+ "iddiip\0"
+ "glMap1d\0"
+ "\0"
+ /* _mesa_function_pool[21189]: Map1f (offset 221) */
+ "iffiip\0"
+ "glMap1f\0"
+ "\0"
+ /* _mesa_function_pool[21205]: CompressedTexImage2DARB (will be remapped) */
+ "iiiiiiip\0"
+ "glCompressedTexImage2D\0"
+ "glCompressedTexImage2DARB\0"
+ "\0"
+ /* _mesa_function_pool[21264]: ArrayElement (offset 306) */
+ "i\0"
+ "glArrayElement\0"
+ "glArrayElementEXT\0"
+ "\0"
+ /* _mesa_function_pool[21300]: TexImage2D (offset 183) */
+ "iiiiiiiip\0"
+ "glTexImage2D\0"
+ "\0"
+ /* _mesa_function_pool[21324]: DepthBoundsEXT (will be remapped) */
+ "dd\0"
+ "glDepthBoundsEXT\0"
+ "\0"
+ /* _mesa_function_pool[21345]: ProgramParameters4fvNV (will be remapped) */
+ "iiip\0"
+ "glProgramParameters4fvNV\0"
+ "\0"
+ /* _mesa_function_pool[21376]: DeformationMap3fSGIX (dynamic) */
+ "iffiiffiiffiip\0"
+ "glDeformationMap3fSGIX\0"
+ "\0"
+ /* _mesa_function_pool[21415]: GetProgramivNV (will be remapped) */
+ "iip\0"
+ "glGetProgramivNV\0"
+ "\0"
+ /* _mesa_function_pool[21437]: GetMinmaxParameteriv (offset 366) */
+ "iip\0"
+ "glGetMinmaxParameteriv\0"
+ "glGetMinmaxParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[21491]: PixelTransferf (offset 247) */
+ "if\0"
+ "glPixelTransferf\0"
+ "\0"
+ /* _mesa_function_pool[21512]: CopyTexImage1D (offset 323) */
+ "iiiiiii\0"
+ "glCopyTexImage1D\0"
+ "glCopyTexImage1DEXT\0"
+ "\0"
+ /* _mesa_function_pool[21558]: PushMatrix (offset 298) */
+ "\0"
+ "glPushMatrix\0"
+ "\0"
+ /* _mesa_function_pool[21573]: Fogiv (offset 156) */
+ "ip\0"
+ "glFogiv\0"
+ "\0"
+ /* _mesa_function_pool[21585]: TexCoord1dv (offset 95) */
+ "p\0"
+ "glTexCoord1dv\0"
+ "\0"
+ /* _mesa_function_pool[21602]: AlphaFragmentOp3ATI (will be remapped) */
+ "iiiiiiiiiiii\0"
+ "glAlphaFragmentOp3ATI\0"
+ "\0"
+ /* _mesa_function_pool[21638]: PixelTransferi (offset 248) */
+ "ii\0"
+ "glPixelTransferi\0"
+ "\0"
+ /* _mesa_function_pool[21659]: GetVertexAttribdvNV (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribdvNV\0"
+ "\0"
+ /* _mesa_function_pool[21686]: VertexAttrib3fvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib3fvNV\0"
+ "\0"
+ /* _mesa_function_pool[21710]: Rotatef (offset 300) */
+ "ffff\0"
+ "glRotatef\0"
+ "\0"
+ /* _mesa_function_pool[21726]: GetFinalCombinerInputParameterivNV (will be remapped) */
+ "iip\0"
+ "glGetFinalCombinerInputParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[21768]: Vertex3i (offset 138) */
+ "iii\0"
+ "glVertex3i\0"
+ "\0"
+ /* _mesa_function_pool[21784]: Vertex3f (offset 136) */
+ "fff\0"
+ "glVertex3f\0"
+ "\0"
+ /* _mesa_function_pool[21800]: Clear (offset 203) */
+ "i\0"
+ "glClear\0"
+ "\0"
+ /* _mesa_function_pool[21811]: Vertex3d (offset 134) */
+ "ddd\0"
+ "glVertex3d\0"
+ "\0"
+ /* _mesa_function_pool[21827]: GetMapParameterivNV (dynamic) */
+ "iip\0"
+ "glGetMapParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[21854]: Uniform4iARB (will be remapped) */
+ "iiiii\0"
+ "glUniform4i\0"
+ "glUniform4iARB\0"
+ "\0"
+ /* _mesa_function_pool[21888]: ReadBuffer (offset 254) */
+ "i\0"
+ "glReadBuffer\0"
+ "\0"
+ /* _mesa_function_pool[21904]: ConvolutionParameteri (offset 352) */
+ "iii\0"
+ "glConvolutionParameteri\0"
+ "glConvolutionParameteriEXT\0"
+ "\0"
+ /* _mesa_function_pool[21960]: Ortho (offset 296) */
+ "dddddd\0"
+ "glOrtho\0"
+ "\0"
+ /* _mesa_function_pool[21976]: Binormal3sEXT (dynamic) */
+ "iii\0"
+ "glBinormal3sEXT\0"
+ "\0"
+ /* _mesa_function_pool[21997]: ListBase (offset 6) */
+ "i\0"
+ "glListBase\0"
+ "\0"
+ /* _mesa_function_pool[22011]: Vertex3s (offset 140) */
+ "iii\0"
+ "glVertex3s\0"
+ "\0"
+ /* _mesa_function_pool[22027]: ConvolutionParameterf (offset 350) */
+ "iif\0"
+ "glConvolutionParameterf\0"
+ "glConvolutionParameterfEXT\0"
+ "\0"
+ /* _mesa_function_pool[22083]: GetColorTableParameteriv (offset 345) */
+ "iip\0"
+ "glGetColorTableParameteriv\0"
+ "glGetColorTableParameterivSGI\0"
+ "glGetColorTableParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[22175]: ProgramEnvParameter4dvARB (will be remapped) */
+ "iip\0"
+ "glProgramEnvParameter4dvARB\0"
+ "glProgramParameter4dvNV\0"
+ "\0"
+ /* _mesa_function_pool[22232]: ShadeModel (offset 177) */
+ "i\0"
+ "glShadeModel\0"
+ "\0"
+ /* _mesa_function_pool[22248]: VertexAttribs2fvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs2fvNV\0"
+ "\0"
+ /* _mesa_function_pool[22274]: Rectiv (offset 91) */
+ "pp\0"
+ "glRectiv\0"
+ "\0"
+ /* _mesa_function_pool[22287]: UseProgramObjectARB (will be remapped) */
+ "i\0"
+ "glUseProgram\0"
+ "glUseProgramObjectARB\0"
+ "\0"
+ /* _mesa_function_pool[22325]: GetMapParameterfvNV (dynamic) */
+ "iip\0"
+ "glGetMapParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[22352]: PassTexCoordATI (will be remapped) */
+ "iii\0"
+ "glPassTexCoordATI\0"
+ "\0"
+ /* _mesa_function_pool[22375]: DeleteProgram (will be remapped) */
+ "i\0"
+ "glDeleteProgram\0"
+ "\0"
+ /* _mesa_function_pool[22394]: Tangent3ivEXT (dynamic) */
+ "p\0"
+ "glTangent3ivEXT\0"
+ "\0"
+ /* _mesa_function_pool[22413]: Tangent3dEXT (dynamic) */
+ "ddd\0"
+ "glTangent3dEXT\0"
+ "\0"
+ /* _mesa_function_pool[22433]: SecondaryColor3dvEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3dv\0"
+ "glSecondaryColor3dvEXT\0"
+ "\0"
+ /* _mesa_function_pool[22479]: Vertex2fv (offset 129) */
+ "p\0"
+ "glVertex2fv\0"
+ "\0"
+ /* _mesa_function_pool[22494]: MultiDrawArraysEXT (will be remapped) */
+ "ippi\0"
+ "glMultiDrawArrays\0"
+ "glMultiDrawArraysEXT\0"
+ "\0"
+ /* _mesa_function_pool[22539]: BindRenderbufferEXT (will be remapped) */
+ "ii\0"
+ "glBindRenderbuffer\0"
+ "glBindRenderbufferEXT\0"
+ "\0"
+ /* _mesa_function_pool[22584]: MultiTexCoord4dARB (offset 400) */
+ "idddd\0"
+ "glMultiTexCoord4d\0"
+ "glMultiTexCoord4dARB\0"
+ "\0"
+ /* _mesa_function_pool[22630]: Vertex3sv (offset 141) */
+ "p\0"
+ "glVertex3sv\0"
+ "\0"
+ /* _mesa_function_pool[22645]: SecondaryColor3usEXT (will be remapped) */
+ "iii\0"
+ "glSecondaryColor3us\0"
+ "glSecondaryColor3usEXT\0"
+ "\0"
+ /* _mesa_function_pool[22693]: ProgramLocalParameter4fvARB (will be remapped) */
+ "iip\0"
+ "glProgramLocalParameter4fvARB\0"
+ "\0"
+ /* _mesa_function_pool[22728]: DeleteProgramsNV (will be remapped) */
+ "ip\0"
+ "glDeleteProgramsARB\0"
+ "glDeleteProgramsNV\0"
+ "\0"
+ /* _mesa_function_pool[22771]: EvalMesh1 (offset 236) */
+ "iii\0"
+ "glEvalMesh1\0"
+ "\0"
+ /* _mesa_function_pool[22788]: MultiTexCoord1sARB (offset 382) */
+ "ii\0"
+ "glMultiTexCoord1s\0"
+ "glMultiTexCoord1sARB\0"
+ "\0"
+ /* _mesa_function_pool[22831]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
+ "iffffff\0"
+ "glReplacementCodeuiColor3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[22878]: GetVertexAttribPointervNV (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribPointerv\0"
+ "glGetVertexAttribPointervARB\0"
+ "glGetVertexAttribPointervNV\0"
+ "\0"
+ /* _mesa_function_pool[22966]: MultiTexCoord1dvARB (offset 377) */
+ "ip\0"
+ "glMultiTexCoord1dv\0"
+ "glMultiTexCoord1dvARB\0"
+ "\0"
+ /* _mesa_function_pool[23011]: Uniform2iARB (will be remapped) */
+ "iii\0"
+ "glUniform2i\0"
+ "glUniform2iARB\0"
+ "\0"
+ /* _mesa_function_pool[23043]: Vertex2iv (offset 131) */
+ "p\0"
+ "glVertex2iv\0"
+ "\0"
+ /* _mesa_function_pool[23058]: GetProgramStringNV (will be remapped) */
+ "iip\0"
+ "glGetProgramStringNV\0"
+ "\0"
+ /* _mesa_function_pool[23084]: ColorPointerEXT (will be remapped) */
+ "iiiip\0"
+ "glColorPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[23109]: LineWidth (offset 168) */
+ "f\0"
+ "glLineWidth\0"
+ "\0"
+ /* _mesa_function_pool[23124]: MapBufferARB (will be remapped) */
+ "ii\0"
+ "glMapBuffer\0"
+ "glMapBufferARB\0"
+ "\0"
+ /* _mesa_function_pool[23155]: MultiDrawElementsBaseVertex (will be remapped) */
+ "ipipip\0"
+ "glMultiDrawElementsBaseVertex\0"
+ "\0"
+ /* _mesa_function_pool[23193]: Binormal3svEXT (dynamic) */
+ "p\0"
+ "glBinormal3svEXT\0"
+ "\0"
+ /* _mesa_function_pool[23213]: ApplyTextureEXT (dynamic) */
+ "i\0"
+ "glApplyTextureEXT\0"
+ "\0"
+ /* _mesa_function_pool[23234]: TexGendv (offset 189) */
+ "iip\0"
+ "glTexGendv\0"
+ "\0"
+ /* _mesa_function_pool[23250]: TextureMaterialEXT (dynamic) */
+ "ii\0"
+ "glTextureMaterialEXT\0"
+ "\0"
+ /* _mesa_function_pool[23275]: TextureLightEXT (dynamic) */
+ "i\0"
+ "glTextureLightEXT\0"
+ "\0"
+ /* _mesa_function_pool[23296]: ResetMinmax (offset 370) */
+ "i\0"
+ "glResetMinmax\0"
+ "glResetMinmaxEXT\0"
+ "\0"
+ /* _mesa_function_pool[23330]: SpriteParameterfSGIX (dynamic) */
+ "if\0"
+ "glSpriteParameterfSGIX\0"
+ "\0"
+ /* _mesa_function_pool[23357]: EnableClientState (offset 313) */
+ "i\0"
+ "glEnableClientState\0"
+ "\0"
+ /* _mesa_function_pool[23380]: VertexAttrib4sNV (will be remapped) */
+ "iiiii\0"
+ "glVertexAttrib4sNV\0"
+ "\0"
+ /* _mesa_function_pool[23406]: GetConvolutionParameterfv (offset 357) */
+ "iip\0"
+ "glGetConvolutionParameterfv\0"
+ "glGetConvolutionParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[23470]: VertexAttribs4dvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs4dvNV\0"
+ "\0"
+ /* _mesa_function_pool[23496]: VertexAttrib4dARB (will be remapped) */
+ "idddd\0"
+ "glVertexAttrib4d\0"
+ "glVertexAttrib4dARB\0"
+ "\0"
+ /* _mesa_function_pool[23540]: GetTexBumpParameterfvATI (will be remapped) */
+ "ip\0"
+ "glGetTexBumpParameterfvATI\0"
+ "\0"
+ /* _mesa_function_pool[23571]: ProgramNamedParameter4dNV (will be remapped) */
+ "iipdddd\0"
+ "glProgramNamedParameter4dNV\0"
+ "\0"
+ /* _mesa_function_pool[23608]: GetMaterialfv (offset 269) */
+ "iip\0"
+ "glGetMaterialfv\0"
+ "\0"
+ /* _mesa_function_pool[23629]: VertexWeightfEXT (dynamic) */
+ "f\0"
+ "glVertexWeightfEXT\0"
+ "\0"
+ /* _mesa_function_pool[23651]: Binormal3fEXT (dynamic) */
+ "fff\0"
+ "glBinormal3fEXT\0"
+ "\0"
+ /* _mesa_function_pool[23672]: CallList (offset 2) */
+ "i\0"
+ "glCallList\0"
+ "\0"
+ /* _mesa_function_pool[23686]: Materialfv (offset 170) */
+ "iip\0"
+ "glMaterialfv\0"
+ "\0"
+ /* _mesa_function_pool[23704]: TexCoord3fv (offset 113) */
+ "p\0"
+ "glTexCoord3fv\0"
+ "\0"
+ /* _mesa_function_pool[23721]: FogCoordfvEXT (will be remapped) */
+ "p\0"
+ "glFogCoordfv\0"
+ "glFogCoordfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[23753]: MultiTexCoord1ivARB (offset 381) */
+ "ip\0"
+ "glMultiTexCoord1iv\0"
+ "glMultiTexCoord1ivARB\0"
+ "\0"
+ /* _mesa_function_pool[23798]: SecondaryColor3ubEXT (will be remapped) */
+ "iii\0"
+ "glSecondaryColor3ub\0"
+ "glSecondaryColor3ubEXT\0"
+ "\0"
+ /* _mesa_function_pool[23846]: MultiTexCoord2ivARB (offset 389) */
+ "ip\0"
+ "glMultiTexCoord2iv\0"
+ "glMultiTexCoord2ivARB\0"
+ "\0"
+ /* _mesa_function_pool[23891]: FogFuncSGIS (dynamic) */
+ "ip\0"
+ "glFogFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[23909]: CopyTexSubImage2D (offset 326) */
+ "iiiiiiii\0"
+ "glCopyTexSubImage2D\0"
+ "glCopyTexSubImage2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[23962]: GetObjectParameterivARB (will be remapped) */
+ "iip\0"
+ "glGetObjectParameterivARB\0"
+ "\0"
+ /* _mesa_function_pool[23993]: Color3iv (offset 16) */
+ "p\0"
+ "glColor3iv\0"
+ "\0"
+ /* _mesa_function_pool[24007]: TexCoord4fVertex4fSUN (dynamic) */
+ "ffffffff\0"
+ "glTexCoord4fVertex4fSUN\0"
+ "\0"
+ /* _mesa_function_pool[24041]: DrawElements (offset 311) */
+ "iiip\0"
+ "glDrawElements\0"
+ "\0"
+ /* _mesa_function_pool[24062]: BindVertexArrayAPPLE (will be remapped) */
+ "i\0"
+ "glBindVertexArrayAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[24088]: GetProgramLocalParameterdvARB (will be remapped) */
+ "iip\0"
+ "glGetProgramLocalParameterdvARB\0"
+ "\0"
+ /* _mesa_function_pool[24125]: GetHistogramParameteriv (offset 363) */
+ "iip\0"
+ "glGetHistogramParameteriv\0"
+ "glGetHistogramParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[24185]: MultiTexCoord1iARB (offset 380) */
+ "ii\0"
+ "glMultiTexCoord1i\0"
+ "glMultiTexCoord1iARB\0"
+ "\0"
+ /* _mesa_function_pool[24228]: GetConvolutionFilter (offset 356) */
+ "iiip\0"
+ "glGetConvolutionFilter\0"
+ "glGetConvolutionFilterEXT\0"
+ "\0"
+ /* _mesa_function_pool[24283]: GetProgramivARB (will be remapped) */
+ "iip\0"
+ "glGetProgramivARB\0"
+ "\0"
+ /* _mesa_function_pool[24306]: BlendFuncSeparateEXT (will be remapped) */
+ "iiii\0"
+ "glBlendFuncSeparate\0"
+ "glBlendFuncSeparateEXT\0"
+ "glBlendFuncSeparateINGR\0"
+ "\0"
+ /* _mesa_function_pool[24379]: MapBufferRange (will be remapped) */
+ "iiii\0"
+ "glMapBufferRange\0"
+ "\0"
+ /* _mesa_function_pool[24402]: ProgramParameters4dvNV (will be remapped) */
+ "iiip\0"
+ "glProgramParameters4dvNV\0"
+ "\0"
+ /* _mesa_function_pool[24433]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glTexCoord2fColor3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[24470]: EvalPoint2 (offset 239) */
+ "ii\0"
+ "glEvalPoint2\0"
+ "\0"
+ /* _mesa_function_pool[24487]: EvalPoint1 (offset 237) */
+ "i\0"
+ "glEvalPoint1\0"
+ "\0"
+ /* _mesa_function_pool[24503]: Binormal3dvEXT (dynamic) */
+ "p\0"
+ "glBinormal3dvEXT\0"
+ "\0"
+ /* _mesa_function_pool[24523]: PopMatrix (offset 297) */
+ "\0"
+ "glPopMatrix\0"
+ "\0"
+ /* _mesa_function_pool[24537]: FinishFenceNV (will be remapped) */
+ "i\0"
+ "glFinishFenceNV\0"
+ "\0"
+ /* _mesa_function_pool[24556]: GetFogFuncSGIS (dynamic) */
+ "p\0"
+ "glGetFogFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[24576]: GetUniformLocationARB (will be remapped) */
+ "ip\0"
+ "glGetUniformLocation\0"
+ "glGetUniformLocationARB\0"
+ "\0"
+ /* _mesa_function_pool[24625]: SecondaryColor3fEXT (will be remapped) */
+ "fff\0"
+ "glSecondaryColor3f\0"
+ "glSecondaryColor3fEXT\0"
+ "\0"
+ /* _mesa_function_pool[24671]: GetTexGeniv (offset 280) */
+ "iip\0"
+ "glGetTexGeniv\0"
+ "\0"
+ /* _mesa_function_pool[24690]: CombinerInputNV (will be remapped) */
+ "iiiiii\0"
+ "glCombinerInputNV\0"
+ "\0"
+ /* _mesa_function_pool[24716]: VertexAttrib3sARB (will be remapped) */
+ "iiii\0"
+ "glVertexAttrib3s\0"
+ "glVertexAttrib3sARB\0"
+ "\0"
+ /* _mesa_function_pool[24759]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glReplacementCodeuiNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[24804]: Map2d (offset 222) */
+ "iddiiddiip\0"
+ "glMap2d\0"
+ "\0"
+ /* _mesa_function_pool[24824]: Map2f (offset 223) */
+ "iffiiffiip\0"
+ "glMap2f\0"
+ "\0"
+ /* _mesa_function_pool[24844]: ProgramStringARB (will be remapped) */
+ "iiip\0"
+ "glProgramStringARB\0"
+ "\0"
+ /* _mesa_function_pool[24869]: Vertex4s (offset 148) */
+ "iiii\0"
+ "glVertex4s\0"
+ "\0"
+ /* _mesa_function_pool[24886]: TexCoord4fVertex4fvSUN (dynamic) */
+ "pp\0"
+ "glTexCoord4fVertex4fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[24915]: VertexAttrib3sNV (will be remapped) */
+ "iiii\0"
+ "glVertexAttrib3sNV\0"
+ "\0"
+ /* _mesa_function_pool[24940]: VertexAttrib1fNV (will be remapped) */
+ "if\0"
+ "glVertexAttrib1fNV\0"
+ "\0"
+ /* _mesa_function_pool[24963]: Vertex4f (offset 144) */
+ "ffff\0"
+ "glVertex4f\0"
+ "\0"
+ /* _mesa_function_pool[24980]: EvalCoord1d (offset 228) */
+ "d\0"
+ "glEvalCoord1d\0"
+ "\0"
+ /* _mesa_function_pool[24997]: Vertex4d (offset 142) */
+ "dddd\0"
+ "glVertex4d\0"
+ "\0"
+ /* _mesa_function_pool[25014]: RasterPos4dv (offset 79) */
+ "p\0"
+ "glRasterPos4dv\0"
+ "\0"
+ /* _mesa_function_pool[25032]: FragmentLightfSGIX (dynamic) */
+ "iif\0"
+ "glFragmentLightfSGIX\0"
+ "\0"
+ /* _mesa_function_pool[25058]: GetCompressedTexImageARB (will be remapped) */
+ "iip\0"
+ "glGetCompressedTexImage\0"
+ "glGetCompressedTexImageARB\0"
+ "\0"
+ /* _mesa_function_pool[25114]: GetTexGenfv (offset 279) */
+ "iip\0"
+ "glGetTexGenfv\0"
+ "\0"
+ /* _mesa_function_pool[25133]: Vertex4i (offset 146) */
+ "iiii\0"
+ "glVertex4i\0"
+ "\0"
+ /* _mesa_function_pool[25150]: VertexWeightPointerEXT (dynamic) */
+ "iiip\0"
+ "glVertexWeightPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[25181]: GetHistogram (offset 361) */
+ "iiiip\0"
+ "glGetHistogram\0"
+ "glGetHistogramEXT\0"
+ "\0"
+ /* _mesa_function_pool[25221]: ActiveStencilFaceEXT (will be remapped) */
+ "i\0"
+ "glActiveStencilFaceEXT\0"
+ "\0"
+ /* _mesa_function_pool[25247]: StencilFuncSeparateATI (will be remapped) */
+ "iiii\0"
+ "glStencilFuncSeparateATI\0"
+ "\0"
+ /* _mesa_function_pool[25278]: Materialf (offset 169) */
+ "iif\0"
+ "glMaterialf\0"
+ "\0"
+ /* _mesa_function_pool[25295]: GetShaderSourceARB (will be remapped) */
+ "iipp\0"
+ "glGetShaderSource\0"
+ "glGetShaderSourceARB\0"
+ "\0"
+ /* _mesa_function_pool[25340]: IglooInterfaceSGIX (dynamic) */
+ "ip\0"
+ "glIglooInterfaceSGIX\0"
+ "\0"
+ /* _mesa_function_pool[25365]: Materiali (offset 171) */
+ "iii\0"
+ "glMateriali\0"
+ "\0"
+ /* _mesa_function_pool[25382]: VertexAttrib4dNV (will be remapped) */
+ "idddd\0"
+ "glVertexAttrib4dNV\0"
+ "\0"
+ /* _mesa_function_pool[25408]: MultiModeDrawElementsIBM (will be remapped) */
+ "ppipii\0"
+ "glMultiModeDrawElementsIBM\0"
+ "\0"
+ /* _mesa_function_pool[25443]: Indexsv (offset 51) */
+ "p\0"
+ "glIndexsv\0"
+ "\0"
+ /* _mesa_function_pool[25456]: MultiTexCoord4svARB (offset 407) */
+ "ip\0"
+ "glMultiTexCoord4sv\0"
+ "glMultiTexCoord4svARB\0"
+ "\0"
+ /* _mesa_function_pool[25501]: LightModelfv (offset 164) */
+ "ip\0"
+ "glLightModelfv\0"
+ "\0"
+ /* _mesa_function_pool[25520]: TexCoord2dv (offset 103) */
+ "p\0"
+ "glTexCoord2dv\0"
+ "\0"
+ /* _mesa_function_pool[25537]: GenQueriesARB (will be remapped) */
+ "ip\0"
+ "glGenQueries\0"
+ "glGenQueriesARB\0"
+ "\0"
+ /* _mesa_function_pool[25570]: EvalCoord1dv (offset 229) */
+ "p\0"
+ "glEvalCoord1dv\0"
+ "\0"
+ /* _mesa_function_pool[25588]: ReplacementCodeuiVertex3fSUN (dynamic) */
+ "ifff\0"
+ "glReplacementCodeuiVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[25625]: Translated (offset 303) */
+ "ddd\0"
+ "glTranslated\0"
+ "\0"
+ /* _mesa_function_pool[25643]: Translatef (offset 304) */
+ "fff\0"
+ "glTranslatef\0"
+ "\0"
+ /* _mesa_function_pool[25661]: StencilMask (offset 209) */
+ "i\0"
+ "glStencilMask\0"
+ "\0"
+ /* _mesa_function_pool[25678]: Tangent3iEXT (dynamic) */
+ "iii\0"
+ "glTangent3iEXT\0"
+ "\0"
+ /* _mesa_function_pool[25698]: GetLightiv (offset 265) */
+ "iip\0"
+ "glGetLightiv\0"
+ "\0"
+ /* _mesa_function_pool[25716]: DrawMeshArraysSUN (dynamic) */
+ "iiii\0"
+ "glDrawMeshArraysSUN\0"
+ "\0"
+ /* _mesa_function_pool[25742]: IsList (offset 287) */
+ "i\0"
+ "glIsList\0"
+ "\0"
+ /* _mesa_function_pool[25754]: IsSync (will be remapped) */
+ "i\0"
+ "glIsSync\0"
+ "\0"
+ /* _mesa_function_pool[25766]: RenderMode (offset 196) */
+ "i\0"
+ "glRenderMode\0"
+ "\0"
+ /* _mesa_function_pool[25782]: GetMapControlPointsNV (dynamic) */
+ "iiiiiip\0"
+ "glGetMapControlPointsNV\0"
+ "\0"
+ /* _mesa_function_pool[25815]: DrawBuffersARB (will be remapped) */
+ "ip\0"
+ "glDrawBuffers\0"
+ "glDrawBuffersARB\0"
+ "glDrawBuffersATI\0"
+ "\0"
+ /* _mesa_function_pool[25867]: ProgramLocalParameter4fARB (will be remapped) */
+ "iiffff\0"
+ "glProgramLocalParameter4fARB\0"
+ "\0"
+ /* _mesa_function_pool[25904]: SpriteParameterivSGIX (dynamic) */
+ "ip\0"
+ "glSpriteParameterivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[25932]: ProvokingVertexEXT (will be remapped) */
+ "i\0"
+ "glProvokingVertexEXT\0"
+ "glProvokingVertex\0"
+ "\0"
+ /* _mesa_function_pool[25974]: MultiTexCoord1fARB (offset 378) */
+ "if\0"
+ "glMultiTexCoord1f\0"
+ "glMultiTexCoord1fARB\0"
+ "\0"
+ /* _mesa_function_pool[26017]: LoadName (offset 198) */
+ "i\0"
+ "glLoadName\0"
+ "\0"
+ /* _mesa_function_pool[26031]: VertexAttribs4ubvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs4ubvNV\0"
+ "\0"
+ /* _mesa_function_pool[26058]: WeightsvARB (dynamic) */
+ "ip\0"
+ "glWeightsvARB\0"
+ "\0"
+ /* _mesa_function_pool[26076]: Uniform1fvARB (will be remapped) */
+ "iip\0"
+ "glUniform1fv\0"
+ "glUniform1fvARB\0"
+ "\0"
+ /* _mesa_function_pool[26110]: CopyTexSubImage1D (offset 325) */
+ "iiiiii\0"
+ "glCopyTexSubImage1D\0"
+ "glCopyTexSubImage1DEXT\0"
+ "\0"
+ /* _mesa_function_pool[26161]: CullFace (offset 152) */
+ "i\0"
+ "glCullFace\0"
+ "\0"
+ /* _mesa_function_pool[26175]: BindTexture (offset 307) */
+ "ii\0"
+ "glBindTexture\0"
+ "glBindTextureEXT\0"
+ "\0"
+ /* _mesa_function_pool[26210]: BeginFragmentShaderATI (will be remapped) */
+ "\0"
+ "glBeginFragmentShaderATI\0"
+ "\0"
+ /* _mesa_function_pool[26237]: MultiTexCoord4fARB (offset 402) */
+ "iffff\0"
+ "glMultiTexCoord4f\0"
+ "glMultiTexCoord4fARB\0"
+ "\0"
+ /* _mesa_function_pool[26283]: VertexAttribs3svNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs3svNV\0"
+ "\0"
+ /* _mesa_function_pool[26309]: StencilFunc (offset 243) */
+ "iii\0"
+ "glStencilFunc\0"
+ "\0"
+ /* _mesa_function_pool[26328]: CopyPixels (offset 255) */
+ "iiiii\0"
+ "glCopyPixels\0"
+ "\0"
+ /* _mesa_function_pool[26348]: Rectsv (offset 93) */
+ "pp\0"
+ "glRectsv\0"
+ "\0"
+ /* _mesa_function_pool[26361]: ReplacementCodeuivSUN (dynamic) */
+ "p\0"
+ "glReplacementCodeuivSUN\0"
+ "\0"
+ /* _mesa_function_pool[26388]: EnableVertexAttribArrayARB (will be remapped) */
+ "i\0"
+ "glEnableVertexAttribArray\0"
+ "glEnableVertexAttribArrayARB\0"
+ "\0"
+ /* _mesa_function_pool[26446]: NormalPointervINTEL (dynamic) */
+ "ip\0"
+ "glNormalPointervINTEL\0"
+ "\0"
+ /* _mesa_function_pool[26472]: CopyConvolutionFilter2D (offset 355) */
+ "iiiiii\0"
+ "glCopyConvolutionFilter2D\0"
+ "glCopyConvolutionFilter2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[26535]: WindowPos3ivMESA (will be remapped) */
+ "p\0"
+ "glWindowPos3iv\0"
+ "glWindowPos3ivARB\0"
+ "glWindowPos3ivMESA\0"
+ "\0"
+ /* _mesa_function_pool[26590]: CopyBufferSubData (will be remapped) */
+ "iiiii\0"
+ "glCopyBufferSubData\0"
+ "\0"
+ /* _mesa_function_pool[26617]: NormalPointer (offset 318) */
+ "iip\0"
+ "glNormalPointer\0"
+ "\0"
+ /* _mesa_function_pool[26638]: TexParameterfv (offset 179) */
+ "iip\0"
+ "glTexParameterfv\0"
+ "\0"
+ /* _mesa_function_pool[26660]: IsBufferARB (will be remapped) */
+ "i\0"
+ "glIsBuffer\0"
+ "glIsBufferARB\0"
+ "\0"
+ /* _mesa_function_pool[26688]: WindowPos4iMESA (will be remapped) */
+ "iiii\0"
+ "glWindowPos4iMESA\0"
+ "\0"
+ /* _mesa_function_pool[26712]: VertexAttrib4uivARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4uiv\0"
+ "glVertexAttrib4uivARB\0"
+ "\0"
+ /* _mesa_function_pool[26757]: Tangent3bvEXT (dynamic) */
+ "p\0"
+ "glTangent3bvEXT\0"
+ "\0"
+ /* _mesa_function_pool[26776]: UniformMatrix3x4fv (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix3x4fv\0"
+ "\0"
+ /* _mesa_function_pool[26803]: ClipPlane (offset 150) */
+ "ip\0"
+ "glClipPlane\0"
+ "\0"
+ /* _mesa_function_pool[26819]: Recti (offset 90) */
+ "iiii\0"
+ "glRecti\0"
+ "\0"
+ /* _mesa_function_pool[26833]: DrawRangeElementsBaseVertex (will be remapped) */
+ "iiiiipi\0"
+ "glDrawRangeElementsBaseVertex\0"
+ "\0"
+ /* _mesa_function_pool[26872]: TexCoordPointervINTEL (dynamic) */
+ "iip\0"
+ "glTexCoordPointervINTEL\0"
+ "\0"
+ /* _mesa_function_pool[26901]: DeleteBuffersARB (will be remapped) */
+ "ip\0"
+ "glDeleteBuffers\0"
+ "glDeleteBuffersARB\0"
+ "\0"
+ /* _mesa_function_pool[26940]: WindowPos4fvMESA (will be remapped) */
+ "p\0"
+ "glWindowPos4fvMESA\0"
+ "\0"
+ /* _mesa_function_pool[26962]: GetPixelMapuiv (offset 272) */
+ "ip\0"
+ "glGetPixelMapuiv\0"
+ "\0"
+ /* _mesa_function_pool[26983]: Rectf (offset 88) */
+ "ffff\0"
+ "glRectf\0"
+ "\0"
+ /* _mesa_function_pool[26997]: VertexAttrib1sNV (will be remapped) */
+ "ii\0"
+ "glVertexAttrib1sNV\0"
+ "\0"
+ /* _mesa_function_pool[27020]: Indexfv (offset 47) */
+ "p\0"
+ "glIndexfv\0"
+ "\0"
+ /* _mesa_function_pool[27033]: SecondaryColor3svEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3sv\0"
+ "glSecondaryColor3svEXT\0"
+ "\0"
+ /* _mesa_function_pool[27079]: LoadTransposeMatrixfARB (will be remapped) */
+ "p\0"
+ "glLoadTransposeMatrixf\0"
+ "glLoadTransposeMatrixfARB\0"
+ "\0"
+ /* _mesa_function_pool[27131]: GetPointerv (offset 329) */
+ "ip\0"
+ "glGetPointerv\0"
+ "glGetPointervEXT\0"
+ "\0"
+ /* _mesa_function_pool[27166]: Tangent3bEXT (dynamic) */
+ "iii\0"
+ "glTangent3bEXT\0"
+ "\0"
+ /* _mesa_function_pool[27186]: CombinerParameterfNV (will be remapped) */
+ "if\0"
+ "glCombinerParameterfNV\0"
+ "\0"
+ /* _mesa_function_pool[27213]: IndexMask (offset 212) */
+ "i\0"
+ "glIndexMask\0"
+ "\0"
+ /* _mesa_function_pool[27228]: BindProgramNV (will be remapped) */
+ "ii\0"
+ "glBindProgramARB\0"
+ "glBindProgramNV\0"
+ "\0"
+ /* _mesa_function_pool[27265]: VertexAttrib4svARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4sv\0"
+ "glVertexAttrib4svARB\0"
+ "\0"
+ /* _mesa_function_pool[27308]: GetFloatv (offset 262) */
+ "ip\0"
+ "glGetFloatv\0"
+ "\0"
+ /* _mesa_function_pool[27324]: CreateDebugObjectMESA (dynamic) */
+ "\0"
+ "glCreateDebugObjectMESA\0"
+ "\0"
+ /* _mesa_function_pool[27350]: GetShaderiv (will be remapped) */
+ "iip\0"
+ "glGetShaderiv\0"
+ "\0"
+ /* _mesa_function_pool[27369]: ClientWaitSync (will be remapped) */
+ "iii\0"
+ "glClientWaitSync\0"
+ "\0"
+ /* _mesa_function_pool[27391]: TexCoord4s (offset 124) */
+ "iiii\0"
+ "glTexCoord4s\0"
+ "\0"
+ /* _mesa_function_pool[27410]: TexCoord3sv (offset 117) */
+ "p\0"
+ "glTexCoord3sv\0"
+ "\0"
+ /* _mesa_function_pool[27427]: BindFragmentShaderATI (will be remapped) */
+ "i\0"
+ "glBindFragmentShaderATI\0"
+ "\0"
+ /* _mesa_function_pool[27454]: PopAttrib (offset 218) */
+ "\0"
+ "glPopAttrib\0"
+ "\0"
+ /* _mesa_function_pool[27468]: Fogfv (offset 154) */
+ "ip\0"
+ "glFogfv\0"
+ "\0"
+ /* _mesa_function_pool[27480]: UnmapBufferARB (will be remapped) */
+ "i\0"
+ "glUnmapBuffer\0"
+ "glUnmapBufferARB\0"
+ "\0"
+ /* _mesa_function_pool[27514]: InitNames (offset 197) */
+ "\0"
+ "glInitNames\0"
+ "\0"
+ /* _mesa_function_pool[27528]: Normal3sv (offset 61) */
+ "p\0"
+ "glNormal3sv\0"
+ "\0"
+ /* _mesa_function_pool[27543]: Minmax (offset 368) */
+ "iii\0"
+ "glMinmax\0"
+ "glMinmaxEXT\0"
+ "\0"
+ /* _mesa_function_pool[27569]: TexCoord4d (offset 118) */
+ "dddd\0"
+ "glTexCoord4d\0"
+ "\0"
+ /* _mesa_function_pool[27588]: DeformationMap3dSGIX (dynamic) */
+ "iddiiddiiddiip\0"
+ "glDeformationMap3dSGIX\0"
+ "\0"
+ /* _mesa_function_pool[27627]: TexCoord4f (offset 120) */
+ "ffff\0"
+ "glTexCoord4f\0"
+ "\0"
+ /* _mesa_function_pool[27646]: FogCoorddvEXT (will be remapped) */
+ "p\0"
+ "glFogCoorddv\0"
+ "glFogCoorddvEXT\0"
+ "\0"
+ /* _mesa_function_pool[27678]: FinishTextureSUNX (dynamic) */
+ "\0"
+ "glFinishTextureSUNX\0"
+ "\0"
+ /* _mesa_function_pool[27700]: GetFragmentLightfvSGIX (dynamic) */
+ "iip\0"
+ "glGetFragmentLightfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[27730]: Binormal3fvEXT (dynamic) */
+ "p\0"
+ "glBinormal3fvEXT\0"
+ "\0"
+ /* _mesa_function_pool[27750]: GetBooleanv (offset 258) */
+ "ip\0"
+ "glGetBooleanv\0"
+ "\0"
+ /* _mesa_function_pool[27768]: ColorFragmentOp3ATI (will be remapped) */
+ "iiiiiiiiiiiii\0"
+ "glColorFragmentOp3ATI\0"
+ "\0"
+ /* _mesa_function_pool[27805]: Hint (offset 158) */
+ "ii\0"
+ "glHint\0"
+ "\0"
+ /* _mesa_function_pool[27816]: Color4dv (offset 28) */
+ "p\0"
+ "glColor4dv\0"
+ "\0"
+ /* _mesa_function_pool[27830]: VertexAttrib2svARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2sv\0"
+ "glVertexAttrib2svARB\0"
+ "\0"
+ /* _mesa_function_pool[27873]: AreProgramsResidentNV (will be remapped) */
+ "ipp\0"
+ "glAreProgramsResidentNV\0"
+ "\0"
+ /* _mesa_function_pool[27902]: WindowPos3svMESA (will be remapped) */
+ "p\0"
+ "glWindowPos3sv\0"
+ "glWindowPos3svARB\0"
+ "glWindowPos3svMESA\0"
+ "\0"
+ /* _mesa_function_pool[27957]: CopyColorSubTable (offset 347) */
+ "iiiii\0"
+ "glCopyColorSubTable\0"
+ "glCopyColorSubTableEXT\0"
+ "\0"
+ /* _mesa_function_pool[28007]: WeightdvARB (dynamic) */
+ "ip\0"
+ "glWeightdvARB\0"
+ "\0"
+ /* _mesa_function_pool[28025]: DeleteRenderbuffersEXT (will be remapped) */
+ "ip\0"
+ "glDeleteRenderbuffers\0"
+ "glDeleteRenderbuffersEXT\0"
+ "\0"
+ /* _mesa_function_pool[28076]: VertexAttrib4NubvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4Nubv\0"
+ "glVertexAttrib4NubvARB\0"
+ "\0"
+ /* _mesa_function_pool[28123]: VertexAttrib3dvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib3dvNV\0"
+ "\0"
+ /* _mesa_function_pool[28147]: GetObjectParameterfvARB (will be remapped) */
+ "iip\0"
+ "glGetObjectParameterfvARB\0"
+ "\0"
+ /* _mesa_function_pool[28178]: Vertex4iv (offset 147) */
+ "p\0"
+ "glVertex4iv\0"
+ "\0"
+ /* _mesa_function_pool[28193]: GetProgramEnvParameterdvARB (will be remapped) */
+ "iip\0"
+ "glGetProgramEnvParameterdvARB\0"
+ "\0"
+ /* _mesa_function_pool[28228]: TexCoord4dv (offset 119) */
+ "p\0"
+ "glTexCoord4dv\0"
+ "\0"
+ /* _mesa_function_pool[28245]: LockArraysEXT (will be remapped) */
+ "ii\0"
+ "glLockArraysEXT\0"
+ "\0"
+ /* _mesa_function_pool[28265]: Begin (offset 7) */
+ "i\0"
+ "glBegin\0"
+ "\0"
+ /* _mesa_function_pool[28276]: LightModeli (offset 165) */
+ "ii\0"
+ "glLightModeli\0"
+ "\0"
+ /* _mesa_function_pool[28294]: Rectfv (offset 89) */
+ "pp\0"
+ "glRectfv\0"
+ "\0"
+ /* _mesa_function_pool[28307]: LightModelf (offset 163) */
+ "if\0"
+ "glLightModelf\0"
+ "\0"
+ /* _mesa_function_pool[28325]: GetTexParameterfv (offset 282) */
+ "iip\0"
+ "glGetTexParameterfv\0"
+ "\0"
+ /* _mesa_function_pool[28350]: GetLightfv (offset 264) */
+ "iip\0"
+ "glGetLightfv\0"
+ "\0"
+ /* _mesa_function_pool[28368]: PixelTransformParameterivEXT (dynamic) */
+ "iip\0"
+ "glPixelTransformParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[28404]: BinormalPointerEXT (dynamic) */
+ "iip\0"
+ "glBinormalPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[28430]: VertexAttrib1dNV (will be remapped) */
+ "id\0"
+ "glVertexAttrib1dNV\0"
+ "\0"
+ /* _mesa_function_pool[28453]: GetCombinerInputParameterivNV (will be remapped) */
+ "iiiip\0"
+ "glGetCombinerInputParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[28492]: Disable (offset 214) */
+ "i\0"
+ "glDisable\0"
+ "\0"
+ /* _mesa_function_pool[28505]: MultiTexCoord2fvARB (offset 387) */
+ "ip\0"
+ "glMultiTexCoord2fv\0"
+ "glMultiTexCoord2fvARB\0"
+ "\0"
+ /* _mesa_function_pool[28550]: GetRenderbufferParameterivEXT (will be remapped) */
+ "iip\0"
+ "glGetRenderbufferParameteriv\0"
+ "glGetRenderbufferParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[28616]: CombinerParameterivNV (will be remapped) */
+ "ip\0"
+ "glCombinerParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[28644]: GenFragmentShadersATI (will be remapped) */
+ "i\0"
+ "glGenFragmentShadersATI\0"
+ "\0"
+ /* _mesa_function_pool[28671]: DrawArrays (offset 310) */
+ "iii\0"
+ "glDrawArrays\0"
+ "glDrawArraysEXT\0"
+ "\0"
+ /* _mesa_function_pool[28705]: WeightuivARB (dynamic) */
+ "ip\0"
+ "glWeightuivARB\0"
+ "\0"
+ /* _mesa_function_pool[28724]: VertexAttrib2sARB (will be remapped) */
+ "iii\0"
+ "glVertexAttrib2s\0"
+ "glVertexAttrib2sARB\0"
+ "\0"
+ /* _mesa_function_pool[28766]: ColorMask (offset 210) */
+ "iiii\0"
+ "glColorMask\0"
+ "\0"
+ /* _mesa_function_pool[28784]: GenAsyncMarkersSGIX (dynamic) */
+ "i\0"
+ "glGenAsyncMarkersSGIX\0"
+ "\0"
+ /* _mesa_function_pool[28809]: Tangent3svEXT (dynamic) */
+ "p\0"
+ "glTangent3svEXT\0"
+ "\0"
+ /* _mesa_function_pool[28828]: GetListParameterivSGIX (dynamic) */
+ "iip\0"
+ "glGetListParameterivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[28858]: BindBufferARB (will be remapped) */
+ "ii\0"
+ "glBindBuffer\0"
+ "glBindBufferARB\0"
+ "\0"
+ /* _mesa_function_pool[28891]: GetInfoLogARB (will be remapped) */
+ "iipp\0"
+ "glGetInfoLogARB\0"
+ "\0"
+ /* _mesa_function_pool[28913]: RasterPos4iv (offset 83) */
+ "p\0"
+ "glRasterPos4iv\0"
+ "\0"
+ /* _mesa_function_pool[28931]: Enable (offset 215) */
+ "i\0"
+ "glEnable\0"
+ "\0"
+ /* _mesa_function_pool[28943]: LineStipple (offset 167) */
+ "ii\0"
+ "glLineStipple\0"
+ "\0"
+ /* _mesa_function_pool[28961]: VertexAttribs4svNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs4svNV\0"
+ "\0"
+ /* _mesa_function_pool[28987]: EdgeFlagPointerListIBM (dynamic) */
+ "ipi\0"
+ "glEdgeFlagPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[29017]: UniformMatrix3x2fv (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix3x2fv\0"
+ "\0"
+ /* _mesa_function_pool[29044]: GetMinmaxParameterfv (offset 365) */
+ "iip\0"
+ "glGetMinmaxParameterfv\0"
+ "glGetMinmaxParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[29098]: VertexAttrib1fvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib1fv\0"
+ "glVertexAttrib1fvARB\0"
+ "\0"
+ /* _mesa_function_pool[29141]: GenBuffersARB (will be remapped) */
+ "ip\0"
+ "glGenBuffers\0"
+ "glGenBuffersARB\0"
+ "\0"
+ /* _mesa_function_pool[29174]: VertexAttribs1svNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs1svNV\0"
+ "\0"
+ /* _mesa_function_pool[29200]: Vertex3fv (offset 137) */
+ "p\0"
+ "glVertex3fv\0"
+ "\0"
+ /* _mesa_function_pool[29215]: GetTexBumpParameterivATI (will be remapped) */
+ "ip\0"
+ "glGetTexBumpParameterivATI\0"
+ "\0"
+ /* _mesa_function_pool[29246]: Binormal3bEXT (dynamic) */
+ "iii\0"
+ "glBinormal3bEXT\0"
+ "\0"
+ /* _mesa_function_pool[29267]: FragmentMaterialivSGIX (dynamic) */
+ "iip\0"
+ "glFragmentMaterialivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[29297]: IsRenderbufferEXT (will be remapped) */
+ "i\0"
+ "glIsRenderbuffer\0"
+ "glIsRenderbufferEXT\0"
+ "\0"
+ /* _mesa_function_pool[29337]: GenProgramsNV (will be remapped) */
+ "ip\0"
+ "glGenProgramsARB\0"
+ "glGenProgramsNV\0"
+ "\0"
+ /* _mesa_function_pool[29374]: VertexAttrib4dvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4dvNV\0"
+ "\0"
+ /* _mesa_function_pool[29398]: EndFragmentShaderATI (will be remapped) */
+ "\0"
+ "glEndFragmentShaderATI\0"
+ "\0"
+ /* _mesa_function_pool[29423]: Binormal3iEXT (dynamic) */
+ "iii\0"
+ "glBinormal3iEXT\0"
+ "\0"
+ /* _mesa_function_pool[29444]: 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 },
+ { 20115, CreateShader_remap_index },
+ { 22375, DeleteProgram_remap_index },
+ { 16150, DeleteShader_remap_index },
+ { 20561, DetachShader_remap_index },
+ { 15674, GetAttachedShaders_remap_index },
+ { 4244, GetProgramInfoLog_remap_index },
+ { 361, GetProgramiv_remap_index },
+ { 5547, GetShaderInfoLog_remap_index },
+ { 27350, GetShaderiv_remap_index },
+ { 11657, IsProgram_remap_index },
+ { 10728, IsShader_remap_index },
+ { 8808, StencilFuncSeparate_remap_index },
+ { 3487, StencilMaskSeparate_remap_index },
+ { 6623, StencilOpSeparate_remap_index },
+ { 19492, UniformMatrix2x3fv_remap_index },
+ { 2615, UniformMatrix2x4fv_remap_index },
+ { 29017, UniformMatrix3x2fv_remap_index },
+ { 26776, UniformMatrix3x4fv_remap_index },
+ { 14222, UniformMatrix4x2fv_remap_index },
+ { 2937, UniformMatrix4x3fv_remap_index },
+ { 8722, LoadTransposeMatrixdARB_remap_index },
+ { 27079, LoadTransposeMatrixfARB_remap_index },
+ { 4817, MultTransposeMatrixdARB_remap_index },
+ { 20748, MultTransposeMatrixfARB_remap_index },
+ { 172, SampleCoverageARB_remap_index },
+ { 4971, CompressedTexImage1DARB_remap_index },
+ { 21205, CompressedTexImage2DARB_remap_index },
+ { 3550, CompressedTexImage3DARB_remap_index },
+ { 15966, CompressedTexSubImage1DARB_remap_index },
+ { 1880, CompressedTexSubImage2DARB_remap_index },
+ { 17758, CompressedTexSubImage3DARB_remap_index },
+ { 25058, GetCompressedTexImageARB_remap_index },
+ { 3395, DisableVertexAttribArrayARB_remap_index },
+ { 26388, EnableVertexAttribArrayARB_remap_index },
+ { 28193, GetProgramEnvParameterdvARB_remap_index },
+ { 20628, GetProgramEnvParameterfvARB_remap_index },
+ { 24088, GetProgramLocalParameterdvARB_remap_index },
+ { 7065, GetProgramLocalParameterfvARB_remap_index },
+ { 16057, GetProgramStringARB_remap_index },
+ { 24283, GetProgramivARB_remap_index },
+ { 17953, GetVertexAttribdvARB_remap_index },
+ { 14111, GetVertexAttribfvARB_remap_index },
+ { 8617, GetVertexAttribivARB_remap_index },
+ { 16862, ProgramEnvParameter4dARB_remap_index },
+ { 22175, ProgramEnvParameter4dvARB_remap_index },
+ { 14719, ProgramEnvParameter4fARB_remap_index },
+ { 7928, ProgramEnvParameter4fvARB_remap_index },
+ { 3513, ProgramLocalParameter4dARB_remap_index },
+ { 11403, ProgramLocalParameter4dvARB_remap_index },
+ { 25867, ProgramLocalParameter4fARB_remap_index },
+ { 22693, ProgramLocalParameter4fvARB_remap_index },
+ { 24844, ProgramStringARB_remap_index },
+ { 17112, VertexAttrib1dARB_remap_index },
+ { 13765, VertexAttrib1dvARB_remap_index },
+ { 3688, VertexAttrib1fARB_remap_index },
+ { 29098, VertexAttrib1fvARB_remap_index },
+ { 6149, VertexAttrib1sARB_remap_index },
+ { 2054, VertexAttrib1svARB_remap_index },
+ { 13196, VertexAttrib2dARB_remap_index },
+ { 15293, VertexAttrib2dvARB_remap_index },
+ { 1480, VertexAttrib2fARB_remap_index },
+ { 15406, VertexAttrib2fvARB_remap_index },
+ { 28724, VertexAttrib2sARB_remap_index },
+ { 27830, VertexAttrib2svARB_remap_index },
+ { 9926, VertexAttrib3dARB_remap_index },
+ { 7631, VertexAttrib3dvARB_remap_index },
+ { 1567, VertexAttrib3fARB_remap_index },
+ { 19729, VertexAttrib3fvARB_remap_index },
+ { 24716, VertexAttrib3sARB_remap_index },
+ { 17695, VertexAttrib3svARB_remap_index },
+ { 4270, VertexAttrib4NbvARB_remap_index },
+ { 15629, VertexAttrib4NivARB_remap_index },
+ { 19684, VertexAttrib4NsvARB_remap_index },
+ { 20580, VertexAttrib4NubARB_remap_index },
+ { 28076, VertexAttrib4NubvARB_remap_index },
+ { 16523, VertexAttrib4NuivARB_remap_index },
+ { 2810, VertexAttrib4NusvARB_remap_index },
+ { 9549, VertexAttrib4bvARB_remap_index },
+ { 23496, VertexAttrib4dARB_remap_index },
+ { 18678, VertexAttrib4dvARB_remap_index },
+ { 10033, VertexAttrib4fARB_remap_index },
+ { 10403, VertexAttrib4fvARB_remap_index },
+ { 9001, VertexAttrib4ivARB_remap_index },
+ { 15107, VertexAttrib4sARB_remap_index },
+ { 27265, VertexAttrib4svARB_remap_index },
+ { 14524, VertexAttrib4ubvARB_remap_index },
+ { 26712, VertexAttrib4uivARB_remap_index },
+ { 17506, VertexAttrib4usvARB_remap_index },
+ { 19366, VertexAttribPointerARB_remap_index },
+ { 28858, BindBufferARB_remap_index },
+ { 5862, BufferDataARB_remap_index },
+ { 1382, BufferSubDataARB_remap_index },
+ { 26901, DeleteBuffersARB_remap_index },
+ { 29141, GenBuffersARB_remap_index },
+ { 15449, GetBufferParameterivARB_remap_index },
+ { 14671, GetBufferPointervARB_remap_index },
+ { 1335, GetBufferSubDataARB_remap_index },
+ { 26660, IsBufferARB_remap_index },
+ { 23124, MapBufferARB_remap_index },
+ { 27480, UnmapBufferARB_remap_index },
+ { 268, BeginQueryARB_remap_index },
+ { 17207, DeleteQueriesARB_remap_index },
+ { 10664, EndQueryARB_remap_index },
+ { 25537, GenQueriesARB_remap_index },
+ { 1772, GetQueryObjectivARB_remap_index },
+ { 15151, GetQueryObjectuivARB_remap_index },
+ { 1624, GetQueryivARB_remap_index },
+ { 17413, IsQueryARB_remap_index },
+ { 7241, AttachObjectARB_remap_index },
+ { 16112, CompileShaderARB_remap_index },
+ { 2879, CreateProgramObjectARB_remap_index },
+ { 5807, CreateShaderObjectARB_remap_index },
+ { 12613, DeleteObjectARB_remap_index },
+ { 20979, DetachObjectARB_remap_index },
+ { 10475, GetActiveUniformARB_remap_index },
+ { 8320, GetAttachedObjectsARB_remap_index },
+ { 8599, GetHandleARB_remap_index },
+ { 28891, GetInfoLogARB_remap_index },
+ { 28147, GetObjectParameterfvARB_remap_index },
+ { 23962, GetObjectParameterivARB_remap_index },
+ { 25295, GetShaderSourceARB_remap_index },
+ { 24576, GetUniformLocationARB_remap_index },
+ { 20850, GetUniformfvARB_remap_index },
+ { 11025, GetUniformivARB_remap_index },
+ { 17551, LinkProgramARB_remap_index },
+ { 17609, ShaderSourceARB_remap_index },
+ { 6523, Uniform1fARB_remap_index },
+ { 26076, Uniform1fvARB_remap_index },
+ { 19335, Uniform1iARB_remap_index },
+ { 18367, Uniform1ivARB_remap_index },
+ { 2003, Uniform2fARB_remap_index },
+ { 12449, Uniform2fvARB_remap_index },
+ { 23011, Uniform2iARB_remap_index },
+ { 2123, Uniform2ivARB_remap_index },
+ { 16222, Uniform3fARB_remap_index },
+ { 8350, Uniform3fvARB_remap_index },
+ { 5481, Uniform3iARB_remap_index },
+ { 14777, Uniform3ivARB_remap_index },
+ { 16668, Uniform4fARB_remap_index },
+ { 20714, Uniform4fvARB_remap_index },
+ { 21854, Uniform4iARB_remap_index },
+ { 17919, Uniform4ivARB_remap_index },
+ { 7293, UniformMatrix2fvARB_remap_index },
+ { 17, UniformMatrix3fvARB_remap_index },
+ { 2475, UniformMatrix4fvARB_remap_index },
+ { 22287, UseProgramObjectARB_remap_index },
+ { 12884, ValidateProgramARB_remap_index },
+ { 18721, BindAttribLocationARB_remap_index },
+ { 4315, GetActiveAttribARB_remap_index },
+ { 14458, GetAttribLocationARB_remap_index },
+ { 25815, DrawBuffersARB_remap_index },
+ { 11508, RenderbufferStorageMultisample_remap_index },
+ { 16716, FlushMappedBufferRange_remap_index },
+ { 24379, MapBufferRange_remap_index },
+ { 14333, BindVertexArray_remap_index },
+ { 12743, GenVertexArrays_remap_index },
+ { 26590, CopyBufferSubData_remap_index },
+ { 27369, ClientWaitSync_remap_index },
+ { 2394, DeleteSync_remap_index },
+ { 6190, FenceSync_remap_index },
+ { 13255, GetInteger64v_remap_index },
+ { 19791, GetSynciv_remap_index },
+ { 25754, IsSync_remap_index },
+ { 8268, WaitSync_remap_index },
+ { 3363, DrawElementsBaseVertex_remap_index },
+ { 26833, DrawRangeElementsBaseVertex_remap_index },
+ { 23155, MultiDrawElementsBaseVertex_remap_index },
+ { 4680, PolygonOffsetEXT_remap_index },
+ { 20350, GetPixelTexGenParameterfvSGIS_remap_index },
+ { 3895, GetPixelTexGenParameterivSGIS_remap_index },
+ { 20083, PixelTexGenParameterfSGIS_remap_index },
+ { 580, PixelTexGenParameterfvSGIS_remap_index },
+ { 11063, PixelTexGenParameteriSGIS_remap_index },
+ { 12020, PixelTexGenParameterivSGIS_remap_index },
+ { 14421, SampleMaskSGIS_remap_index },
+ { 17353, SamplePatternSGIS_remap_index },
+ { 23084, ColorPointerEXT_remap_index },
+ { 15336, EdgeFlagPointerEXT_remap_index },
+ { 5135, IndexPointerEXT_remap_index },
+ { 5215, NormalPointerEXT_remap_index },
+ { 13849, TexCoordPointerEXT_remap_index },
+ { 5985, VertexPointerEXT_remap_index },
+ { 3165, PointParameterfEXT_remap_index },
+ { 6830, PointParameterfvEXT_remap_index },
+ { 28245, LockArraysEXT_remap_index },
+ { 12948, UnlockArraysEXT_remap_index },
+ { 7837, CullParameterdvEXT_remap_index },
+ { 10270, CullParameterfvEXT_remap_index },
+ { 1151, SecondaryColor3bEXT_remap_index },
+ { 6989, SecondaryColor3bvEXT_remap_index },
+ { 9178, SecondaryColor3dEXT_remap_index },
+ { 22433, SecondaryColor3dvEXT_remap_index },
+ { 24625, SecondaryColor3fEXT_remap_index },
+ { 15902, SecondaryColor3fvEXT_remap_index },
+ { 426, SecondaryColor3iEXT_remap_index },
+ { 14159, SecondaryColor3ivEXT_remap_index },
+ { 8836, SecondaryColor3sEXT_remap_index },
+ { 27033, SecondaryColor3svEXT_remap_index },
+ { 23798, SecondaryColor3ubEXT_remap_index },
+ { 18612, SecondaryColor3ubvEXT_remap_index },
+ { 11258, SecondaryColor3uiEXT_remap_index },
+ { 19970, SecondaryColor3uivEXT_remap_index },
+ { 22645, SecondaryColor3usEXT_remap_index },
+ { 11331, SecondaryColor3usvEXT_remap_index },
+ { 10346, SecondaryColorPointerEXT_remap_index },
+ { 22494, MultiDrawArraysEXT_remap_index },
+ { 18302, MultiDrawElementsEXT_remap_index },
+ { 18497, FogCoordPointerEXT_remap_index },
+ { 4044, FogCoorddEXT_remap_index },
+ { 27646, FogCoorddvEXT_remap_index },
+ { 4105, FogCoordfEXT_remap_index },
+ { 23721, FogCoordfvEXT_remap_index },
+ { 16620, PixelTexGenSGIX_remap_index },
+ { 24306, BlendFuncSeparateEXT_remap_index },
+ { 5897, FlushVertexArrayRangeNV_remap_index },
+ { 4629, VertexArrayRangeNV_remap_index },
+ { 24690, CombinerInputNV_remap_index },
+ { 1946, CombinerOutputNV_remap_index },
+ { 27186, CombinerParameterfNV_remap_index },
+ { 4549, CombinerParameterfvNV_remap_index },
+ { 19541, CombinerParameteriNV_remap_index },
+ { 28616, CombinerParameterivNV_remap_index },
+ { 6267, FinalCombinerInputNV_remap_index },
+ { 8665, GetCombinerInputParameterfvNV_remap_index },
+ { 28453, GetCombinerInputParameterivNV_remap_index },
+ { 6066, GetCombinerOutputParameterfvNV_remap_index },
+ { 11949, GetCombinerOutputParameterivNV_remap_index },
+ { 5642, GetFinalCombinerInputParameterfvNV_remap_index },
+ { 21726, GetFinalCombinerInputParameterivNV_remap_index },
+ { 11003, ResizeBuffersMESA_remap_index },
+ { 9753, WindowPos2dMESA_remap_index },
+ { 944, WindowPos2dvMESA_remap_index },
+ { 29444, WindowPos2fMESA_remap_index },
+ { 6934, WindowPos2fvMESA_remap_index },
+ { 15849, WindowPos2iMESA_remap_index },
+ { 17826, WindowPos2ivMESA_remap_index },
+ { 18401, WindowPos2sMESA_remap_index },
+ { 4885, WindowPos2svMESA_remap_index },
+ { 6759, WindowPos3dMESA_remap_index },
+ { 12228, WindowPos3dvMESA_remap_index },
+ { 472, WindowPos3fMESA_remap_index },
+ { 13009, WindowPos3fvMESA_remap_index },
+ { 21021, WindowPos3iMESA_remap_index },
+ { 26535, WindowPos3ivMESA_remap_index },
+ { 16366, WindowPos3sMESA_remap_index },
+ { 27902, WindowPos3svMESA_remap_index },
+ { 9704, WindowPos4dMESA_remap_index },
+ { 14862, WindowPos4dvMESA_remap_index },
+ { 12187, WindowPos4fMESA_remap_index },
+ { 26940, WindowPos4fvMESA_remap_index },
+ { 26688, WindowPos4iMESA_remap_index },
+ { 10842, WindowPos4ivMESA_remap_index },
+ { 16499, WindowPos4sMESA_remap_index },
+ { 2857, WindowPos4svMESA_remap_index },
+ { 11988, MultiModeDrawArraysIBM_remap_index },
+ { 25408, MultiModeDrawElementsIBM_remap_index },
+ { 10692, DeleteFencesNV_remap_index },
+ { 24537, FinishFenceNV_remap_index },
+ { 3287, GenFencesNV_remap_index },
+ { 14842, GetFenceivNV_remap_index },
+ { 7226, IsFenceNV_remap_index },
+ { 11876, SetFenceNV_remap_index },
+ { 3744, TestFenceNV_remap_index },
+ { 27873, AreProgramsResidentNV_remap_index },
+ { 27228, BindProgramNV_remap_index },
+ { 22728, DeleteProgramsNV_remap_index },
+ { 18830, ExecuteProgramNV_remap_index },
+ { 29337, GenProgramsNV_remap_index },
+ { 20429, GetProgramParameterdvNV_remap_index },
+ { 9240, GetProgramParameterfvNV_remap_index },
+ { 23058, GetProgramStringNV_remap_index },
+ { 21415, GetProgramivNV_remap_index },
+ { 20663, GetTrackMatrixivNV_remap_index },
+ { 22878, GetVertexAttribPointervNV_remap_index },
+ { 21659, GetVertexAttribdvNV_remap_index },
+ { 16339, GetVertexAttribfvNV_remap_index },
+ { 16030, GetVertexAttribivNV_remap_index },
+ { 16746, IsProgramNV_remap_index },
+ { 8246, LoadProgramNV_remap_index },
+ { 24402, ProgramParameters4dvNV_remap_index },
+ { 21345, ProgramParameters4fvNV_remap_index },
+ { 18130, RequestResidentProgramsNV_remap_index },
+ { 19519, TrackMatrixNV_remap_index },
+ { 28430, VertexAttrib1dNV_remap_index },
+ { 11817, VertexAttrib1dvNV_remap_index },
+ { 24940, VertexAttrib1fNV_remap_index },
+ { 2245, VertexAttrib1fvNV_remap_index },
+ { 26997, VertexAttrib1sNV_remap_index },
+ { 13082, VertexAttrib1svNV_remap_index },
+ { 4220, VertexAttrib2dNV_remap_index },
+ { 11732, VertexAttrib2dvNV_remap_index },
+ { 17585, VertexAttrib2fNV_remap_index },
+ { 11379, VertexAttrib2fvNV_remap_index },
+ { 5045, VertexAttrib2sNV_remap_index },
+ { 16420, VertexAttrib2svNV_remap_index },
+ { 9901, VertexAttrib3dNV_remap_index },
+ { 28123, VertexAttrib3dvNV_remap_index },
+ { 9052, VertexAttrib3fNV_remap_index },
+ { 21686, VertexAttrib3fvNV_remap_index },
+ { 24915, VertexAttrib3sNV_remap_index },
+ { 20690, VertexAttrib3svNV_remap_index },
+ { 25382, VertexAttrib4dNV_remap_index },
+ { 29374, VertexAttrib4dvNV_remap_index },
+ { 3945, VertexAttrib4fNV_remap_index },
+ { 8296, VertexAttrib4fvNV_remap_index },
+ { 23380, VertexAttrib4sNV_remap_index },
+ { 1293, VertexAttrib4svNV_remap_index },
+ { 4378, VertexAttrib4ubNV_remap_index },
+ { 734, VertexAttrib4ubvNV_remap_index },
+ { 19010, VertexAttribPointerNV_remap_index },
+ { 2097, VertexAttribs1dvNV_remap_index },
+ { 16444, VertexAttribs1fvNV_remap_index },
+ { 29174, VertexAttribs1svNV_remap_index },
+ { 9077, VertexAttribs2dvNV_remap_index },
+ { 22248, VertexAttribs2fvNV_remap_index },
+ { 15362, VertexAttribs2svNV_remap_index },
+ { 4577, VertexAttribs3dvNV_remap_index },
+ { 1977, VertexAttribs3fvNV_remap_index },
+ { 26283, VertexAttribs3svNV_remap_index },
+ { 23470, VertexAttribs4dvNV_remap_index },
+ { 4603, VertexAttribs4fvNV_remap_index },
+ { 28961, VertexAttribs4svNV_remap_index },
+ { 26031, VertexAttribs4ubvNV_remap_index },
+ { 23540, GetTexBumpParameterfvATI_remap_index },
+ { 29215, GetTexBumpParameterivATI_remap_index },
+ { 16084, TexBumpParameterfvATI_remap_index },
+ { 18001, TexBumpParameterivATI_remap_index },
+ { 13628, AlphaFragmentOp1ATI_remap_index },
+ { 9592, AlphaFragmentOp2ATI_remap_index },
+ { 21602, AlphaFragmentOp3ATI_remap_index },
+ { 26210, BeginFragmentShaderATI_remap_index },
+ { 27427, BindFragmentShaderATI_remap_index },
+ { 20819, ColorFragmentOp1ATI_remap_index },
+ { 3823, ColorFragmentOp2ATI_remap_index },
+ { 27768, ColorFragmentOp3ATI_remap_index },
+ { 4722, DeleteFragmentShaderATI_remap_index },
+ { 29398, EndFragmentShaderATI_remap_index },
+ { 28644, GenFragmentShadersATI_remap_index },
+ { 22352, PassTexCoordATI_remap_index },
+ { 5965, SampleMapATI_remap_index },
+ { 5738, SetFragmentShaderConstantATI_remap_index },
+ { 319, PointParameteriNV_remap_index },
+ { 12389, PointParameterivNV_remap_index },
+ { 25221, ActiveStencilFaceEXT_remap_index },
+ { 24062, BindVertexArrayAPPLE_remap_index },
+ { 2522, DeleteVertexArraysAPPLE_remap_index },
+ { 15701, GenVertexArraysAPPLE_remap_index },
+ { 20494, IsVertexArrayAPPLE_remap_index },
+ { 775, GetProgramNamedParameterdvNV_remap_index },
+ { 3128, GetProgramNamedParameterfvNV_remap_index },
+ { 23571, ProgramNamedParameter4dNV_remap_index },
+ { 12664, ProgramNamedParameter4dvNV_remap_index },
+ { 7862, ProgramNamedParameter4fNV_remap_index },
+ { 10311, ProgramNamedParameter4fvNV_remap_index },
+ { 21324, DepthBoundsEXT_remap_index },
+ { 1043, BlendEquationSeparateEXT_remap_index },
+ { 12783, BindFramebufferEXT_remap_index },
+ { 22539, BindRenderbufferEXT_remap_index },
+ { 8515, CheckFramebufferStatusEXT_remap_index },
+ { 19810, DeleteFramebuffersEXT_remap_index },
+ { 28025, DeleteRenderbuffersEXT_remap_index },
+ { 11756, FramebufferRenderbufferEXT_remap_index },
+ { 11893, FramebufferTexture1DEXT_remap_index },
+ { 10139, FramebufferTexture2DEXT_remap_index },
+ { 9806, FramebufferTexture3DEXT_remap_index },
+ { 20386, GenFramebuffersEXT_remap_index },
+ { 15248, GenRenderbuffersEXT_remap_index },
+ { 5684, GenerateMipmapEXT_remap_index },
+ { 19041, GetFramebufferAttachmentParameterivEXT_remap_index },
+ { 28550, GetRenderbufferParameterivEXT_remap_index },
+ { 17881, IsFramebufferEXT_remap_index },
+ { 29297, IsRenderbufferEXT_remap_index },
+ { 7173, RenderbufferStorageEXT_remap_index },
+ { 651, BlitFramebufferEXT_remap_index },
+ { 12483, BufferParameteriAPPLE_remap_index },
+ { 16778, FlushMappedBufferRangeAPPLE_remap_index },
+ { 2701, FramebufferTextureLayerEXT_remap_index },
+ { 25932, ProvokingVertexEXT_remap_index },
+ { 9461, GetTexParameterPointervAPPLE_remap_index },
+ { 4405, TextureRangeAPPLE_remap_index },
+ { 25247, StencilFuncSeparateATI_remap_index },
+ { 15768, ProgramEnvParameters4fvEXT_remap_index },
+ { 14986, ProgramLocalParameters4fvEXT_remap_index },
+ { 12317, 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 */
+ { 14884, _gloffset_ColorSubTable },
+ { 27957, _gloffset_CopyColorSubTable },
+ /* from GL_EXT_convolution */
+ { 213, _gloffset_ConvolutionFilter1D },
+ { 2284, _gloffset_CopyConvolutionFilter1D },
+ { 3624, _gloffset_GetConvolutionParameteriv },
+ { 7522, _gloffset_ConvolutionFilter2D },
+ { 7688, _gloffset_ConvolutionParameteriv },
+ { 8148, _gloffset_ConvolutionParameterfv },
+ { 18029, _gloffset_GetSeparableFilter },
+ { 21075, _gloffset_SeparableFilter2D },
+ { 21904, _gloffset_ConvolutionParameteri },
+ { 22027, _gloffset_ConvolutionParameterf },
+ { 23406, _gloffset_GetConvolutionParameterfv },
+ { 24228, _gloffset_GetConvolutionFilter },
+ { 26472, _gloffset_CopyConvolutionFilter2D },
+ /* from GL_EXT_copy_texture */
+ { 13142, _gloffset_CopyTexSubImage3D },
+ { 14624, _gloffset_CopyTexImage2D },
+ { 21512, _gloffset_CopyTexImage1D },
+ { 23909, _gloffset_CopyTexSubImage2D },
+ { 26110, _gloffset_CopyTexSubImage1D },
+ /* from GL_EXT_draw_range_elements */
+ { 8402, _gloffset_DrawRangeElements },
+ /* from GL_EXT_histogram */
+ { 812, _gloffset_Histogram },
+ { 3088, _gloffset_ResetHistogram },
+ { 8774, _gloffset_GetMinmax },
+ { 13476, _gloffset_GetHistogramParameterfv },
+ { 21437, _gloffset_GetMinmaxParameteriv },
+ { 23296, _gloffset_ResetMinmax },
+ { 24125, _gloffset_GetHistogramParameteriv },
+ { 25181, _gloffset_GetHistogram },
+ { 27543, _gloffset_Minmax },
+ { 29044, _gloffset_GetMinmaxParameterfv },
+ /* from GL_EXT_paletted_texture */
+ { 7384, _gloffset_ColorTable },
+ { 13322, _gloffset_GetColorTable },
+ { 20133, _gloffset_GetColorTableParameterfv },
+ { 22083, _gloffset_GetColorTableParameteriv },
+ /* from GL_EXT_subtexture */
+ { 6105, _gloffset_TexSubImage1D },
+ { 9388, _gloffset_TexSubImage2D },
+ /* from GL_EXT_texture3D */
+ { 1658, _gloffset_TexImage3D },
+ { 19902, _gloffset_TexSubImage3D },
+ /* from GL_EXT_texture_object */
+ { 2964, _gloffset_PrioritizeTextures },
+ { 6554, _gloffset_AreTexturesResident },
+ { 11841, _gloffset_GenTextures },
+ { 13808, _gloffset_DeleteTextures },
+ { 17059, _gloffset_IsTexture },
+ { 26175, _gloffset_BindTexture },
+ /* from GL_EXT_vertex_array */
+ { 21264, _gloffset_ArrayElement },
+ { 27131, _gloffset_GetPointerv },
+ { 28671, _gloffset_DrawArrays },
+ /* from GL_SGI_color_table */
+ { 6672, _gloffset_ColorTableParameteriv },
+ { 7384, _gloffset_ColorTable },
+ { 13322, _gloffset_GetColorTable },
+ { 13432, _gloffset_CopyColorTable },
+ { 16920, _gloffset_ColorTableParameterfv },
+ { 20133, _gloffset_GetColorTableParameterfv },
+ { 22083, _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 },
+ { 10864, _gloffset_MultiTexCoord3svARB },
+ { 10925, _gloffset_MultiTexCoord4iARB },
+ { 11612, _gloffset_MultiTexCoord3iARB },
+ { 12346, _gloffset_MultiTexCoord1dARB },
+ { 12512, _gloffset_MultiTexCoord3dvARB },
+ { 13676, _gloffset_MultiTexCoord3ivARB },
+ { 13721, _gloffset_MultiTexCoord2sARB },
+ { 14941, _gloffset_MultiTexCoord4ivARB },
+ { 16570, _gloffset_ClientActiveTextureARB },
+ { 18786, _gloffset_MultiTexCoord2dARB },
+ { 19161, _gloffset_MultiTexCoord4dvARB },
+ { 19447, _gloffset_MultiTexCoord4fvARB },
+ { 20274, _gloffset_MultiTexCoord3fARB },
+ { 22584, _gloffset_MultiTexCoord4dARB },
+ { 22788, _gloffset_MultiTexCoord1sARB },
+ { 22966, _gloffset_MultiTexCoord1dvARB },
+ { 23753, _gloffset_MultiTexCoord1ivARB },
+ { 23846, _gloffset_MultiTexCoord2ivARB },
+ { 24185, _gloffset_MultiTexCoord1iARB },
+ { 25456, _gloffset_MultiTexCoord4svARB },
+ { 25974, _gloffset_MultiTexCoord1fARB },
+ { 26237, _gloffset_MultiTexCoord4fARB },
+ { 28505, _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 */
+ { 11469, -1 }, /* MatrixIndexuivARB */
+ { 12634, -1 }, /* MatrixIndexPointerARB */
+ { 17308, -1 }, /* CurrentPaletteMatrixARB */
+ { 20018, -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 */
+ { 12103, -1 }, /* WeightfvARB */
+ { 15388, -1 }, /* WeightbvARB */
+ { 18454, -1 }, /* WeightusvARB */
+ { 21001, -1 }, /* VertexBlendARB */
+ { 26058, -1 }, /* WeightsvARB */
+ { 28007, -1 }, /* WeightdvARB */
+ { 28705, -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[] = {
+ { 14884, _gloffset_ColorSubTable },
+ { 27957, _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 },
+ { 18029, _gloffset_GetSeparableFilter },
+ { 21075, _gloffset_SeparableFilter2D },
+ { 21904, _gloffset_ConvolutionParameteri },
+ { 22027, _gloffset_ConvolutionParameterf },
+ { 23406, _gloffset_GetConvolutionParameterfv },
+ { 24228, _gloffset_GetConvolutionFilter },
+ { 26472, _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 */
+ { 10983, -1 }, /* Binormal3ivEXT */
+ { 11565, -1 }, /* Tangent3sEXT */
+ { 12699, -1 }, /* Tangent3fvEXT */
+ { 16320, -1 }, /* Tangent3dvEXT */
+ { 17006, -1 }, /* Binormal3bvEXT */
+ { 18082, -1 }, /* Binormal3dEXT */
+ { 19950, -1 }, /* Tangent3fEXT */
+ { 21976, -1 }, /* Binormal3sEXT */
+ { 22394, -1 }, /* Tangent3ivEXT */
+ { 22413, -1 }, /* Tangent3dEXT */
+ { 23193, -1 }, /* Binormal3svEXT */
+ { 23651, -1 }, /* Binormal3fEXT */
+ { 24503, -1 }, /* Binormal3dvEXT */
+ { 25678, -1 }, /* Tangent3iEXT */
+ { 26757, -1 }, /* Tangent3bvEXT */
+ { 27166, -1 }, /* Tangent3bEXT */
+ { 27730, -1 }, /* Binormal3fvEXT */
+ { 28404, -1 }, /* BinormalPointerEXT */
+ { 28809, -1 }, /* Tangent3svEXT */
+ { 29246, -1 }, /* Binormal3bEXT */
+ { 29423, -1 }, /* Binormal3iEXT */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_copy_texture)
+static const struct gl_function_remap GL_EXT_copy_texture_functions[] = {
+ { 13142, _gloffset_CopyTexSubImage3D },
+ { 14624, _gloffset_CopyTexImage2D },
+ { 21512, _gloffset_CopyTexImage1D },
+ { 23909, _gloffset_CopyTexSubImage2D },
+ { 26110, _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_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 },
+ { 13476, _gloffset_GetHistogramParameterfv },
+ { 21437, _gloffset_GetMinmaxParameteriv },
+ { 23296, _gloffset_ResetMinmax },
+ { 24125, _gloffset_GetHistogramParameteriv },
+ { 25181, _gloffset_GetHistogram },
+ { 27543, _gloffset_Minmax },
+ { 29044, _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[] = {
+ { 18541, -1 }, /* IndexMaterialEXT */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_light_texture)
+static const struct gl_function_remap GL_EXT_light_texture_functions[] = {
+ { 23213, -1 }, /* ApplyTextureEXT */
+ { 23250, -1 }, /* TextureMaterialEXT */
+ { 23275, -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 },
+ { 13322, _gloffset_GetColorTable },
+ { 20133, _gloffset_GetColorTableParameterfv },
+ { 22083, _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 */
+ { 19126, -1 }, /* PixelTransformParameterfEXT */
+ { 19206, -1 }, /* PixelTransformParameteriEXT */
+ { 28368, -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 },
+ { 19902, _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 },
+ { 11841, _gloffset_GenTextures },
+ { 13808, _gloffset_DeleteTextures },
+ { 17059, _gloffset_IsTexture },
+ { 26175, _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[] = {
+ { 12053, -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[] = {
+ { 21264, _gloffset_ArrayElement },
+ { 27131, _gloffset_GetPointerv },
+ { 28671, _gloffset_DrawArrays },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_vertex_weighting)
+static const struct gl_function_remap GL_EXT_vertex_weighting_functions[] = {
+ { 17089, -1 }, /* VertexWeightfvEXT */
+ { 23629, -1 }, /* VertexWeightfEXT */
+ { 25150, -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 */
+ { 10754, -1 }, /* GetImageTransformParameterivHP */
+ { 17153, -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 */
+ { 11672, -1 }, /* TexCoordPointerListIBM */
+ { 12075, -1 }, /* IndexPointerListIBM */
+ { 28987, -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[] = {
+ { 11095, -1 }, /* VertexPointervINTEL */
+ { 13569, -1 }, /* ColorPointervINTEL */
+ { 26446, -1 }, /* NormalPointervINTEL */
+ { 26872, -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 */
+ { 27324, -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 */
+ { 15058, -1 }, /* GetMapAttribParameterfvNV */
+ { 15224, -1 }, /* MapParameterivNV */
+ { 21827, -1 }, /* GetMapParameterivNV */
+ { 22325, -1 }, /* GetMapParameterfvNV */
+ { 25782, -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[] = {
+ { 13961, -1 }, /* CombinerStageParameterfvNV */
+ { 14276, -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[] = {
+ { 14249, -1 }, /* GetDetailTexFuncSGIS */
+ { 14569, -1 }, /* DetailTexFuncSGIS */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_fog_function)
+static const struct gl_function_remap GL_SGIS_fog_function_functions[] = {
+ { 23891, -1 }, /* FogFuncSGIS */
+ { 24556, -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 */
+ { 19421, -1 }, /* SharpenTexFuncSGIS */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_texture4D)
+static const struct gl_function_remap GL_SGIS_texture4D_functions[] = {
+ { 894, -1 }, /* TexImage4DSGIS */
+ { 13877, -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[] = {
+ { 13275, -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 */
+ { 14395, -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 */
+ { 19568, -1 }, /* DeleteAsyncMarkersSGIX */
+ { 19597, -1 }, /* IsAsyncMarkerSGIX */
+ { 28784, -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 */
+ { 16976, -1 }, /* FragmentLightModelfSGIX */
+ { 17276, -1 }, /* FragmentColorMaterialSGIX */
+ { 17648, -1 }, /* FragmentMaterialiSGIX */
+ { 18869, -1 }, /* LightEnviSGIX */
+ { 20225, -1 }, /* FragmentLightModelfvSGIX */
+ { 20534, -1 }, /* FragmentLightfvSGIX */
+ { 25032, -1 }, /* FragmentLightfSGIX */
+ { 27700, -1 }, /* GetFragmentLightfvSGIX */
+ { 29267, -1 }, /* FragmentMaterialivSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_framezoom)
+static const struct gl_function_remap GL_SGIX_framezoom_functions[] = {
+ { 19620, -1 }, /* FrameZoomSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_igloo_interface)
+static const struct gl_function_remap GL_SGIX_igloo_interface_functions[] = {
+ { 25340, -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 */
+ { 11306, -1 }, /* StartInstrumentsSGIX */
+ { 13995, -1 }, /* StopInstrumentsSGIX */
+ { 15601, -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 */
+ { 15516, -1 }, /* ListParameteriSGIX */
+ { 16270, -1 }, /* ListParameterfvSGIX */
+ { 18275, -1 }, /* ListParameterivSGIX */
+ { 28828, -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 */
+ { 14095, -1 }, /* DeformSGIX */
+ { 21376, -1 }, /* DeformationMap3fSGIX */
+ { 27588, -1 }, /* DeformationMap3dSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_reference_plane)
+static const struct gl_function_remap GL_SGIX_reference_plane_functions[] = {
+ { 12826, -1 }, /* ReferencePlaneSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_sprite)
+static const struct gl_function_remap GL_SGIX_sprite_functions[] = {
+ { 8487, -1 }, /* SpriteParameterfvSGIX */
+ { 18103, -1 }, /* SpriteParameteriSGIX */
+ { 23330, -1 }, /* SpriteParameterfSGIX */
+ { 25904, -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[] = {
+ { 18162, -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 },
+ { 13322, _gloffset_GetColorTable },
+ { 13432, _gloffset_CopyColorTable },
+ { 16920, _gloffset_ColorTableParameterfv },
+ { 20133, _gloffset_GetColorTableParameterfv },
+ { 22083, _gloffset_GetColorTableParameteriv },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SUNX_constant_data)
+static const struct gl_function_remap GL_SUNX_constant_data_functions[] = {
+ { 27678, -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 */
+ { 11585, -1 }, /* GlobalAlphaFactorfSUN */
+ { 11704, -1 }, /* GlobalAlphaFactorusSUN */
+ { 19859, -1 }, /* GlobalAlphaFactorsSUN */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SUN_mesh_array)
+static const struct gl_function_remap GL_SUN_mesh_array_functions[] = {
+ { 25716, -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 */
+ { 16641, -1 }, /* ReplacementCodeusvSUN */
+ { 16829, -1 }, /* ReplacementCodePointerSUN */
+ { 18186, -1 }, /* ReplacementCodeusSUN */
+ { 18933, -1 }, /* ReplacementCodeuiSUN */
+ { 26361, -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 */
+ { 11169, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */
+ { 12557, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */
+ { 12968, -1 }, /* TexCoord2fColor3fVertex3fSUN */
+ { 14020, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */
+ { 14354, -1 }, /* Color4ubVertex2fvSUN */
+ { 14594, -1 }, /* Normal3fVertex3fSUN */
+ { 15542, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */
+ { 15803, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 16470, -1 }, /* TexCoord2fVertex3fvSUN */
+ { 17246, -1 }, /* Color4ubVertex2fSUN */
+ { 17439, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */
+ { 19292, -1 }, /* TexCoord2fColor4ubVertex3fSUN */
+ { 19639, -1 }, /* Normal3fVertex3fvSUN */
+ { 20042, -1 }, /* Color4fNormal3fVertex3fSUN */
+ { 20908, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */
+ { 21128, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */
+ { 22831, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */
+ { 24007, -1 }, /* TexCoord4fVertex4fSUN */
+ { 24433, -1 }, /* TexCoord2fColor3fVertex3fvSUN */
+ { 24759, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */
+ { 24886, -1 }, /* TexCoord4fVertex4fvSUN */
+ { 25588, -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 },
+ { 10864, _gloffset_MultiTexCoord3svARB },
+ { 10925, _gloffset_MultiTexCoord4iARB },
+ { 11612, _gloffset_MultiTexCoord3iARB },
+ { 12346, _gloffset_MultiTexCoord1dARB },
+ { 12512, _gloffset_MultiTexCoord3dvARB },
+ { 13676, _gloffset_MultiTexCoord3ivARB },
+ { 13721, _gloffset_MultiTexCoord2sARB },
+ { 14941, _gloffset_MultiTexCoord4ivARB },
+ { 16570, _gloffset_ClientActiveTextureARB },
+ { 18786, _gloffset_MultiTexCoord2dARB },
+ { 19161, _gloffset_MultiTexCoord4dvARB },
+ { 19447, _gloffset_MultiTexCoord4fvARB },
+ { 20274, _gloffset_MultiTexCoord3fARB },
+ { 22584, _gloffset_MultiTexCoord4dARB },
+ { 22788, _gloffset_MultiTexCoord1sARB },
+ { 22966, _gloffset_MultiTexCoord1dvARB },
+ { 23753, _gloffset_MultiTexCoord1ivARB },
+ { 23846, _gloffset_MultiTexCoord2ivARB },
+ { 24185, _gloffset_MultiTexCoord1iARB },
+ { 25456, _gloffset_MultiTexCoord4svARB },
+ { 25974, _gloffset_MultiTexCoord1fARB },
+ { 26237, _gloffset_MultiTexCoord4fARB },
+ { 28505, _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 5bef7c84fb..3bb062bae2 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 bc76b91291..d0dc7e551c 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
+
/**
@@ -388,7 +394,6 @@ _mesa_read_shader(const char *fname)
int len;
if (!f) {
- _mesa_fprintf(stderr, "Unable to open shader file %s\n", fname);
return NULL;
}
@@ -401,16 +406,10 @@ _mesa_read_shader(const char *fname)
shader = _mesa_strdup(buffer);
free(buffer);
- if (0) {
- _mesa_fprintf(stderr, "Read shader %s:\n", fname);
- _mesa_fprintf(stderr, "%s\n", shader);
- }
-
return shader;
}
-
/**
* Called via glShaderSource() and glShaderSourceARB() API functions.
* Basically, concatenate the source code strings into one long string
@@ -424,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");
@@ -475,22 +475,35 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count,
source[totalLength - 1] = '\0';
source[totalLength - 2] = '\0';
-#if 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.
+ */
+ char filename[100];
GLcharARB *newSource;
- newSource = _mesa_read_shader("newshader.frag");
+ checksum = _mesa_str_checksum(source);
+
+ sprintf(filename, "newshader_%d", checksum);
+
+ newSource = _mesa_read_shader(filename);
if (newSource) {
+ _mesa_fprintf(stderr, "Mesa: Replacing shader %u chksum=%d with %s\n",
+ shaderObj, checksum, filename);
_mesa_free(source);
source = newSource;
}
- }
-#else
- (void) _mesa_read_shader;
-#endif
+ }
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/shared.c b/src/mesa/main/shared.c
index 643ad3354e..4d01e8abc6 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -37,9 +37,7 @@
#include "shared.h"
#include "shader/program.h"
#include "shader/shader_api.h"
-#if FEATURE_dlist
#include "dlist.h"
-#endif
#if FEATURE_ATI_fragment_shader
#include "shader/atifragshader.h"
#endif
@@ -143,11 +141,9 @@ _mesa_alloc_shared_state(GLcontext *ctx)
static void
delete_displaylist_cb(GLuint id, void *data, void *userData)
{
-#if FEATURE_dlist
struct gl_display_list *list = (struct gl_display_list *) data;
GLcontext *ctx = (GLcontext *) userData;
_mesa_delete_list(ctx, list);
-#endif
}
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 140a998df2..f10e6b04b7 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -40,9 +40,7 @@
#include "framebuffer.h"
#include "light.h"
#include "matrix.h"
-#if FEATURE_pixel_transfer
#include "pixel.h"
-#endif
#include "shader/program.h"
#include "shader/prog_parameter.h"
#include "state.h"
@@ -585,10 +583,8 @@ _mesa_update_state_locked( GLcontext *ctx )
if (new_state & (_NEW_STENCIL | _NEW_BUFFERS))
_mesa_update_stencil( ctx );
-#if FEATURE_pixel_transfer
if (new_state & _MESA_NEW_TRANSFER_STATE)
_mesa_update_pixel( ctx, new_state );
-#endif
if (new_state & _DD_NEW_SEPARATE_SPECULAR)
update_separate_specular( ctx );
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c
index 2cda4dd859..a4f1926ab3 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,252 +113,43 @@ _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
+ * Convert a compressed MESA_FORMAT_x to a GLenum.
*/
-GLuint
-_mesa_compressed_texture_size( GLcontext *ctx,
- GLsizei width, GLsizei height, GLsizei depth,
- GLuint mesaFormat )
+gl_format
+_mesa_glenum_to_compressed_format(GLenum format)
{
- 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.
- */
-GLuint
-_mesa_compressed_texture_size_glenum(GLcontext *ctx,
- GLsizei width, GLsizei height,
- GLsizei depth, GLenum glformat)
-{
- 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
- default:
- return 0;
- }
-
- 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
- */
-GLint
-_mesa_compressed_row_stride(GLuint mesaFormat, GLsizei width)
-{
- GLint stride;
-
- switch (mesaFormat) {
-#if FEATURE_texture_fxt1
- case MESA_FORMAT_RGB_FXT1:
- case MESA_FORMAT_RGBA_FXT1:
- stride = ((width + 7) / 8) * 16; /* 16 bytes per 8x4 tile */
- 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
- stride = ((width + 3) / 4) * 8; /* 8 bytes per 4x4 tile */
- 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
- stride = ((width + 3) / 4) * 16; /* 16 bytes per 4x4 tile */
- break;
-#endif
- default:
- _mesa_problem(NULL, "bad mesaFormat in _mesa_compressed_row_stride");
- return 0;
- }
-
- return stride;
-}
-
+ return MESA_FORMAT_SRGBA_DXT5;
-/*
- * Return the address of the pixel at (col, row, img) in a
- * compressed texture image.
- * \param col, row, img - image position (3D)
- * \param format - compressed image format
- * \param width - image width
- * \param image - the image address
- * \return address of pixel at (row, col)
- */
-GLubyte *
-_mesa_compressed_image_address(GLint col, GLint row, GLint img,
- GLuint mesaFormat,
- GLsizei width, const GLubyte *image)
-{
- GLubyte *addr;
-
- (void) img;
-
- /* 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);
- */
-
- 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;
+ return MESA_FORMAT_NONE;
}
-
- return addr;
}
@@ -410,3 +201,33 @@ _mesa_compressed_format_to_glenum(GLcontext *ctx, GLuint mesaFormat)
}
+/*
+ * Return the address of the pixel at (col, row, img) in a
+ * compressed texture image.
+ * \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 (stride) in pixels
+ * \param image - the image address
+ * \return address of pixel at (row, col, img)
+ */
+GLubyte *
+_mesa_compressed_image_address(GLint col, GLint row, GLint img,
+ gl_format mesaFormat,
+ GLsizei width, const GLubyte *image)
+{
+ /* XXX only 2D images implemented, not 3D */
+ const GLuint blockSize = _mesa_get_format_bytes(mesaFormat);
+ GLuint bw, bh;
+ GLint offset;
+
+ _mesa_get_format_block_size(mesaFormat, &bw, &bh);
+
+ ASSERT(col % bw == 0);
+ ASSERT(row % bh == 0);
+
+ offset = ((width + bw - 1) / bw) * (row / bh) + col / bw;
+ offset *= blockSize;
+
+ return (GLubyte *) image + offset;
+}
diff --git a/src/mesa/main/texcompress.h b/src/mesa/main/texcompress.h
index 0f1a38f88e..5e73a3149b 100644
--- a/src/mesa/main/texcompress.h
+++ b/src/mesa/main/texcompress.h
@@ -26,50 +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 GLenum
-_mesa_compressed_format_to_glenum(GLcontext *ctx, GLuint mesaFormat);
-
-
-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 fc151605c9..85becb80d2 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 0000000000..d63ca71e21
--- /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 a1c0f18f36..b271a539a7 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 0000000000..2e7688d366
--- /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/texfetch.c b/src/mesa/main/texfetch.c
new file mode 100644
index 0000000000..314ccb7b65
--- /dev/null
+++ b/src/mesa/main/texfetch.c
@@ -0,0 +1,672 @@
+/*
+ * 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_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_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;
+ 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 0000000000..ef13bf27fe
--- /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 eb160deff9..27434946ec 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,30 @@ 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_RGB888 ********************************************************/
/* Fetch texel from 1D, 2D or 3D rgb888 texture, return 4 GLchans */
@@ -787,30 +663,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 ******************************************************/
@@ -1161,8 +1013,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 +1122,6 @@ static void store_texel_sla8(struct gl_texture_image *texImage,
}
#endif
-#endif /* FEATURE_EXT_texture_sRGB */
-
/* MESA_FORMAT_DUDV8 ********************************************************/
@@ -1424,7 +1272,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 +1299,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 9d5534e396..39c561e278 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,9 +107,8 @@ _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:
@@ -1542,17 +118,15 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat,
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_AL88;
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 +135,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 +146,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 +156,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_s3tc
if (ctx->Extensions.EXT_texture_compression_s3tc ||
ctx->Extensions.S3_s3tc)
- return &_mesa_texformat_rgb_dxt1;
-#endif
-#if FEATURE_texture_fxt1
+ return MESA_FORMAT_RGB_DXT1;
if (ctx->Extensions.TDFX_texture_compression_FXT1)
- return &_mesa_texformat_rgb_fxt1;
-#endif
- return &_mesa_texformat_rgb;
+ return MESA_FORMAT_RGB_FXT1;
+ return MESA_FORMAT_RGB888;
case GL_COMPRESSED_RGBA_ARB:
-#if FEATURE_texture_s3tc
if (ctx->Extensions.EXT_texture_compression_s3tc ||
ctx->Extensions.S3_s3tc)
- return &_mesa_texformat_rgba_dxt5; /* Not rgba_dxt1, see spec */
-#endif
-#if FEATURE_texture_fxt1
+ return MESA_FORMAT_RGBA_DXT3; /* Not rgba_dxt1, see spec */
if (ctx->Extensions.TDFX_texture_compression_FXT1)
- return &_mesa_texformat_rgba_fxt1;
-#endif
- return &_mesa_texformat_rgba;
+ return MESA_FORMAT_RGBA_FXT1;
+ return MESA_FORMAT_RGBA8888;
default:
; /* fallthrough */
}
@@ -1618,9 +184,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 +194,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 +207,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 +223,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 +236,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 +268,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 +278,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 +288,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 +300,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 +351,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 5aa1d756cb..bda5fd6d8c 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 e3feb024c3..733e129fcf 100644
--- a/src/mesa/main/texgen.c
+++ b/src/mesa/main/texgen.c
@@ -35,7 +35,12 @@
#include "main/enums.h"
#include "main/macros.h"
#include "main/texgen.h"
+#include "main/texstate.h"
#include "math/m_matrix.h"
+#include "glapi/dispatch.h"
+
+
+#if FEATURE_texgen
/**
@@ -79,7 +84,7 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )
return;
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texUnit = _mesa_get_current_tex_unit(ctx);
texgen = get_texgen(texUnit, coord);
if (!texgen) {
@@ -161,7 +166,7 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_TexGeniv(GLenum coord, GLenum pname, const GLint *params )
{
GLfloat p[4];
@@ -178,7 +183,7 @@ _mesa_TexGeniv(GLenum coord, GLenum pname, const GLint *params )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_TexGend(GLenum coord, GLenum pname, GLdouble param )
{
GLfloat p = (GLfloat) param;
@@ -186,7 +191,7 @@ _mesa_TexGend(GLenum coord, GLenum pname, GLdouble param )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params )
{
GLfloat p[4];
@@ -203,7 +208,7 @@ _mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params )
}
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param )
{
_mesa_TexGenfv(coord, pname, &param);
@@ -218,7 +223,7 @@ _mesa_TexGeni( GLenum coord, GLenum pname, GLint param )
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params )
{
struct gl_texture_unit *texUnit;
@@ -231,7 +236,7 @@ _mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params )
return;
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texUnit = _mesa_get_current_tex_unit(ctx);
texgen = get_texgen(texUnit, coord);
if (!texgen) {
@@ -256,7 +261,7 @@ _mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params )
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params )
{
struct gl_texture_unit *texUnit;
@@ -269,7 +274,7 @@ _mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params )
return;
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texUnit = _mesa_get_current_tex_unit(ctx);
texgen = get_texgen(texUnit, coord);
if (!texgen) {
@@ -294,7 +299,7 @@ _mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params )
-void GLAPIENTRY
+static void GLAPIENTRY
_mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params )
{
struct gl_texture_unit *texUnit;
@@ -307,7 +312,7 @@ _mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params )
return;
}
- texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texUnit = _mesa_get_current_tex_unit(ctx);
texgen = get_texgen(texUnit, coord);
if (!texgen) {
@@ -337,3 +342,19 @@ _mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params )
}
+void
+_mesa_init_texgen_dispatch(struct _glapi_table *disp)
+{
+ SET_GetTexGendv(disp, _mesa_GetTexGendv);
+ SET_GetTexGenfv(disp, _mesa_GetTexGenfv);
+ SET_GetTexGeniv(disp, _mesa_GetTexGeniv);
+ SET_TexGend(disp, _mesa_TexGend);
+ SET_TexGendv(disp, _mesa_TexGendv);
+ SET_TexGenf(disp, _mesa_TexGenf);
+ SET_TexGenfv(disp, _mesa_TexGenfv);
+ SET_TexGeni(disp, _mesa_TexGeni);
+ SET_TexGeniv(disp, _mesa_TexGeniv);
+}
+
+
+#endif /* FEATURE_texgen */
diff --git a/src/mesa/main/texgen.h b/src/mesa/main/texgen.h
index 073588efcd..f6924ef722 100644
--- a/src/mesa/main/texgen.h
+++ b/src/mesa/main/texgen.h
@@ -27,36 +27,45 @@
#define TEXGEN_H
-#include "main/glheader.h"
+#include "main/mtypes.h"
-extern void GLAPIENTRY
-_mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params );
+#if FEATURE_texgen
-extern void GLAPIENTRY
-_mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params );
+#define _MESA_INIT_TEXGEN_FUNCTIONS(driver, impl) \
+ do { \
+ (driver)->TexGen = impl ## TexGen; \
+ } while (0)
extern void GLAPIENTRY
-_mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params );
+_mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
extern void GLAPIENTRY
-_mesa_TexGend( GLenum coord, GLenum pname, GLdouble param );
+_mesa_TexGeni( GLenum coord, GLenum pname, GLint param );
-extern void GLAPIENTRY
-_mesa_TexGendv( GLenum coord, GLenum pname, const GLdouble *params );
+extern void
+_mesa_init_texgen_dispatch(struct _glapi_table *disp);
-extern void GLAPIENTRY
-_mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param );
+#else /* FEATURE_texgen */
-extern void GLAPIENTRY
-_mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params );
+#define _MESA_INIT_TEXGEN_FUNCTIONS(driver, impl) do { } while (0)
-extern void GLAPIENTRY
-_mesa_TexGeni( GLenum coord, GLenum pname, GLint param );
+static void
+_mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )
+{
+}
-extern void GLAPIENTRY
-_mesa_TexGeniv( GLenum coord, GLenum pname, const GLint *params );
+static void INLINE
+_mesa_TexGeni( GLenum coord, GLenum pname, GLint param )
+{
+}
+
+static INLINE void
+_mesa_init_texgen_dispatch(struct _glapi_table *disp)
+{
+}
+#endif /* FEATURE_texgen */
#endif /* TEXGEN_H */
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 14d6fc7659..2f88718933 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,37 +521,24 @@ _mesa_get_compressed_teximage(GLcontext *ctx, GLenum target, GLint level,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
{
- GLuint size;
+ const GLuint size = _mesa_format_image_size(texImage->TexFormat,
+ texImage->Width,
+ texImage->Height,
+ texImage->Depth);
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);
/* just memcpy, no pixelstore or pixel transfer */
_mesa_memcpy(img, texImage->Data, size);
@@ -368,10 +559,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 +612,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 +624,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 +671,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 +701,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 +710,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 +736,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 a8160c2735..b10076875b 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -33,9 +33,7 @@
#include "glheader.h"
#include "bufferobj.h"
#include "context.h"
-#if FEATURE_convolve
#include "convolve.h"
-#endif
#include "enums.h"
#include "fbobject.h"
#include "framebuffer.h"
@@ -45,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"
@@ -84,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.
@@ -642,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.
@@ -902,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;
}
@@ -969,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)))
@@ -1004,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;
}
@@ -1317,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;
}
@@ -1530,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,
@@ -1577,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;
}
}
@@ -1953,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);
@@ -2076,6 +2025,23 @@ update_fbo_texture(GLcontext *ctx, struct gl_texture_object *texObj,
}
+/**
+ * If the texture object's GenerateMipmap flag is set and we've
+ * changed the texture base level image, regenerate the rest of the
+ * mipmap levels now.
+ */
+static INLINE void
+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) {
+ ASSERT(ctx->Driver.GenerateMipmap);
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
+ }
+}
+
+
/** Debug helper: override the user-requested internal format */
static GLenum
override_internal_format(GLenum internalFormat, GLint width, GLint height)
@@ -2149,7 +2115,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);
@@ -2162,43 +2127,50 @@ _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);
if (!texImage) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D");
- goto out;
- }
-
- if (texImage->Data) {
- ctx->Driver.FreeTexImageData( ctx, texImage );
}
+ else {
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
+
+ ASSERT(texImage->Data == NULL);
+
+ clear_teximage_fields(texImage); /* not really needed, but helpful */
+ _mesa_init_teximage_fields(ctx, target, texImage,
+ 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,
+ width, border, format, type, pixels,
+ &ctx->Unpack, texObj, texImage);
+
+ ASSERT(texImage->TexFormat);
+
+ _mesa_set_fetch_functions(texImage, 1);
+
+ check_gen_mipmap(ctx, target, texObj, level);
+
+ update_fbo_texture(ctx, texObj, face, level);
- ASSERT(texImage->Data == NULL);
-
- clear_teximage_fields(texImage); /* not really needed, but helpful */
- _mesa_init_teximage_fields(ctx, target, texImage,
- postConvWidth, 1, 1,
- border, internalFormat);
-
- ASSERT(ctx->Driver.TexImage1D);
-
- /* Give the texture to the driver! <pixels> may be null! */
- (*ctx->Driver.TexImage1D)(ctx, target, level, internalFormat,
- width, border, format, type, pixels,
- &ctx->Unpack, texObj, texImage);
-
- ASSERT(texImage->TexFormat);
-
- update_fbo_texture(ctx, texObj, face, level);
-
- /* state update */
- texObj->_Complete = GL_FALSE;
- ctx->NewState |= _NEW_TEXTURE;
- }
- out:
+ /* state update */
+ texObj->_Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ }
_mesa_unlock_texture(ctx, texObj);
}
else if (target == GL_PROXY_TEXTURE_1D) {
@@ -2217,8 +2189,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 {
@@ -2263,7 +2235,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);
@@ -2277,42 +2248,49 @@ _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);
if (!texImage) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D");
- goto out;
- }
-
- if (texImage->Data) {
- ctx->Driver.FreeTexImageData( ctx, texImage );
}
-
- ASSERT(texImage->Data == NULL);
- clear_teximage_fields(texImage); /* not really needed, but helpful */
- _mesa_init_teximage_fields(ctx, target, texImage,
- postConvWidth, postConvHeight, 1,
- border, internalFormat);
-
- ASSERT(ctx->Driver.TexImage2D);
-
- /* Give the texture to the driver! <pixels> may be null! */
- (*ctx->Driver.TexImage2D)(ctx, target, level, internalFormat,
- width, height, border, format, type, pixels,
- &ctx->Unpack, texObj, texImage);
-
- ASSERT(texImage->TexFormat);
-
- update_fbo_texture(ctx, texObj, face, level);
-
- /* state update */
- texObj->_Complete = GL_FALSE;
- ctx->NewState |= _NEW_TEXTURE;
- }
- out:
+ else {
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
+
+ ASSERT(texImage->Data == NULL);
+ clear_teximage_fields(texImage); /* not really needed, but helpful */
+ _mesa_init_teximage_fields(ctx, target, texImage,
+ 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,
+ width, height, border, format, type,
+ pixels, &ctx->Unpack, texObj, texImage);
+
+ ASSERT(texImage->TexFormat);
+
+ _mesa_set_fetch_functions(texImage, 2);
+
+ check_gen_mipmap(ctx, target, texObj, level);
+
+ update_fbo_texture(ctx, texObj, face, level);
+
+ /* state update */
+ texObj->_Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ }
_mesa_unlock_texture(ctx, texObj);
}
else if (target == GL_PROXY_TEXTURE_2D ||
@@ -2337,8 +2315,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 {
@@ -2374,7 +2352,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);
@@ -2387,42 +2364,49 @@ _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);
if (!texImage) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D");
- goto out;
}
-
- if (texImage->Data) {
- ctx->Driver.FreeTexImageData( ctx, texImage );
- }
-
- ASSERT(texImage->Data == NULL);
- clear_teximage_fields(texImage); /* not really needed, but helpful */
- _mesa_init_teximage_fields(ctx, target, texImage,
- width, height, depth,
- border, internalFormat);
+ else {
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
+
+ ASSERT(texImage->Data == NULL);
+ clear_teximage_fields(texImage); /* not really needed, but helpful */
+ _mesa_init_teximage_fields(ctx, target, texImage,
+ width, height, depth,
+ border, internalFormat);
+
+ /* Choose actual texture format */
+ texImage->TexFormat =
+ ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
+ format, type);
+ ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
- ASSERT(ctx->Driver.TexImage3D);
+ /* Give the texture to the driver. <pixels> may be null. */
+ ASSERT(ctx->Driver.TexImage3D);
+ ctx->Driver.TexImage3D(ctx, target, level, internalFormat,
+ width, height, depth, border, format, type,
+ pixels, &ctx->Unpack, texObj, texImage);
- /* Give the texture to the driver! <pixels> may be null! */
- (*ctx->Driver.TexImage3D)(ctx, target, level, internalFormat,
- width, height, depth, border, format, type,
- pixels, &ctx->Unpack, texObj, texImage);
+ ASSERT(texImage->TexFormat);
- ASSERT(texImage->TexFormat);
+ _mesa_set_fetch_functions(texImage, 3);
- update_fbo_texture(ctx, texObj, face, level);
+ check_gen_mipmap(ctx, target, texObj, level);
- /* state update */
- texObj->_Complete = GL_FALSE;
- ctx->NewState |= _NEW_TEXTURE;
+ update_fbo_texture(ctx, texObj, face, level);
+
+ /* state update */
+ texObj->_Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
}
- out:
_mesa_unlock_texture(ctx, texObj);
}
else if (target == GL_PROXY_TEXTURE_3D ||
@@ -2441,8 +2425,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 {
@@ -2471,9 +2455,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);
@@ -2499,8 +2482,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);
@@ -2508,23 +2490,24 @@ _mesa_TexSubImage1D( GLenum target, GLint level,
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
if (subtexture_error_check2(ctx, 1, target, level, xoffset, 0, 0,
- postConvWidth, 1, 1, format, type, texImage)) {
- goto out; /* error was detected */
+ postConvWidth, 1, 1,
+ format, type, texImage)) {
+ /* error was recorded */
}
+ else if (width > 0) {
+ /* If we have a border, xoffset=-1 is legal. Bias by border width */
+ xoffset += texImage->Border;
- if (width == 0)
- goto out; /* no-op, not an error */
+ ASSERT(ctx->Driver.TexSubImage1D);
+ ctx->Driver.TexSubImage1D(ctx, target, level, xoffset, width,
+ format, type, pixels, &ctx->Unpack,
+ texObj, texImage);
- /* If we have a border, xoffset=-1 is legal. Bias by border width */
- xoffset += texImage->Border;
+ check_gen_mipmap(ctx, target, texObj, level);
- ASSERT(ctx->Driver.TexSubImage1D);
- (*ctx->Driver.TexSubImage1D)(ctx, target, level, xoffset, width,
- format, type, pixels, &ctx->Unpack,
- texObj, texImage);
- ctx->NewState |= _NEW_TEXTURE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
}
- out:
_mesa_unlock_texture(ctx, texObj);
}
@@ -2537,7 +2520,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);
@@ -2566,32 +2548,32 @@ _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);
{
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
if (subtexture_error_check2(ctx, 2, target, level, xoffset, yoffset, 0,
- postConvWidth, postConvHeight, 1, format, type,
- texImage)) {
- goto out; /* error was detected */
+ postConvWidth, postConvHeight, 1,
+ format, type, texImage)) {
+ /* error was recorded */
}
+ else if (width > 0 && height >= 0) {
+ /* If we have a border, xoffset=-1 is legal. Bias by border width */
+ xoffset += texImage->Border;
+ yoffset += texImage->Border;
- if (width == 0 || height == 0)
- goto out; /* no-op, not an error */
+ ASSERT(ctx->Driver.TexSubImage2D);
+ ctx->Driver.TexSubImage2D(ctx, target, level, xoffset, yoffset,
+ width, height, format, type, pixels,
+ &ctx->Unpack, texObj, texImage);
- /* If we have a border, xoffset=-1 is legal. Bias by border width */
- xoffset += texImage->Border;
- yoffset += texImage->Border;
-
- ASSERT(ctx->Driver.TexSubImage2D);
- (*ctx->Driver.TexSubImage2D)(ctx, target, level, xoffset, yoffset,
- width, height, format, type, pixels,
- &ctx->Unpack, texObj, texImage);
- ctx->NewState |= _NEW_TEXTURE;
+ check_gen_mipmap(ctx, target, texObj, level);
+
+ ctx->NewState |= _NEW_TEXTURE;
+ }
}
- out:
_mesa_unlock_texture(ctx, texObj);
}
@@ -2604,7 +2586,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);
@@ -2625,35 +2606,36 @@ _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);
{
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
- if (subtexture_error_check2(ctx, 3, target, level, xoffset, yoffset, zoffset,
- width, height, depth, format, type, texImage)) {
- goto out; /* error was detected */
+ if (subtexture_error_check2(ctx, 3, target, level,
+ xoffset, yoffset, zoffset,
+ width, height, depth,
+ format, type, texImage)) {
+ /* error was recorded */
}
+ else if (width > 0 && height > 0 && height > 0) {
+ /* If we have a border, xoffset=-1 is legal. Bias by border width */
+ xoffset += texImage->Border;
+ yoffset += texImage->Border;
+ zoffset += texImage->Border;
- if (width == 0 || height == 0 || height == 0)
- goto out; /* no-op, not an error */
+ ASSERT(ctx->Driver.TexSubImage3D);
+ ctx->Driver.TexSubImage3D(ctx, target, level,
+ xoffset, yoffset, zoffset,
+ width, height, depth,
+ format, type, pixels,
+ &ctx->Unpack, texObj, texImage );
- /* If we have a border, xoffset=-1 is legal. Bias by border width */
- xoffset += texImage->Border;
- yoffset += texImage->Border;
- zoffset += texImage->Border;
+ check_gen_mipmap(ctx, target, texObj, level);
- ASSERT(ctx->Driver.TexSubImage3D);
- (*ctx->Driver.TexSubImage3D)(ctx, target, level,
- xoffset, yoffset, zoffset,
- width, height, depth,
- format, type, pixels,
- &ctx->Unpack, texObj, texImage );
- ctx->NewState |= _NEW_TEXTURE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
}
- out:
_mesa_unlock_texture(ctx, texObj);
}
@@ -2665,7 +2647,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;
@@ -2692,40 +2673,48 @@ _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);
{
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
if (!texImage) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage1D");
- goto out;
}
+ else {
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
- if (texImage->Data) {
- ctx->Driver.FreeTexImageData( ctx, texImage );
- }
-
- ASSERT(texImage->Data == NULL);
+ ASSERT(texImage->Data == NULL);
+
+ clear_teximage_fields(texImage); /* not really needed, but helpful */
+ _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);
- clear_teximage_fields(texImage); /* not really needed, but helpful */
- _mesa_init_teximage_fields(ctx, target, texImage, postConvWidth, 1, 1,
- border, internalFormat);
+ ASSERT(ctx->Driver.CopyTexImage1D);
+ ctx->Driver.CopyTexImage1D(ctx, target, level, internalFormat,
+ x, y, width, border);
+ ASSERT(texImage->TexFormat);
- ASSERT(ctx->Driver.CopyTexImage1D);
- (*ctx->Driver.CopyTexImage1D)(ctx, target, level, internalFormat,
- x, y, width, border);
+ _mesa_set_fetch_functions(texImage, 1);
- ASSERT(texImage->TexFormat);
+ check_gen_mipmap(ctx, target, texObj, level);
- update_fbo_texture(ctx, texObj, face, level);
+ update_fbo_texture(ctx, texObj, face, level);
- /* state update */
- texObj->_Complete = GL_FALSE;
- ctx->NewState |= _NEW_TEXTURE;
+ /* state update */
+ texObj->_Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
}
- out:
_mesa_unlock_texture(ctx, texObj);
}
@@ -2736,7 +2725,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;
@@ -2764,8 +2752,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);
{
@@ -2773,33 +2760,42 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
if (!texImage) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage2D");
- goto out;
- }
-
- if (texImage->Data) {
- ctx->Driver.FreeTexImageData( ctx, texImage );
}
-
- ASSERT(texImage->Data == NULL);
+ else {
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
+
+ ASSERT(texImage->Data == NULL);
+
+ clear_teximage_fields(texImage); /* not really needed, but helpful */
+ _mesa_init_teximage_fields(ctx, target, texImage,
+ 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);
- clear_teximage_fields(texImage); /* not really needed, but helpful */
- _mesa_init_teximage_fields(ctx, target, texImage,
- postConvWidth, postConvHeight, 1,
- border, internalFormat);
-
- ASSERT(ctx->Driver.CopyTexImage2D);
- (*ctx->Driver.CopyTexImage2D)(ctx, target, level, internalFormat,
- x, y, width, height, border);
-
- ASSERT(texImage->TexFormat);
+ ASSERT(texImage->TexFormat);
- update_fbo_texture(ctx, texObj, face, level);
+ _mesa_set_fetch_functions(texImage, 2);
- /* state update */
- texObj->_Complete = GL_FALSE;
- ctx->NewState |= _NEW_TEXTURE;
+ check_gen_mipmap(ctx, target, texObj, level);
+
+ update_fbo_texture(ctx, texObj, face, level);
+
+ /* state update */
+ texObj->_Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
}
- out:
_mesa_unlock_texture(ctx, texObj);
}
@@ -2808,7 +2804,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;
@@ -2829,8 +2824,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);
{
@@ -2844,23 +2838,25 @@ _mesa_CopyTexSubImage1D( GLenum target, GLint level,
if (copytexsubimage_error_check2(ctx, 1, target, level,
xoffset, 0, 0, postConvWidth, 1,
- texImage))
- goto out;
-
+ texImage)) {
+ /* error was recorded */
+ }
+ else {
+ /* If we have a border, xoffset=-1 is legal. Bias by border width */
+ xoffset += texImage->Border;
- /* If we have a border, xoffset=-1 is legal. Bias by border width */
- xoffset += texImage->Border;
+ if (_mesa_clip_copytexsubimage(ctx, &xoffset, &yoffset, &x, &y,
+ &width, &height)) {
+ ASSERT(ctx->Driver.CopyTexSubImage1D);
+ ctx->Driver.CopyTexSubImage1D(ctx, target, level,
+ xoffset, x, y, width);
- if (_mesa_clip_copytexsubimage(ctx, &xoffset, &yoffset, &x, &y,
- &width, &height)) {
- ASSERT(ctx->Driver.CopyTexSubImage1D);
- ctx->Driver.CopyTexSubImage1D(ctx, target, level,
- xoffset, x, y, width);
- }
+ check_gen_mipmap(ctx, target, texObj, level);
- ctx->NewState |= _NEW_TEXTURE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ }
}
- out:
_mesa_unlock_texture(ctx, texObj);
}
@@ -2871,7 +2867,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;
@@ -2889,8 +2884,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);
{
@@ -2903,24 +2897,29 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level,
}
#endif
- if (copytexsubimage_error_check2(ctx, 2, target, level, xoffset, yoffset, 0,
- postConvWidth, postConvHeight, texImage))
- goto out;
+ if (copytexsubimage_error_check2(ctx, 2, target, level,
+ xoffset, yoffset, 0,
+ postConvWidth, postConvHeight,
+ texImage)) {
+ /* error was recorded */
+ }
+ else {
+ /* If we have a border, xoffset=-1 is legal. Bias by border width */
+ xoffset += texImage->Border;
+ yoffset += texImage->Border;
- /* If we have a border, xoffset=-1 is legal. Bias by border width */
- xoffset += texImage->Border;
- yoffset += texImage->Border;
+ if (_mesa_clip_copytexsubimage(ctx, &xoffset, &yoffset, &x, &y,
+ &width, &height)) {
+ ASSERT(ctx->Driver.CopyTexSubImage2D);
+ ctx->Driver.CopyTexSubImage2D(ctx, target, level, xoffset, yoffset,
+ x, y, width, height);
- if (_mesa_clip_copytexsubimage(ctx, &xoffset, &yoffset, &x, &y,
- &width, &height)) {
- ASSERT(ctx->Driver.CopyTexSubImage2D);
- ctx->Driver.CopyTexSubImage2D(ctx, target, level,
- xoffset, yoffset, x, y, width, height);
- }
+ check_gen_mipmap(ctx, target, texObj, level);
- ctx->NewState |= _NEW_TEXTURE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ }
}
- out:
_mesa_unlock_texture(ctx, texObj);
}
@@ -2931,7 +2930,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;
@@ -2949,8 +2947,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);
{
@@ -2965,25 +2962,28 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
if (copytexsubimage_error_check2(ctx, 3, target, level, xoffset, yoffset,
zoffset, postConvWidth, postConvHeight,
- texImage))
- goto out;
-
- /* If we have a border, xoffset=-1 is legal. Bias by border width */
- xoffset += texImage->Border;
- yoffset += texImage->Border;
- zoffset += texImage->Border;
-
- if (_mesa_clip_copytexsubimage(ctx, &xoffset, &yoffset, &x, &y,
- &width, &height)) {
- ASSERT(ctx->Driver.CopyTexSubImage3D);
- ctx->Driver.CopyTexSubImage3D(ctx, target, level,
- xoffset, yoffset, zoffset,
- x, y, width, height);
+ texImage)) {
+ /* error was recored */
}
+ else {
+ /* If we have a border, xoffset=-1 is legal. Bias by border width */
+ xoffset += texImage->Border;
+ yoffset += texImage->Border;
+ zoffset += texImage->Border;
+
+ if (_mesa_clip_copytexsubimage(ctx, &xoffset, &yoffset, &x, &y,
+ &width, &height)) {
+ ASSERT(ctx->Driver.CopyTexSubImage3D);
+ ctx->Driver.CopyTexSubImage3D(ctx, target, level,
+ xoffset, yoffset, zoffset,
+ x, y, width, height);
+
+ check_gen_mipmap(ctx, target, texObj, level);
- ctx->NewState |= _NEW_TEXTURE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ }
}
- out:
_mesa_unlock_texture(ctx, texObj);
}
@@ -2996,6 +2996,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.
*/
@@ -3077,8 +3100,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;
@@ -3111,6 +3133,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) {
@@ -3160,20 +3183,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;
@@ -3181,6 +3205,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,
@@ -3199,7 +3272,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,
@@ -3209,36 +3281,44 @@ _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);
{
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
if (!texImage) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage1D");
- goto out;
- }
-
- if (texImage->Data) {
- ctx->Driver.FreeTexImageData( ctx, texImage );
}
- ASSERT(texImage->Data == NULL);
+ else {
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
+ ASSERT(texImage->Data == NULL);
+
+ _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);
- _mesa_init_teximage_fields(ctx, target, texImage, width, 1, 1,
- border, internalFormat);
+ ASSERT(ctx->Driver.CompressedTexImage1D);
+ ctx->Driver.CompressedTexImage1D(ctx, target, level,
+ internalFormat, width, border,
+ imageSize, data,
+ texObj, texImage);
- ASSERT(ctx->Driver.CompressedTexImage1D);
- (*ctx->Driver.CompressedTexImage1D)(ctx, target, level,
- internalFormat, width, border,
- imageSize, data,
- texObj, texImage);
+ _mesa_set_fetch_functions(texImage, 1);
- /* state update */
- texObj->_Complete = GL_FALSE;
- ctx->NewState |= _NEW_TEXTURE;
+ check_gen_mipmap(ctx, target, texObj, level);
+
+ /* state update */
+ texObj->_Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
}
- out:
_mesa_unlock_texture(ctx, texObj);
}
else if (target == GL_PROXY_TEXTURE_1D) {
@@ -3260,11 +3340,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);
{
@@ -3302,9 +3381,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) {
@@ -3312,36 +3391,44 @@ _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);
{
texImage = _mesa_get_tex_image(ctx, texObj, target, level);
if (!texImage) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2D");
- goto out;
}
-
- if (texImage->Data) {
- ctx->Driver.FreeTexImageData( ctx, texImage );
- }
- ASSERT(texImage->Data == NULL);
-
- _mesa_init_teximage_fields(ctx, target, texImage, width, height, 1,
- border, internalFormat);
-
- ASSERT(ctx->Driver.CompressedTexImage2D);
- (*ctx->Driver.CompressedTexImage2D)(ctx, target, level,
- internalFormat, width, height,
- border, imageSize, data,
- texObj, texImage);
-
- /* state update */
- texObj->_Complete = GL_FALSE;
- ctx->NewState |= _NEW_TEXTURE;
- }
- out:
+ else {
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
+ ASSERT(texImage->Data == NULL);
+
+ _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 */
+ texObj->_Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ }
_mesa_unlock_texture(ctx, texObj);
}
else if (target == GL_PROXY_TEXTURE_2D ||
@@ -3365,11 +3452,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);
{
@@ -3404,7 +3490,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,
@@ -3414,36 +3499,46 @@ _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);
if (!texImage) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage3D");
- goto out;
- }
-
- if (texImage->Data) {
- ctx->Driver.FreeTexImageData( ctx, texImage );
}
- ASSERT(texImage->Data == NULL);
-
- _mesa_init_teximage_fields(ctx, target, texImage, width, height, depth,
- border, internalFormat);
-
- ASSERT(ctx->Driver.CompressedTexImage3D);
- (*ctx->Driver.CompressedTexImage3D)(ctx, target, level,
- internalFormat,
- width, height, depth,
- border, imageSize, data,
- texObj, texImage);
-
- /* state update */
- texObj->_Complete = GL_FALSE;
- ctx->NewState |= _NEW_TEXTURE;
- }
- out:
+ else {
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
+ ASSERT(texImage->Data == NULL);
+
+ _mesa_init_teximage_fields(ctx, target, texImage,
+ 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,
+ width, height, depth,
+ border, imageSize, data,
+ texObj, texImage);
+
+ _mesa_set_fetch_functions(texImage, 3);
+
+ check_gen_mipmap(ctx, target, texObj, level);
+
+ /* state update */
+ texObj->_Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ }
_mesa_unlock_texture(ctx, texObj);
}
else if (target == GL_PROXY_TEXTURE_3D) {
@@ -3465,11 +3560,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);
@@ -3486,116 +3581,100 @@ _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)");
- goto out;
- }
+ if (compressed_subtexture_error_check2(ctx, dims, width, height, depth,
+ format, texImage)) {
+ /* error was recorded */
+ }
+ 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:
+ ;
+ }
- if ((width == 1 || width == 2) && (GLuint) width != texImage->Width) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glCompressedTexSubImage1D(width)");
- goto out;
- }
-
- if (width == 0)
- goto out; /* no-op, not an error */
+ check_gen_mipmap(ctx, target, texObj, level);
- if (ctx->Driver.CompressedTexSubImage1D) {
- (*ctx->Driver.CompressedTexSubImage1D)(ctx, target, level,
- xoffset, width,
- format, imageSize, data,
- texObj, texImage);
+ ctx->NewState |= _NEW_TEXTURE;
}
- ctx->NewState |= _NEW_TEXTURE;
}
- out:
_mesa_unlock_texture(ctx, texObj);
}
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)");
- goto out;
- }
-
- 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)");
- goto out;
- }
-
- if (width == 0 || height == 0)
- goto out; /* no-op, not an error */
-
- if (ctx->Driver.CompressedTexSubImage2D) {
- (*ctx->Driver.CompressedTexSubImage2D)(ctx, target, level,
- xoffset, yoffset, width, height,
- format, imageSize, data,
- texObj, texImage);
- }
- ctx->NewState |= _NEW_TEXTURE;
- }
- out:
- _mesa_unlock_texture(ctx, texObj);
+ compressed_tex_sub_image(2, target, level, xoffset, yoffset, 0,
+ width, height, 1, format, imageSize, data);
}
@@ -3605,56 +3684,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)");
- goto out;
- }
-
- 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)");
- goto out;
- }
-
- if (width == 0 || height == 0 || depth == 0)
- goto out; /* no-op, not an error */
-
- if (ctx->Driver.CompressedTexSubImage3D) {
- (*ctx->Driver.CompressedTexSubImage3D)(ctx, target, level,
- xoffset, yoffset, zoffset,
- width, height, depth,
- format, imageSize, data,
- texObj, texImage);
- }
- ctx->NewState |= _NEW_TEXTURE;
- }
- out:
- _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 094177da79..97c9018319 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 da55ac8697..aaccc03a7c 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -29,12 +29,11 @@
#include "mfeatures.h"
-#if FEATURE_colortable
#include "colortab.h"
-#endif
#include "context.h"
#include "enums.h"
#include "fbobject.h"
+#include "formats.h"
#include "hash.h"
#include "imports.h"
#include "macros.h"
@@ -194,9 +193,7 @@ _mesa_delete_texture_object( GLcontext *ctx, struct gl_texture_object *texObj )
*/
texObj->Target = 0x99;
-#if FEATURE_colortable
_mesa_free_colortable_data(&texObj->Palette);
-#endif
/* free the texture images */
for (face = 0; face < 6; face++) {
@@ -495,7 +492,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
t->Image[face][baseLevel]->Width2 != w ||
t->Image[face][baseLevel]->Height2 != h) {
t->_Complete = GL_FALSE;
- incomplete(t, "Non-quare cubemap image");
+ incomplete(t, "Cube face missing or mismatched size");
return;
}
}
@@ -744,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,
@@ -1102,8 +1103,6 @@ _mesa_PrioritizeTextures( GLsizei n, const GLuint *texName,
struct gl_texture_object *t = _mesa_lookup_texture(ctx, texName[i]);
if (t) {
t->Priority = CLAMP( priorities[i], 0.0F, 1.0F );
- if (ctx->Driver.PrioritizeTexture)
- ctx->Driver.PrioritizeTexture( ctx, t, t->Priority );
}
}
}
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 9d1fdd0566..ab170cde35 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)
@@ -599,7 +602,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 +729,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 +767,8 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
goto out;
}
+ texFormat = img->TexFormat;
+
isProxy = _mesa_is_proxy_texture(target);
switch (pname) {
@@ -776,10 +782,9 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
*params = img->Depth;
break;
case GL_TEXTURE_INTERNAL_FORMAT:
- if (img->IsCompressed) {
+ if (_mesa_is_format_compressed(img->TexFormat)) {
/* need to return the actual compressed format */
- *params = _mesa_compressed_format_to_glenum(ctx,
- img->TexFormat->MesaFormat);
+ *params = _mesa_compressed_format_to_glenum(ctx, img->TexFormat);
}
else {
/* return the user's requested internal format */
@@ -790,20 +795,10 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
*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;
@@ -811,36 +806,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)");
@@ -848,7 +851,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,
@@ -858,13 +861,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,
@@ -872,13 +871,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,
@@ -887,7 +887,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,
@@ -896,7 +897,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,
@@ -905,7 +907,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,
@@ -914,7 +917,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,
@@ -923,7 +927,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,
@@ -932,7 +937,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 53be83b05c..e2432be6ca 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 8292d43eb6..c735e18aff 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -31,9 +31,7 @@
#include "glheader.h"
#include "mfeatures.h"
#include "colormac.h"
-#if FEATURE_colortable
#include "colortab.h"
-#endif
#include "context.h"
#include "enums.h"
#include "macros.h"
@@ -309,10 +307,6 @@ _mesa_ActiveTextureARB(GLenum texture)
/* update current stack pointer */
ctx->CurrentStack = &ctx->TextureMatrixStack[texUnit];
}
-
- if (ctx->Driver.ActiveTexture) {
- (*ctx->Driver.ActiveTexture)( ctx, (GLuint) texUnit );
- }
}
@@ -324,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;
}
@@ -362,9 +363,6 @@ update_texture_matrices( GLcontext *ctx )
if (ctx->Texture.Unit[u]._ReallyEnabled &&
ctx->TextureMatrixStack[u].Top->type != MATRIX_IDENTITY)
ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(u);
-
- if (ctx->Driver.TextureMatrix)
- ctx->Driver.TextureMatrix( ctx, u, ctx->TextureMatrixStack[u].Top);
}
}
}
@@ -759,9 +757,7 @@ _mesa_init_texture(GLcontext *ctx)
ctx->Texture.CurrentUnit = 0; /* multitexture */
ctx->Texture._EnabledUnits = 0x0;
ctx->Texture.SharedPalette = GL_FALSE;
-#if FEATURE_colortable
_mesa_init_colortable(&ctx->Texture.Palette);
-#endif
for (u = 0; u < MAX_TEXTURE_UNITS; u++)
init_texture_unit(ctx, u);
@@ -802,10 +798,8 @@ _mesa_free_texture_data(GLcontext *ctx)
for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++)
ctx->Driver.DeleteTexture(ctx, ctx->Texture.ProxyTex[tgt]);
-#if FEATURE_colortable
for (u = 0; u < MAX_TEXTURE_IMAGE_UNITS; u++)
_mesa_free_colortable_data(&ctx->Texture.Unit[u].ColorTable);
-#endif
}
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index d3237959e0..e48d472061 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -56,15 +56,14 @@
#include "bufferobj.h"
#include "colormac.h"
#include "context.h"
-#if FEATURE_convolve
#include "convolve.h"
-#endif
#include "image.h"
#include "macros.h"
#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"
@@ -77,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.
*/
@@ -272,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.
@@ -348,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) */
@@ -433,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;
@@ -598,14 +593,13 @@ _mesa_make_temp_chan_image(GLcontext *ctx, GLuint dims,
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,
@@ -930,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,
@@ -946,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 */
@@ -955,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 &&
@@ -986,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;
@@ -1001,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,
@@ -1041,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;
}
}
@@ -1202,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 &&
@@ -1234,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);
@@ -1255,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) {
@@ -1283,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;
@@ -1316,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);
@@ -1327,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]),
@@ -1361,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) ||
@@ -1388,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) ||
@@ -1413,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;
@@ -1441,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);
@@ -1452,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]),
@@ -1484,18 +1401,22 @@ _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);
+ 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) ||
@@ -1510,7 +1431,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS)
}
else if (!ctx->_ImageTransferState &&
!srcPacking->SwapBytes &&
- dstFormat == &_mesa_texformat_argb8888_rev &&
+ dstFormat == MESA_FORMAT_ARGB8888_REV &&
baseInternalFormat == GL_RGBA &&
srcFormat == GL_BGRA &&
((srcType == GL_UNSIGNED_BYTE && !littleEndian) ||
@@ -1525,21 +1446,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++) {
@@ -1555,7 +1477,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) {
@@ -1568,14 +1490,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++) {
@@ -1600,16 +1522,18 @@ _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)) {
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));
dstmap[3] = 2;
dstmap[2] = 1;
dstmap[1] = 0;
@@ -1632,7 +1556,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);
@@ -1643,12 +1567,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]),
@@ -1657,6 +1581,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]),
@@ -1675,13 +1608,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 &&
@@ -1704,14 +1639,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];
@@ -1751,7 +1686,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);
@@ -1762,9 +1697,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) {
@@ -1800,13 +1735,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 &&
@@ -1829,14 +1766,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];
@@ -1876,7 +1813,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);
@@ -1887,9 +1824,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]);
@@ -1905,71 +1842,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) {
@@ -1985,7 +1871,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);
@@ -1996,12 +1882,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]),
@@ -2027,15 +1913,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) {
@@ -2051,7 +1940,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);
@@ -2062,9 +1951,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++) {
@@ -2082,16 +1971,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) {
@@ -2107,7 +1999,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);
@@ -2118,12 +2010,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]),
@@ -2150,18 +2042,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 &&
@@ -2184,8 +2078,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;
}
@@ -2210,7 +2104,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);
@@ -2221,12 +2115,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]),
@@ -2251,11 +2145,14 @@ _mesa_texstore_al88(TEXSTORE_PARAMS)
}
-GLboolean
+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 &&
@@ -2273,7 +2170,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);
@@ -2284,9 +2181,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]),
@@ -2306,13 +2203,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 &&
@@ -2335,7 +2235,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 {
@@ -2359,7 +2259,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);
@@ -2370,9 +2270,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]);
@@ -2388,12 +2288,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 &&
@@ -2413,9 +2315,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);
@@ -2431,17 +2333,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) ||
@@ -2460,14 +2364,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;
@@ -2477,13 +2381,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));
@@ -2529,8 +2434,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;
@@ -2556,11 +2461,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);
}
@@ -2570,18 +2475,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))) {
@@ -2595,7 +2502,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))) {
@@ -2616,8 +2523,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;
@@ -2644,7 +2551,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);
@@ -2655,12 +2562,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]),
@@ -2689,7 +2596,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;
@@ -2698,7 +2605,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);
@@ -2790,7 +2697,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;
@@ -2799,7 +2706,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);
@@ -2879,24 +2786,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 &&
@@ -2914,7 +2823,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);
@@ -2927,9 +2836,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;
@@ -2946,24 +2855,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 &&
@@ -2981,7 +2892,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);
@@ -2992,9 +2903,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;
@@ -3013,20 +2924,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,
@@ -3037,17 +2946,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,
@@ -3059,16 +2967,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,
@@ -3081,15 +2989,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,
@@ -3103,16 +3011,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,
@@ -3124,9 +3032,157 @@ _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.
+ */
+const static 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_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_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.
@@ -3215,136 +3271,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]);
- }
-}
-
-
-/**
- * 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];
- 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);
+ GLuint sz = _mesa_format_image_size(texImage->TexFormat, texImage->Width,
+ texImage->Height, texImage->Depth);
+ return sz;
}
-/**
- * Choose the actual storage format for a new texture image.
- * Mainly, this is a wrapper for the driver's ChooseTextureFormat() function.
- * Also set some other texImage fields related to texture compression, etc.
- * \param ctx rendering context
- * \param texImage the gl_texture_image
- * \param dims texture dimensions (1, 2 or 3)
- * \param format the user-specified format parameter
- * \param type the user-specified type parameter
- * \param internalFormat the user-specified internal format hint
- */
-static void
-choose_texture_format(GLcontext *ctx, struct gl_texture_image *texImage,
- GLuint dims,
- GLenum format, GLenum type, GLint internalFormat)
+/** Return row stride in bytes */
+static GLuint
+texture_row_stride(const struct gl_texture_image *texImage)
{
- ASSERT(dims == 1 || dims == 2 || dims == 3);
- ASSERT(ctx->Driver.ChooseTextureFormat);
-
- texImage->TexFormat
- = ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type);
-
- ASSERT(texImage->TexFormat);
-
- _mesa_set_fetch_functions(texImage, dims);
-
- 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;
}
@@ -3366,16 +3309,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;
- choose_texture_format(ctx, texImage, 1, format, type, internalFormat);
-
/* 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");
@@ -3392,26 +3330,19 @@ _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");
}
}
- /* GL_SGIS_generate_mipmap */
- if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- ctx->Driver.GenerateMipmap(ctx, target, texObj);
- }
-
_mesa_unmap_teximage_pbo(ctx, packing);
}
@@ -3435,18 +3366,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;
- choose_texture_format(ctx, texImage, 2, format, type, internalFormat);
-
- 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");
@@ -3462,34 +3386,20 @@ _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");
}
}
- /* GL_SGIS_generate_mipmap */
- if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- ctx->Driver.GenerateMipmap(ctx, target, texObj);
- }
-
_mesa_unmap_teximage_pbo(ctx, packing);
}
@@ -3509,18 +3419,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;
- choose_texture_format(ctx, texImage, 3, format, type, internalFormat);
-
- 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");
@@ -3536,34 +3439,20 @@ _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");
}
}
- /* GL_SGIS_generate_mipmap */
- if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- ctx->Driver.GenerateMipmap(ctx, target, texObj);
- }
-
_mesa_unmap_teximage_pbo(ctx, packing);
}
@@ -3590,26 +3479,19 @@ _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");
}
}
- /* GL_SGIS_generate_mipmap */
- if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- ctx->Driver.GenerateMipmap(ctx, target, texObj);
- }
-
_mesa_unmap_teximage_pbo(ctx, packing);
}
@@ -3635,34 +3517,20 @@ _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");
}
}
- /* GL_SGIS_generate_mipmap */
- if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- ctx->Driver.GenerateMipmap(ctx, target, texObj);
- }
-
_mesa_unmap_teximage_pbo(ctx, packing);
}
@@ -3688,34 +3556,20 @@ _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");
}
}
- /* GL_SGIS_generate_mipmap */
- if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- ctx->Driver.GenerateMipmap(ctx, target, texObj);
- }
-
_mesa_unmap_teximage_pbo(ctx, packing);
}
@@ -3766,8 +3620,6 @@ _mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level,
ASSERT(texImage->Depth == 1);
ASSERT(texImage->Data == NULL); /* was freed in glCompressedTexImage2DARB */
- choose_texture_format(ctx, texImage, 2, 0, 0, internalFormat);
-
/* allocate storage */
texImage->Data = _mesa_alloc_texmemory(imageSize);
if (!texImage->Data) {
@@ -3782,14 +3634,8 @@ _mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level,
return;
/* copy the data */
- ASSERT(texImage->CompressedSize == (GLuint) imageSize);
MEMCPY(texImage->Data, data, imageSize);
- /* GL_SGIS_generate_mipmap */
- if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- ctx->Driver.GenerateMipmap(ctx, target, texObj);
- }
-
_mesa_unmap_teximage_pbo(ctx, &ctx->Unpack);
}
@@ -3860,15 +3706,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,
@@ -3877,29 +3728,24 @@ _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;
src += srcRowStride;
}
- /* GL_SGIS_generate_mipmap */
- if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- ctx->Driver.GenerateMipmap(ctx, target, texObj);
- }
-
_mesa_unmap_teximage_pbo(ctx, &ctx->Unpack);
}
diff --git a/src/mesa/main/texstore.h b/src/mesa/main/texstore.h
index 313f2d6a59..3211086dd6 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.h b/src/mesa/main/varray.h
index becc67c29d..ef790c504e 100644
--- a/src/mesa/main/varray.h
+++ b/src/mesa/main/varray.h
@@ -129,6 +129,11 @@ extern void GLAPIENTRY
_mesa_MultiDrawElementsEXT( GLenum mode, const GLsizei *count, GLenum type,
const GLvoid **indices, GLsizei primcount );
+extern void GLAPIENTRY
+_mesa_MultiDrawElementsBaseVertex( GLenum mode,
+ const GLsizei *count, GLenum type,
+ const GLvoid **indices, GLsizei primcount,
+ const GLint *basevertex);
extern void GLAPIENTRY
_mesa_MultiModeDrawArraysIBM( const GLenum * mode, const GLint * first,
@@ -159,6 +164,16 @@ extern void GLAPIENTRY
_mesa_DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count,
GLenum type, const GLvoid *indices);
+extern void GLAPIENTRY
+_mesa_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type,
+ const GLvoid *indices, GLint basevertex);
+
+extern void GLAPIENTRY
+_mesa_DrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end,
+ GLsizei count, GLenum type,
+ const GLvoid *indices,
+ GLint basevertex);
+
extern void
_mesa_copy_client_array(GLcontext *ctx,
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index f24e11cc51..0cae1860a3 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 7.6.1
+ * Version: 7.7
*
* 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 6
-#define MESA_PATCH 1
-#define MESA_VERSION_STRING "7.6.1-devel"
+#define MESA_MINOR 7
+#define MESA_PATCH 0
+#define MESA_VERSION_STRING "7.7-devel"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c
index 8d6f560a80..c9eea8ab83 100644
--- a/src/mesa/main/vtxfmt.c
+++ b/src/mesa/main/vtxfmt.c
@@ -27,12 +27,18 @@
*/
#include "glheader.h"
+#include "api_arrayelt.h"
#include "api_loopback.h"
#include "context.h"
#include "imports.h"
#include "mtypes.h"
#include "state.h"
#include "vtxfmt.h"
+#include "eval.h"
+#include "dlist.h"
+
+
+#if FEATURE_beginend
/* The neutral vertex format. This wraps all tnl module functions,
@@ -82,18 +88,16 @@
static void
install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt )
{
- SET_ArrayElement(tab, vfmt->ArrayElement);
+ _mesa_install_arrayelt_vtxfmt(tab, vfmt);
+
SET_Color3f(tab, vfmt->Color3f);
SET_Color3fv(tab, vfmt->Color3fv);
SET_Color4f(tab, vfmt->Color4f);
SET_Color4fv(tab, vfmt->Color4fv);
SET_EdgeFlag(tab, vfmt->EdgeFlag);
- SET_EvalCoord1f(tab, vfmt->EvalCoord1f);
- SET_EvalCoord1fv(tab, vfmt->EvalCoord1fv);
- SET_EvalCoord2f(tab, vfmt->EvalCoord2f);
- SET_EvalCoord2fv(tab, vfmt->EvalCoord2fv);
- SET_EvalPoint1(tab, vfmt->EvalPoint1);
- SET_EvalPoint2(tab, vfmt->EvalPoint2);
+
+ _mesa_install_eval_vtxfmt(tab, vfmt);
+
SET_FogCoordfEXT(tab, vfmt->FogCoordfEXT);
SET_FogCoordfvEXT(tab, vfmt->FogCoordfvEXT);
SET_Indexf(tab, vfmt->Indexf);
@@ -125,8 +129,9 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt )
SET_Vertex3fv(tab, vfmt->Vertex3fv);
SET_Vertex4f(tab, vfmt->Vertex4f);
SET_Vertex4fv(tab, vfmt->Vertex4fv);
- SET_CallList(tab, vfmt->CallList);
- SET_CallLists(tab, vfmt->CallLists);
+
+ _mesa_install_dlist_vtxfmt(tab, vfmt);
+
SET_Begin(tab, vfmt->Begin);
SET_End(tab, vfmt->End);
SET_Rectf(tab, vfmt->Rectf);
@@ -134,9 +139,9 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt )
SET_DrawElements(tab, vfmt->DrawElements);
SET_DrawRangeElements(tab, vfmt->DrawRangeElements);
SET_MultiDrawElementsEXT(tab, vfmt->MultiDrawElementsEXT);
- SET_EvalMesh1(tab, vfmt->EvalMesh1);
- SET_EvalMesh2(tab, vfmt->EvalMesh2);
- ASSERT(tab->EvalMesh2);
+ SET_DrawElementsBaseVertex(tab, vfmt->DrawElementsBaseVertex);
+ SET_DrawRangeElementsBaseVertex(tab, vfmt->DrawRangeElementsBaseVertex);
+ SET_MultiDrawElementsBaseVertex(tab, vfmt->MultiDrawElementsBaseVertex);
/* GL_NV_vertex_program */
SET_VertexAttrib1fNV(tab, vfmt->VertexAttrib1fNV);
@@ -193,3 +198,6 @@ void _mesa_restore_exec_vtxfmt( GLcontext *ctx )
tnl->SwapCount = 0;
}
+
+
+#endif /* FEATURE_beginend */
diff --git a/src/mesa/main/vtxfmt.h b/src/mesa/main/vtxfmt.h
index 76f108e023..fb6c23abe9 100644
--- a/src/mesa/main/vtxfmt.h
+++ b/src/mesa/main/vtxfmt.h
@@ -33,6 +33,8 @@
#ifndef _VTXFMT_H_
#define _VTXFMT_H_
+#if FEATURE_beginend
+
extern void _mesa_init_exec_vtxfmt( GLcontext *ctx );
extern void _mesa_install_exec_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt );
@@ -40,4 +42,28 @@ extern void _mesa_install_save_vtxfmt( GLcontext *ctx, const GLvertexformat *vfm
extern void _mesa_restore_exec_vtxfmt( GLcontext *ctx );
-#endif
+#else /* FEATURE_beginend */
+
+static INLINE void
+_mesa_init_exec_vtxfmt( GLcontext *ctx )
+{
+}
+
+static INLINE void
+_mesa_install_exec_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt )
+{
+}
+
+static INLINE void
+_mesa_install_save_vtxfmt( GLcontext *ctx, const GLvertexformat *vfmt )
+{
+}
+
+static INLINE void
+_mesa_restore_exec_vtxfmt( GLcontext *ctx )
+{
+}
+
+#endif /* FEATURE_beginend */
+
+#endif /* _VTXFMT_H_ */
diff --git a/src/mesa/main/vtxfmt_tmp.h b/src/mesa/main/vtxfmt_tmp.h
index 1308d0aa46..ae636fb24f 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 )
{
@@ -354,6 +353,44 @@ static void GLAPIENTRY TAG(DrawRangeElements)( GLenum mode, GLuint start,
CALL_DrawRangeElements(GET_DISPATCH(), ( mode, start, end, count, type, indices ));
}
+static void GLAPIENTRY TAG(DrawElementsBaseVertex)( GLenum mode,
+ GLsizei count,
+ GLenum type,
+ const GLvoid *indices,
+ GLint basevertex)
+{
+ PRE_LOOPBACK( DrawElementsBaseVertex );
+ CALL_DrawElementsBaseVertex(GET_DISPATCH(), ( mode, count, type,
+ indices, basevertex ));
+}
+
+static void GLAPIENTRY TAG(DrawRangeElementsBaseVertex)( GLenum mode,
+ GLuint start,
+ GLuint end,
+ GLsizei count,
+ GLenum type,
+ const GLvoid *indices,
+ GLint basevertex)
+{
+ PRE_LOOPBACK( DrawRangeElementsBaseVertex );
+ CALL_DrawRangeElementsBaseVertex(GET_DISPATCH(), ( mode, start, end,
+ count, type, indices,
+ basevertex ));
+}
+
+static void GLAPIENTRY TAG(MultiDrawElementsBaseVertex)( GLenum mode,
+ const GLsizei *count,
+ GLenum type,
+ const GLvoid **indices,
+ GLsizei primcount,
+ const GLint *basevertex)
+{
+ PRE_LOOPBACK( MultiDrawElementsBaseVertex );
+ CALL_MultiDrawElementsBaseVertex(GET_DISPATCH(), ( mode, count, type,
+ indices,
+ primcount, basevertex ));
+}
+
static void GLAPIENTRY TAG(EvalMesh1)( GLenum mode, GLint i1, GLint i2 )
{
PRE_LOOPBACK( EvalMesh1 );
@@ -534,6 +571,9 @@ static GLvertexformat TAG(vtxfmt) = {
TAG(DrawElements),
TAG(DrawRangeElements),
TAG(MultiDrawElementsEXT),
+ TAG(DrawElementsBaseVertex),
+ TAG(DrawRangeElementsBaseVertex),
+ TAG(MultiDrawElementsBaseVertex),
TAG(EvalMesh1),
TAG(EvalMesh2)
};