diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/glx/g_disptab_EXT.c Xorg-new-size/xc/programs/Xserver/GL/glx/g_disptab_EXT.c --- Xorg-new-Mesa/xc/programs/Xserver/GL/glx/g_disptab_EXT.c 2005-01-18 10:56:32.000000000 -0800 +++ Xorg-new-size/xc/programs/Xserver/GL/glx/g_disptab_EXT.c 2005-04-12 19:57:51.000000000 -0700 @@ -2221,13 +2221,8 @@ __glXNoSuchRenderOpcode, /* 4219 */ #ifndef MISSING_GL_EXTS __glXDisp_ActiveStencilFaceEXT, /* 4220 */ -# ifndef __DARWIN__ - __glXDisp_PointParameteri, /* 4221 */ - __glXDisp_PointParameteriv, /* 4222 */ -# else __glXDisp_PointParameteriNV, /* 4221 */ __glXDisp_PointParameterivNV, /* 4222 */ -# endif #else __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, @@ -4431,13 +4426,8 @@ __glXNoSuchRenderOpcode, /* 4219 */ #ifndef MISSING_GL_EXTS __glXDispSwap_ActiveStencilFaceEXT, /* 4220 */ -# ifndef __DARWIN__ - __glXDispSwap_PointParameteri, /* 4221 */ - __glXDispSwap_PointParameteriv, /* 4222 */ -# else __glXDispSwap_PointParameteriNV, /* 4221 */ __glXDispSwap_PointParameterivNV, /* 4222 */ -# endif #else __glXNoSuchRenderOpcode, __glXNoSuchRenderOpcode, diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/glx/g_disptab_EXT.h Xorg-new-size/xc/programs/Xserver/GL/glx/g_disptab_EXT.h --- Xorg-new-Mesa/xc/programs/Xserver/GL/glx/g_disptab_EXT.h 2005-01-18 10:56:32.000000000 -0800 +++ Xorg-new-size/xc/programs/Xserver/GL/glx/g_disptab_EXT.h 2005-04-12 19:57:43.000000000 -0700 @@ -95,17 +95,10 @@ extern void __glXDisp_BlendFuncSeparate(GLbyte *); extern void __glXDispSwap_BlendFuncSeparate(GLbyte *); -#ifdef __DARWIN__ extern void __glXDisp_PointParameteriNV(GLbyte *); extern void __glXDisp_PointParameterivNV(GLbyte *); extern void __glXDispSwap_PointParameteriNV(GLbyte *); extern void __glXDispSwap_PointParameterivNV(GLbyte *); -#else -extern void __glXDisp_PointParameteri(GLbyte *); -extern void __glXDisp_PointParameteriv(GLbyte *); -extern void __glXDispSwap_PointParameteri(GLbyte *); -extern void __glXDispSwap_PointParameteriv(GLbyte *); -#endif extern void __glXDisp_ActiveStencilFaceEXT(GLbyte*); diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/glx/glxserver.h Xorg-new-size/xc/programs/Xserver/GL/glx/glxserver.h --- Xorg-new-Mesa/xc/programs/Xserver/GL/glx/glxserver.h 2005-01-18 10:56:32.000000000 -0800 +++ Xorg-new-size/xc/programs/Xserver/GL/glx/glxserver.h 2005-04-12 16:11:17.000000000 -0700 @@ -221,66 +221,9 @@ */ extern int __glXTypeSize(GLenum enm); -extern int __glXImageSize(GLenum format, GLenum type, GLsizei w, GLsizei h, - GLint rowLength, GLint skipRows, GLint alignment); -extern int __glXImage3DSize(GLenum format, GLenum type, - GLsizei w, GLsizei h, GLsizei d, - GLint imageHeight, GLint rowLength, - GLint skipImages, GLint skipRows, - GLint alignment); - -extern int __glXCallListsReqSize(GLbyte *pc, Bool swap); -extern int __glXBitmapReqSize(GLbyte *pc, Bool swap); -extern int __glXFogfvReqSize(GLbyte *pc, Bool swap); -extern int __glXFogivReqSize(GLbyte *pc, Bool swap); -extern int __glXLightfvReqSize(GLbyte *pc, Bool swap); -extern int __glXLightivReqSize(GLbyte *pc, Bool swap); -extern int __glXLightModelfvReqSize(GLbyte *pc, Bool swap); -extern int __glXLightModelivReqSize(GLbyte *pc, Bool swap); -extern int __glXMaterialfvReqSize(GLbyte *pc, Bool swap); -extern int __glXMaterialivReqSize(GLbyte *pc, Bool swap); -extern int __glXTexParameterfvReqSize(GLbyte *pc, Bool swap); -extern int __glXTexParameterivReqSize(GLbyte *pc, Bool swap); -extern int __glXTexImage1DReqSize(GLbyte *pc, Bool swap); -extern int __glXTexImage2DReqSize(GLbyte *pc, Bool swap); -extern int __glXTexEnvfvReqSize(GLbyte *pc, Bool swap); -extern int __glXTexEnvivReqSize(GLbyte *pc, Bool swap); -extern int __glXTexGendvReqSize(GLbyte *pc, Bool swap); -extern int __glXTexGenfvReqSize(GLbyte *pc, Bool swap); -extern int __glXTexGenivReqSize(GLbyte *pc, Bool swap); -extern int __glXMap1dReqSize(GLbyte *pc, Bool swap); -extern int __glXMap1fReqSize(GLbyte *pc, Bool swap); -extern int __glXMap2dReqSize(GLbyte *pc, Bool swap); -extern int __glXMap2fReqSize(GLbyte *pc, Bool swap); -extern int __glXPixelMapfvReqSize(GLbyte *pc, Bool swap); -extern int __glXPixelMapuivReqSize(GLbyte *pc, Bool swap); -extern int __glXPixelMapusvReqSize(GLbyte *pc, Bool swap); -extern int __glXDrawPixelsReqSize(GLbyte *pc, Bool swap); -extern int __glXDrawArraysSize(GLbyte *pc, Bool swap); -extern int __glXPrioritizeTexturesReqSize(GLbyte *pc, Bool swap); -extern int __glXTexSubImage1DReqSize(GLbyte *pc, Bool swap); -extern int __glXTexSubImage2DReqSize(GLbyte *pc, Bool swap); -extern int __glXTexImage3DReqSize(GLbyte *pc, Bool swap ); -extern int __glXTexSubImage3DReqSize(GLbyte *pc, Bool swap); -extern int __glXConvolutionFilter1DReqSize(GLbyte *pc, Bool swap); -extern int __glXConvolutionFilter2DReqSize(GLbyte *pc, Bool swap); -extern int __glXConvolutionParameterivReqSize(GLbyte *pc, Bool swap); -extern int __glXConvolutionParameterfvReqSize(GLbyte *pc, Bool swap); -extern int __glXSeparableFilter2DReqSize(GLbyte *pc, Bool swap); -extern int __glXColorTableReqSize(GLbyte *pc, Bool swap); -extern int __glXColorSubTableReqSize(GLbyte *pc, Bool swap); -extern int __glXColorTableParameterfvReqSize(GLbyte *pc, Bool swap); -extern int __glXColorTableParameterivReqSize(GLbyte *pc, Bool swap); - -/* - * Routines for computing the size of returned data. - */ -extern int __glXConvolutionParameterivSize(GLenum pname); -extern int __glXConvolutionParameterfvSize(GLenum pname); -extern int __glXColorTableParameterfvSize(GLenum pname); -extern int __glXColorTableParameterivSize(GLenum pname); - -extern int __glXPointParameterfvARBReqSize(GLbyte *pc, Bool swap); -extern int __glXPointParameterivReqSize(GLbyte *pc, Bool swap); +extern int __glXImageSize(GLenum format, GLenum type, + GLenum target, GLsizei w, GLsizei h, GLsizei d, + GLint imageHeight, GLint rowLength, GLint skipImages, GLint skipRows, + GLint alignment); #endif /* !__GLX_server_h__ */ diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/glx/g_render.c Xorg-new-size/xc/programs/Xserver/GL/glx/g_render.c --- Xorg-new-Mesa/xc/programs/Xserver/GL/glx/g_render.c 2005-01-11 17:05:57.000000000 -0800 +++ Xorg-new-size/xc/programs/Xserver/GL/glx/g_render.c 2005-04-12 19:57:04.000000000 -0700 @@ -2249,14 +2249,8 @@ ); } -#ifdef __DARWIN__ -#define __glPointParameterivNV_size __glPointParameteriv_size dispatch_template_enum1_1s(PointParameteriNV, GLint) dispatch_template_enum1_Vv(PointParameterivNV, GLint) -#else -dispatch_template_enum1_1s(PointParameteri, GLint) -dispatch_template_enum1_Vv(PointParameteriv, GLint) -#endif void __glXDisp_ActiveStencilFaceEXT(GLbyte *pc) { diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/glx/g_renderswap.c Xorg-new-size/xc/programs/Xserver/GL/glx/g_renderswap.c --- Xorg-new-Mesa/xc/programs/Xserver/GL/glx/g_renderswap.c 2005-01-11 17:05:57.000000000 -0800 +++ Xorg-new-size/xc/programs/Xserver/GL/glx/g_renderswap.c 2005-04-12 19:54:14.000000000 -0700 @@ -3335,7 +3335,7 @@ __GLX_SWAP_INT(pc + 0); pname = *(GLenum *)(pc + 0); - compsize = __glPointParameterfvARB_size(pname); + compsize = __glPointParameterfvEXT_size(pname); if (compsize < 0) compsize = 0; __GLX_SWAP_FLOAT_ARRAY(pc + 4, compsize); diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/glx/Imakefile Xorg-new-size/xc/programs/Xserver/GL/glx/Imakefile --- Xorg-new-Mesa/xc/programs/Xserver/GL/glx/Imakefile 2005-04-07 09:58:49.000000000 -0700 +++ Xorg-new-size/xc/programs/Xserver/GL/glx/Imakefile 2005-04-12 20:30:40.000000000 -0700 @@ -19,6 +19,7 @@ LinkSourceFile(glcontextmodes.c, $(MESASRCDIR)/src/mesa/drivers/dri/common) LinkSourceFile(glcontextmodes.h, $(MESASRCDIR)/src/mesa/drivers/dri/common) +LinkSourceFile(indirect_size.h, $(MESASRCDIR)/src/glx/x11) SRCS = global.c glxbuf.c glxcmds.c glxcmdsswap.c glxext.c \ glxfb.c glximports.c glxmem.c glxpix.c glxscreens.c \ @@ -27,20 +28,15 @@ single2swap.c singlepix.c singlepixswap.c \ singlesize.c xfont.c g_disptab.c g_disptab_EXT.c \ g_render.c g_renderswap.c g_single.c g_singleswap.c \ + indirect_reqsize.c indirect_size_get.c indirect_util.c \ glcontextmodes.c $(MSRCS) - OBJS = global.o glxbuf.o glxcmds.o glxcmdsswap.o glxext.o \ - glxfb.o glximports.o glxmem.o glxpix.o glxscreens.o \ - glxutil.o render2.o render2swap.o renderpix.o \ - renderpixswap.o rensize.o rensizetab.o single2.o \ - single2swap.o singlepix.o singlepixswap.o \ - singlesize.o xfont.o g_disptab.o g_disptab_EXT.o \ - g_render.o g_renderswap.o g_single.o g_singleswap.o \ - glcontextmodes.o $(MOBJS) + OBJS = $(SRCS:.c=.o) INCLUDES = -I$(SERVERSRC)/GL/glx -I$(SERVERSRC)/GL/include -I$(SERVERSRC)/include -I$(INCLUDESRC) -I$(MESASRCDIR)/include \ -I$(XINCLUDESRC) -I$(SERVERSRC)/mi \ -I$(EXTINCSRC) -I$(FONTINCSRC) -I$(LIBSRC)/GL/include \ + -I$(MESASRCDIR)/src/mesa/main -I$(MESASRCDIR)/src/mesa/glapi \ -I$(XF86SRC) #if defined(DarwinArchitecture) && ((OSMajorVersion == 6 && OSMinorVersion < 3) || OSMajorVersion < 6) @@ -95,6 +91,9 @@ LinkSourceFile(glxpix.c,LinkDirectory) LinkSourceFile(glxscreens.c,LinkDirectory) LinkSourceFile(glxutil.c,LinkDirectory) +LinkSourceFile(indirect_reqsize.c,LinkDirectory) +LinkSourceFile(indirect_size_get.c,LinkDirectory) +LinkSourceFile(indirect_util.c,LinkDirectory) LinkSourceFile(render2.c,LinkDirectory) LinkSourceFile(render2swap.c,LinkDirectory) LinkSourceFile(renderpix.c,LinkDirectory) diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/glx/indirect_reqsize.c Xorg-new-size/xc/programs/Xserver/GL/glx/indirect_reqsize.c --- Xorg-new-Mesa/xc/programs/Xserver/GL/glx/indirect_reqsize.c 1969-12-31 16:00:00.000000000 -0800 +++ Xorg-new-size/xc/programs/Xserver/GL/glx/indirect_reqsize.c 2005-04-12 15:49:48.000000000 -0700 @@ -0,0 +1,776 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + + +#include +#include +#include "glxserver.h" +#include "indirect_size.h" +#include "indirect_reqsize.h" + +#define __GLX_PAD(x) (((x) + 3) & ~3) + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# define HAVE_ALIAS +# endif + +#ifdef HAVE_ALIAS +# define ALIAS2(from,to) \ + GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ + __attribute__ ((alias( # to ))); +# define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize ) +#else +# define ALIAS(from,to) \ + GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \ + { return __glX ## to ## ReqSize( pc, swap ); } +#endif + + +int +__glXCallListsReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei n = *(GLsizei *)(pc + 0); + GLenum type = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + n = bswap_32( n ); + type = bswap_32( type ); + } + + compsize = __glCallLists_size(type); + return __GLX_PAD((compsize * n)); +} + +int +__glXBitmapReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLsizei width = *(GLsizei *)(pc + 20); + GLsizei height = *(GLsizei *)(pc + 24); + + if (swap) { + row_length = bswap_32( row_length ); + skip_rows = bswap_32( skip_rows ); + alignment = bswap_32( alignment ); + width = bswap_32( width ); + height = bswap_32( height ); + } + + return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXFogfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 0); + GLsizei compsize; + + if (swap) { + pname = bswap_32( pname ); + } + + compsize = __glFogfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXLightfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32( pname ); + } + + compsize = __glLightfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXLightModelfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 0); + GLsizei compsize; + + if (swap) { + pname = bswap_32( pname ); + } + + compsize = __glLightModelfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXMaterialfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32( pname ); + } + + compsize = __glMaterialfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXPolygonStippleReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + + if (swap) { + row_length = bswap_32( row_length ); + skip_rows = bswap_32( skip_rows ); + alignment = bswap_32( alignment ); + } + + return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, 32, 32, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexParameterfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32( pname ); + } + + compsize = __glTexParameterfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXTexImage1DReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLenum target = * (GLenum *)(pc + 20); + GLsizei width = *(GLsizei *)(pc + 32); + GLenum format = * (GLenum *)(pc + 40); + GLenum type = * (GLenum *)(pc + 44); + + if (swap) { + row_length = bswap_32( row_length ); + skip_rows = bswap_32( skip_rows ); + alignment = bswap_32( alignment ); + target = bswap_32( target ); + width = bswap_32( width ); + format = bswap_32( format ); + type = bswap_32( type ); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexImage2DReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLenum target = * (GLenum *)(pc + 20); + GLsizei width = *(GLsizei *)(pc + 32); + GLsizei height = *(GLsizei *)(pc + 36); + GLenum format = * (GLenum *)(pc + 44); + GLenum type = * (GLenum *)(pc + 48); + + if (swap) { + row_length = bswap_32( row_length ); + skip_rows = bswap_32( skip_rows ); + alignment = bswap_32( alignment ); + target = bswap_32( target ); + width = bswap_32( width ); + height = bswap_32( height ); + format = bswap_32( format ); + type = bswap_32( type ); + } + + return __glXImageSize(format, type, target, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexEnvfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32( pname ); + } + + compsize = __glTexEnvfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXTexGendvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32( pname ); + } + + compsize = __glTexGendv_size(pname); + return __GLX_PAD((compsize * 8)); +} + +int +__glXTexGenfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32( pname ); + } + + compsize = __glTexGenfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXPixelMapfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei mapsize = *(GLsizei *)(pc + 4); + + if (swap) { + mapsize = bswap_32( mapsize ); + } + + return __GLX_PAD((mapsize * 4)); +} + +int +__glXPixelMapusvReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei mapsize = *(GLsizei *)(pc + 4); + + if (swap) { + mapsize = bswap_32( mapsize ); + } + + return __GLX_PAD((mapsize * 2)); +} + +int +__glXDrawPixelsReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLsizei width = *(GLsizei *)(pc + 20); + GLsizei height = *(GLsizei *)(pc + 24); + GLenum format = * (GLenum *)(pc + 28); + GLenum type = * (GLenum *)(pc + 32); + + if (swap) { + row_length = bswap_32( row_length ); + skip_rows = bswap_32( skip_rows ); + alignment = bswap_32( alignment ); + width = bswap_32( width ); + height = bswap_32( height ); + format = bswap_32( format ); + type = bswap_32( type ); + } + + return __glXImageSize(format, type, 0, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexSubImage1DReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLenum target = * (GLenum *)(pc + 20); + GLsizei width = *(GLsizei *)(pc + 32); + GLenum format = * (GLenum *)(pc + 36); + GLenum type = * (GLenum *)(pc + 40); + + if (swap) { + row_length = bswap_32( row_length ); + skip_rows = bswap_32( skip_rows ); + alignment = bswap_32( alignment ); + target = bswap_32( target ); + width = bswap_32( width ); + format = bswap_32( format ); + type = bswap_32( type ); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexSubImage2DReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLenum target = * (GLenum *)(pc + 20); + GLsizei width = *(GLsizei *)(pc + 36); + GLsizei height = *(GLsizei *)(pc + 40); + GLenum format = * (GLenum *)(pc + 44); + GLenum type = * (GLenum *)(pc + 48); + + if (swap) { + row_length = bswap_32( row_length ); + skip_rows = bswap_32( skip_rows ); + alignment = bswap_32( alignment ); + target = bswap_32( target ); + width = bswap_32( width ); + height = bswap_32( height ); + format = bswap_32( format ); + type = bswap_32( type ); + } + + return __glXImageSize(format, type, target, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXPrioritizeTexturesReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei n = *(GLsizei *)(pc + 0); + + if (swap) { + n = bswap_32( n ); + } + + return __GLX_PAD((n * 4) + (n * 4)); +} + +int +__glXColorTableReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLenum target = * (GLenum *)(pc + 20); + GLsizei width = *(GLsizei *)(pc + 28); + GLenum format = * (GLenum *)(pc + 32); + GLenum type = * (GLenum *)(pc + 36); + + if (swap) { + row_length = bswap_32( row_length ); + skip_rows = bswap_32( skip_rows ); + alignment = bswap_32( alignment ); + target = bswap_32( target ); + width = bswap_32( width ); + format = bswap_32( format ); + type = bswap_32( type ); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXColorTableParameterfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32( pname ); + } + + compsize = __glColorTableParameterfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXColorSubTableReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLenum target = * (GLenum *)(pc + 20); + GLsizei count = *(GLsizei *)(pc + 28); + GLenum format = * (GLenum *)(pc + 32); + GLenum type = * (GLenum *)(pc + 36); + + if (swap) { + row_length = bswap_32( row_length ); + skip_rows = bswap_32( skip_rows ); + alignment = bswap_32( alignment ); + target = bswap_32( target ); + count = bswap_32( count ); + format = bswap_32( format ); + type = bswap_32( type ); + } + + return __glXImageSize(format, type, target, count, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXConvolutionFilter1DReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLenum target = * (GLenum *)(pc + 20); + GLsizei width = *(GLsizei *)(pc + 28); + GLenum format = * (GLenum *)(pc + 32); + GLenum type = * (GLenum *)(pc + 36); + + if (swap) { + row_length = bswap_32( row_length ); + skip_rows = bswap_32( skip_rows ); + alignment = bswap_32( alignment ); + target = bswap_32( target ); + width = bswap_32( width ); + format = bswap_32( format ); + type = bswap_32( type ); + } + + return __glXImageSize(format, type, target, width, 1, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXConvolutionFilter2DReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = 0; + GLint skip_images = 0; + GLint skip_rows = * (GLint *)(pc + 8); + GLint alignment = * (GLint *)(pc + 16); + GLenum target = * (GLenum *)(pc + 20); + GLsizei width = *(GLsizei *)(pc + 28); + GLsizei height = *(GLsizei *)(pc + 32); + GLenum format = * (GLenum *)(pc + 36); + GLenum type = * (GLenum *)(pc + 40); + + if (swap) { + row_length = bswap_32( row_length ); + skip_rows = bswap_32( skip_rows ); + alignment = bswap_32( alignment ); + target = bswap_32( target ); + width = bswap_32( width ); + height = bswap_32( height ); + format = bswap_32( format ); + type = bswap_32( type ); + } + + return __glXImageSize(format, type, target, width, height, 1, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXConvolutionParameterfvReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 4); + GLsizei compsize; + + if (swap) { + pname = bswap_32( pname ); + } + + compsize = __glConvolutionParameterfv_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXTexImage3DReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = * (GLint *)(pc + 8); + GLint skip_rows = * (GLint *)(pc + 16); + GLint skip_images = * (GLint *)(pc + 20); + GLint alignment = * (GLint *)(pc + 32); + GLenum target = * (GLenum *)(pc + 36); + GLsizei width = *(GLsizei *)(pc + 48); + GLsizei height = *(GLsizei *)(pc + 52); + GLsizei depth = *(GLsizei *)(pc + 56); + GLenum format = * (GLenum *)(pc + 64); + GLenum type = * (GLenum *)(pc + 68); + + if (swap) { + row_length = bswap_32( row_length ); + image_height = bswap_32( image_height ); + skip_rows = bswap_32( skip_rows ); + skip_images = bswap_32( skip_images ); + alignment = bswap_32( alignment ); + target = bswap_32( target ); + width = bswap_32( width ); + height = bswap_32( height ); + depth = bswap_32( depth ); + format = bswap_32( format ); + type = bswap_32( type ); + } + + return __glXImageSize(format, type, target, width, height, depth, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXTexSubImage3DReqSize( const GLbyte * pc, Bool swap ) +{ + GLint row_length = * (GLint *)(pc + 4); + GLint image_height = * (GLint *)(pc + 8); + GLint skip_rows = * (GLint *)(pc + 16); + GLint skip_images = * (GLint *)(pc + 20); + GLint alignment = * (GLint *)(pc + 32); + GLenum target = * (GLenum *)(pc + 36); + GLsizei width = *(GLsizei *)(pc + 56); + GLsizei height = *(GLsizei *)(pc + 60); + GLsizei depth = *(GLsizei *)(pc + 64); + GLenum format = * (GLenum *)(pc + 68); + GLenum type = * (GLenum *)(pc + 72); + + if (swap) { + row_length = bswap_32( row_length ); + image_height = bswap_32( image_height ); + skip_rows = bswap_32( skip_rows ); + skip_images = bswap_32( skip_images ); + alignment = bswap_32( alignment ); + target = bswap_32( target ); + width = bswap_32( width ); + height = bswap_32( height ); + depth = bswap_32( depth ); + format = bswap_32( format ); + type = bswap_32( type ); + } + + return __glXImageSize(format, type, target, width, height, depth, + image_height, row_length, skip_images, + skip_rows, alignment); +} + +int +__glXCompressedTexImage3DARBReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei imageSize = *(GLsizei *)(pc + 28); + + if (swap) { + imageSize = bswap_32( imageSize ); + } + + return __GLX_PAD((imageSize * 1)); +} + +int +__glXCompressedTexImage2DARBReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei imageSize = *(GLsizei *)(pc + 24); + + if (swap) { + imageSize = bswap_32( imageSize ); + } + + return __GLX_PAD((imageSize * 1)); +} + +int +__glXCompressedTexImage1DARBReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei imageSize = *(GLsizei *)(pc + 20); + + if (swap) { + imageSize = bswap_32( imageSize ); + } + + return __GLX_PAD((imageSize * 1)); +} + +int +__glXCompressedTexSubImage3DARBReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei imageSize = *(GLsizei *)(pc + 36); + + if (swap) { + imageSize = bswap_32( imageSize ); + } + + return __GLX_PAD((imageSize * 1)); +} + +int +__glXProgramStringARBReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei len = *(GLsizei *)(pc + 8); + + if (swap) { + len = bswap_32( len ); + } + + return __GLX_PAD((len * 1)); +} + +int +__glXDrawBuffersARBReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei n = *(GLsizei *)(pc + 0); + + if (swap) { + n = bswap_32( n ); + } + + return __GLX_PAD((n * 4)); +} + +int +__glXPointParameterfvEXTReqSize( const GLbyte * pc, Bool swap ) +{ + GLenum pname = * (GLenum *)(pc + 0); + GLsizei compsize; + + if (swap) { + pname = bswap_32( pname ); + } + + compsize = __glPointParameterfvEXT_size(pname); + return __GLX_PAD((compsize * 4)); +} + +int +__glXProgramParameters4dvNVReqSize( const GLbyte * pc, Bool swap ) +{ + GLuint num = * (GLuint *)(pc + 8); + + if (swap) { + num = bswap_32( num ); + } + + return __GLX_PAD(((num * 4) * 8)); +} + +int +__glXProgramParameters4fvNVReqSize( const GLbyte * pc, Bool swap ) +{ + GLuint num = * (GLuint *)(pc + 8); + + if (swap) { + num = bswap_32( num ); + } + + return __GLX_PAD(((num * 4) * 4)); +} + +int +__glXVertexAttribs1dvNVReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei n = *(GLsizei *)(pc + 4); + + if (swap) { + n = bswap_32( n ); + } + + return __GLX_PAD((n * 8)); +} + +int +__glXVertexAttribs4ubvNVReqSize( const GLbyte * pc, Bool swap ) +{ + GLsizei n = *(GLsizei *)(pc + 4); + + if (swap) { + n = bswap_32( n ); + } + + return __GLX_PAD(((n * 4) * 1)); +} + +ALIAS( Fogiv, Fogfv ) +ALIAS( Lightiv, Lightfv ) +ALIAS( LightModeliv, LightModelfv ) +ALIAS( Materialiv, Materialfv ) +ALIAS( TexParameteriv, TexParameterfv ) +ALIAS( TexEnviv, TexEnvfv ) +ALIAS( TexGeniv, TexGenfv ) +ALIAS( PixelMapuiv, PixelMapfv ) +ALIAS( ColorTableParameteriv, ColorTableParameterfv ) +ALIAS( ConvolutionParameteriv, ConvolutionParameterfv ) +ALIAS( CompressedTexSubImage2DARB, CompressedTexImage3DARB ) +ALIAS( CompressedTexSubImage1DARB, CompressedTexImage1DARB ) +ALIAS( LoadProgramNV, ProgramStringARB ) +ALIAS( RequestResidentProgramsNV, DrawBuffersARB ) +ALIAS( VertexAttribs1svNV, PixelMapusv ) +ALIAS( VertexAttribs2svNV, PixelMapusv ) +ALIAS( VertexAttribs3svNV, PixelMapusv ) +ALIAS( VertexAttribs4svNV, PixelMapusv ) +ALIAS( VertexAttribs1fvNV, PixelMapfv ) +ALIAS( VertexAttribs2fvNV, PixelMapfv ) +ALIAS( VertexAttribs3fvNV, PixelMapfv ) +ALIAS( VertexAttribs4fvNV, PixelMapfv ) +ALIAS( VertexAttribs2dvNV, VertexAttribs1dvNV ) +ALIAS( VertexAttribs3dvNV, VertexAttribs1dvNV ) +ALIAS( VertexAttribs4dvNV, VertexAttribs1dvNV ) +ALIAS( PointParameterivNV, PointParameterfvEXT ) +ALIAS( ProgramNamedParameter4fvNV, VertexAttribs4ubvNV ) +ALIAS( ProgramNamedParameter4dvNV, CompressedTexSubImage3DARB ) diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/glx/indirect_reqsize.h Xorg-new-size/xc/programs/Xserver/GL/glx/indirect_reqsize.h --- Xorg-new-Mesa/xc/programs/Xserver/GL/glx/indirect_reqsize.h 1969-12-31 16:00:00.000000000 -0800 +++ Xorg-new-size/xc/programs/Xserver/GL/glx/indirect_reqsize.h 2005-04-12 15:49:49.000000000 -0700 @@ -0,0 +1,119 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#if !defined( _INDIRECT_REQSIZE_H_ ) +# define _INDIRECT_REQSIZE_H_ + +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) +# define HIDDEN __attribute__((visibility("hidden"))) +# else +# define HIDDEN +# endif + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define PURE __attribute__((pure)) +# else +# define PURE +# endif + +extern PURE HIDDEN int __glXCallListsReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXBitmapReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXFogfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXFogivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLightfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLightivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLightModelfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLightModelivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMaterialfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMaterialivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPolygonStippleReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexParameterfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexParameterivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexImage1DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexImage2DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexEnvfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexEnvivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexGendvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexGenfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexGenivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMap1dReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMap1fReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMap2dReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXMap2fReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPixelMapfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPixelMapuivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPixelMapusvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDrawPixelsReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDrawArraysReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXColorTableReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXColorTableParameterivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXColorSubTableReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXConvolutionParameterivReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXSeparableFilter2DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexImage3DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexSubImage2DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXCompressedTexSubImage1DARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramStringARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXLoadProgramNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXRequestResidentProgramsNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs1svNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs2svNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs4svNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs1fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs2fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs4fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXVertexAttribs4ubvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXPointParameterivNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap); +extern PURE HIDDEN int __glXProgramNamedParameter4dvNVReqSize(const GLbyte *pc, Bool swap); + +# undef HIDDEN +# undef PURE + +#endif /* !defined( _INDIRECT_REQSIZE_H_ ) */ diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/glx/indirect_size_get.c Xorg-new-size/xc/programs/Xserver/GL/glx/indirect_size_get.c --- Xorg-new-Mesa/xc/programs/Xserver/GL/glx/indirect_size_get.c 1969-12-31 16:00:00.000000000 -0800 +++ Xorg-new-size/xc/programs/Xserver/GL/glx/indirect_size_get.c 2005-04-12 15:49:50.000000000 -0700 @@ -0,0 +1,1164 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2004 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + + +#include +#include "indirect_size_get.h" +#include "indirect_size.h" + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# define HAVE_ALIAS +# endif + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define PURE __attribute__((pure)) +# else +# define PURE +# endif + +# if defined(__i386__) && defined(__GNUC__) +# define FASTCALL __attribute__((fastcall)) +# else +# define FASTCALL +# endif + +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) +# define INTERNAL __attribute__((visibility("internal"))) +# else +# define INTERNAL +# endif + + +#ifdef HAVE_ALIAS +# define ALIAS2(from,to) \ + INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ + __attribute__ ((alias( # to ))); +# define ALIAS(from,to) ALIAS2( from, __gl ## to ## _size ) +#else +# define ALIAS(from,to) \ + INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ + { return __gl ## to ## _size( e ); } +#endif + + +INTERNAL PURE FASTCALL GLint +__glCallLists_size( GLenum e ) +{ + switch( e ) { + case GL_BYTE: + case GL_UNSIGNED_BYTE: + return 1; + case GL_SHORT: + case GL_UNSIGNED_SHORT: + case GL_2_BYTES: + return 2; + case GL_3_BYTES: + return 3; + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + case GL_4_BYTES: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glFogfv_size( GLenum e ) +{ + switch( e ) { + case GL_FOG_INDEX: + case GL_FOG_DENSITY: + case GL_FOG_START: + case GL_FOG_END: + case GL_FOG_MODE: + case GL_FOG_OFFSET_VALUE_SGIX: + case GL_FOG_DISTANCE_MODE_NV: + return 1; + case GL_FOG_COLOR: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glLightfv_size( GLenum e ) +{ + switch( e ) { + case GL_SPOT_EXPONENT: + case GL_SPOT_CUTOFF: + case GL_CONSTANT_ATTENUATION: + case GL_LINEAR_ATTENUATION: + case GL_QUADRATIC_ATTENUATION: + return 1; + case GL_SPOT_DIRECTION: + return 3; + case GL_AMBIENT: + case GL_DIFFUSE: + case GL_SPECULAR: + case GL_POSITION: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glLightModelfv_size( GLenum e ) +{ + switch( e ) { + case GL_LIGHT_MODEL_LOCAL_VIEWER: + case GL_LIGHT_MODEL_TWO_SIDE: + case GL_LIGHT_MODEL_COLOR_CONTROL: +/* case GL_LIGHT_MODEL_COLOR_CONTROL_EXT:*/ + return 1; + case GL_LIGHT_MODEL_AMBIENT: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glMaterialfv_size( GLenum e ) +{ + switch( e ) { + case GL_SHININESS: + return 1; + case GL_COLOR_INDEXES: + return 3; + case GL_AMBIENT: + case GL_DIFFUSE: + case GL_SPECULAR: + case GL_EMISSION: + case GL_AMBIENT_AND_DIFFUSE: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glTexParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_TEXTURE_MAG_FILTER: + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + case GL_TEXTURE_PRIORITY: + case GL_TEXTURE_WRAP_R: + case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: +/* case GL_SHADOW_AMBIENT_SGIX:*/ + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_CLIPMAP_FRAME_SGIX: + case GL_TEXTURE_LOD_BIAS_S_SGIX: + case GL_TEXTURE_LOD_BIAS_T_SGIX: + case GL_TEXTURE_LOD_BIAS_R_SGIX: + case GL_GENERATE_MIPMAP: +/* case GL_GENERATE_MIPMAP_SGIS:*/ + case GL_TEXTURE_COMPARE_SGIX: + case GL_TEXTURE_COMPARE_OPERATOR_SGIX: + case GL_TEXTURE_MAX_CLAMP_S_SGIX: + case GL_TEXTURE_MAX_CLAMP_T_SGIX: + case GL_TEXTURE_MAX_CLAMP_R_SGIX: + case GL_TEXTURE_MAX_ANISOTROPY_EXT: + case GL_TEXTURE_LOD_BIAS: +/* case GL_TEXTURE_LOD_BIAS_EXT:*/ + case GL_DEPTH_TEXTURE_MODE: +/* case GL_DEPTH_TEXTURE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_MODE: +/* case GL_TEXTURE_COMPARE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_FUNC: +/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ + case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: + return 1; + case GL_TEXTURE_CLIPMAP_CENTER_SGIX: + case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: + return 2; + case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: + return 3; + case GL_TEXTURE_BORDER_COLOR: + case GL_POST_TEXTURE_FILTER_BIAS_SGIX: + case GL_POST_TEXTURE_FILTER_SCALE_SGIX: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glTexEnvfv_size( GLenum e ) +{ + switch( e ) { + case GL_ALPHA_SCALE: + case GL_TEXTURE_ENV_MODE: + case GL_TEXTURE_LOD_BIAS: + case GL_COMBINE_RGB: + case GL_COMBINE_ALPHA: + case GL_RGB_SCALE: + case GL_SOURCE0_RGB: + case GL_SOURCE1_RGB: + case GL_SOURCE2_RGB: + case GL_SOURCE3_RGB_NV: + case GL_SOURCE0_ALPHA: + case GL_SOURCE1_ALPHA: + case GL_SOURCE2_ALPHA: + case GL_SOURCE3_ALPHA_NV: + case GL_OPERAND0_RGB: + case GL_OPERAND1_RGB: + case GL_OPERAND2_RGB: + case GL_OPERAND3_RGB_NV: + case GL_OPERAND0_ALPHA: + case GL_OPERAND1_ALPHA: + case GL_OPERAND2_ALPHA: + case GL_OPERAND3_ALPHA_NV: + case GL_COORD_REPLACE_ARB: +/* case GL_COORD_REPLACE_NV:*/ + return 1; + case GL_TEXTURE_ENV_COLOR: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glTexGendv_size( GLenum e ) +{ + switch( e ) { + case GL_TEXTURE_GEN_MODE: + return 1; + case GL_OBJECT_PLANE: + case GL_EYE_PLANE: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glMap1d_size( GLenum e ) +{ + switch( e ) { + case GL_MAP1_INDEX: + case GL_MAP1_TEXTURE_COORD_1: + return 1; + case GL_MAP1_TEXTURE_COORD_2: + return 2; + case GL_MAP1_NORMAL: + case GL_MAP1_TEXTURE_COORD_3: + case GL_MAP1_VERTEX_3: + return 3; + case GL_MAP1_COLOR_4: + case GL_MAP1_TEXTURE_COORD_4: + case GL_MAP1_VERTEX_4: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glMap2d_size( GLenum e ) +{ + switch( e ) { + case GL_MAP2_INDEX: + case GL_MAP2_TEXTURE_COORD_1: + return 1; + case GL_MAP2_TEXTURE_COORD_2: + return 2; + case GL_MAP2_NORMAL: + case GL_MAP2_TEXTURE_COORD_3: + case GL_MAP2_VERTEX_3: + return 3; + case GL_MAP2_COLOR_4: + case GL_MAP2_TEXTURE_COORD_4: + case GL_MAP2_VERTEX_4: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glColorTableParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_COLOR_TABLE_SCALE: + case GL_COLOR_TABLE_BIAS: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glConvolutionParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_CONVOLUTION_BORDER_MODE: +/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ + return 1; + case GL_CONVOLUTION_FILTER_SCALE: +/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ + case GL_CONVOLUTION_FILTER_BIAS: +/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ + case GL_CONVOLUTION_BORDER_COLOR: +/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glPointParameterfvEXT_size( GLenum e ) +{ + switch( e ) { + case GL_POINT_SIZE_MIN: +/* case GL_POINT_SIZE_MIN_ARB:*/ +/* case GL_POINT_SIZE_MIN_EXT:*/ +/* case GL_POINT_SIZE_MIN_SGIS:*/ + case GL_POINT_SIZE_MAX: +/* case GL_POINT_SIZE_MAX_ARB:*/ +/* case GL_POINT_SIZE_MAX_EXT:*/ +/* case GL_POINT_SIZE_MAX_SGIS:*/ + case GL_POINT_FADE_THRESHOLD_SIZE: +/* case GL_POINT_FADE_THRESHOLD_SIZE_ARB:*/ +/* case GL_POINT_FADE_THRESHOLD_SIZE_EXT:*/ +/* case GL_POINT_FADE_THRESHOLD_SIZE_SGIS:*/ + case GL_POINT_SPRITE_R_MODE_NV: + case GL_POINT_SPRITE_COORD_ORIGIN: + return 1; + case GL_POINT_DISTANCE_ATTENUATION: +/* case GL_POINT_DISTANCE_ATTENUATION_ARB:*/ +/* case GL_POINT_DISTANCE_ATTENUATION_EXT:*/ +/* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/ + return 3; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetBooleanv_size( GLenum e ) +{ + switch( e ) { + case GL_CURRENT_INDEX: + case GL_CURRENT_RASTER_INDEX: + case GL_CURRENT_RASTER_POSITION_VALID: + case GL_CURRENT_RASTER_DISTANCE: + case GL_POINT_SMOOTH: + case GL_POINT_SIZE: + case GL_POINT_SIZE_GRANULARITY: +/* case GL_SMOOTH_POINT_SIZE_GRANULARITY:*/ + case GL_LINE_SMOOTH: + case GL_LINE_WIDTH: + case GL_LINE_WIDTH_GRANULARITY: +/* case GL_SMOOTH_LINE_WIDTH_GRANULARITY:*/ + case GL_LINE_STIPPLE: + case GL_LINE_STIPPLE_PATTERN: + case GL_LINE_STIPPLE_REPEAT: + case GL_LIST_MODE: + case GL_MAX_LIST_NESTING: + case GL_LIST_BASE: + case GL_LIST_INDEX: + case GL_POLYGON_SMOOTH: + case GL_POLYGON_STIPPLE: + case GL_EDGE_FLAG: + case GL_CULL_FACE: + case GL_CULL_FACE_MODE: + case GL_FRONT_FACE: + case GL_LIGHTING: + case GL_LIGHT_MODEL_LOCAL_VIEWER: + case GL_LIGHT_MODEL_TWO_SIDE: + case GL_SHADE_MODEL: + case GL_COLOR_MATERIAL_FACE: + case GL_COLOR_MATERIAL_PARAMETER: + case GL_COLOR_MATERIAL: + case GL_FOG: + case GL_FOG_INDEX: + case GL_FOG_DENSITY: + case GL_FOG_START: + case GL_FOG_END: + case GL_FOG_MODE: + case GL_DEPTH_TEST: + case GL_DEPTH_WRITEMASK: + case GL_DEPTH_CLEAR_VALUE: + case GL_DEPTH_FUNC: + case GL_STENCIL_TEST: + case GL_STENCIL_CLEAR_VALUE: + case GL_STENCIL_FUNC: + case GL_STENCIL_VALUE_MASK: + case GL_STENCIL_FAIL: + case GL_STENCIL_PASS_DEPTH_FAIL: + case GL_STENCIL_PASS_DEPTH_PASS: + case GL_STENCIL_REF: + case GL_STENCIL_WRITEMASK: + case GL_MATRIX_MODE: + case GL_NORMALIZE: + case GL_MODELVIEW_STACK_DEPTH: + case GL_PROJECTION_STACK_DEPTH: + case GL_TEXTURE_STACK_DEPTH: + case GL_ATTRIB_STACK_DEPTH: + case GL_ALPHA_TEST: + case GL_ALPHA_TEST_FUNC: + case GL_ALPHA_TEST_REF: + case GL_DITHER: + case GL_BLEND_DST: + case GL_BLEND_SRC: + case GL_BLEND: + case GL_LOGIC_OP_MODE: + case GL_LOGIC_OP: + case GL_AUX_BUFFERS: + case GL_DRAW_BUFFER: + case GL_READ_BUFFER: + case GL_SCISSOR_TEST: + case GL_INDEX_CLEAR_VALUE: + case GL_INDEX_WRITEMASK: + case GL_INDEX_MODE: + case GL_RGBA_MODE: + case GL_DOUBLEBUFFER: + case GL_STEREO: + case GL_RENDER_MODE: + case GL_PERSPECTIVE_CORRECTION_HINT: + case GL_POINT_SMOOTH_HINT: + case GL_LINE_SMOOTH_HINT: + case GL_POLYGON_SMOOTH_HINT: + case GL_FOG_HINT: + case GL_TEXTURE_GEN_S: + case GL_TEXTURE_GEN_T: + case GL_TEXTURE_GEN_R: + case GL_TEXTURE_GEN_Q: + case GL_PIXEL_MAP_I_TO_I: + case GL_PIXEL_MAP_I_TO_I_SIZE: + case GL_PIXEL_MAP_S_TO_S_SIZE: + case GL_PIXEL_MAP_I_TO_R_SIZE: + case GL_PIXEL_MAP_I_TO_G_SIZE: + case GL_PIXEL_MAP_I_TO_B_SIZE: + case GL_PIXEL_MAP_I_TO_A_SIZE: + case GL_PIXEL_MAP_R_TO_R_SIZE: + case GL_PIXEL_MAP_G_TO_G_SIZE: + case GL_PIXEL_MAP_B_TO_B_SIZE: + case GL_PIXEL_MAP_A_TO_A_SIZE: + case GL_UNPACK_SWAP_BYTES: + case GL_UNPACK_LSB_FIRST: + case GL_UNPACK_ROW_LENGTH: + case GL_UNPACK_SKIP_ROWS: + case GL_UNPACK_SKIP_PIXELS: + case GL_UNPACK_ALIGNMENT: + case GL_PACK_SWAP_BYTES: + case GL_PACK_LSB_FIRST: + case GL_PACK_ROW_LENGTH: + case GL_PACK_SKIP_ROWS: + case GL_PACK_SKIP_PIXELS: + case GL_PACK_ALIGNMENT: + case GL_MAP_COLOR: + case GL_MAP_STENCIL: + case GL_INDEX_SHIFT: + case GL_INDEX_OFFSET: + case GL_RED_SCALE: + case GL_RED_BIAS: + case GL_ZOOM_X: + case GL_ZOOM_Y: + case GL_GREEN_SCALE: + case GL_GREEN_BIAS: + case GL_BLUE_SCALE: + case GL_BLUE_BIAS: + case GL_ALPHA_SCALE: + case GL_ALPHA_BIAS: + case GL_DEPTH_SCALE: + case GL_DEPTH_BIAS: + case GL_MAX_EVAL_ORDER: + case GL_MAX_LIGHTS: + case GL_MAX_CLIP_PLANES: + case GL_MAX_TEXTURE_SIZE: + case GL_MAX_PIXEL_MAP_TABLE: + case GL_MAX_ATTRIB_STACK_DEPTH: + case GL_MAX_MODELVIEW_STACK_DEPTH: + case GL_MAX_NAME_STACK_DEPTH: + case GL_MAX_PROJECTION_STACK_DEPTH: + case GL_MAX_TEXTURE_STACK_DEPTH: + case GL_SUBPIXEL_BITS: + case GL_INDEX_BITS: + case GL_RED_BITS: + case GL_GREEN_BITS: + case GL_BLUE_BITS: + case GL_ALPHA_BITS: + case GL_DEPTH_BITS: + case GL_STENCIL_BITS: + case GL_ACCUM_RED_BITS: + case GL_ACCUM_GREEN_BITS: + case GL_ACCUM_BLUE_BITS: + case GL_ACCUM_ALPHA_BITS: + case GL_NAME_STACK_DEPTH: + case GL_AUTO_NORMAL: + case GL_MAP1_COLOR_4: + case GL_MAP1_INDEX: + case GL_MAP1_NORMAL: + case GL_MAP1_TEXTURE_COORD_1: + case GL_MAP1_TEXTURE_COORD_2: + case GL_MAP1_TEXTURE_COORD_3: + case GL_MAP1_TEXTURE_COORD_4: + case GL_MAP1_VERTEX_3: + case GL_MAP1_VERTEX_4: + case GL_MAP2_COLOR_4: + case GL_MAP2_INDEX: + case GL_MAP2_NORMAL: + case GL_MAP2_TEXTURE_COORD_1: + case GL_MAP2_TEXTURE_COORD_2: + case GL_MAP2_TEXTURE_COORD_3: + case GL_MAP2_TEXTURE_COORD_4: + case GL_MAP2_VERTEX_3: + case GL_MAP2_VERTEX_4: + case GL_MAP1_GRID_SEGMENTS: + case GL_TEXTURE_1D: + case GL_TEXTURE_2D: + case GL_POLYGON_OFFSET_UNITS: + case GL_CLIP_PLANE0: + case GL_CLIP_PLANE1: + case GL_CLIP_PLANE2: + case GL_CLIP_PLANE3: + case GL_CLIP_PLANE4: + case GL_CLIP_PLANE5: + case GL_LIGHT0: + case GL_LIGHT1: + case GL_LIGHT2: + case GL_LIGHT3: + case GL_LIGHT4: + case GL_LIGHT5: + case GL_LIGHT6: + case GL_LIGHT7: + case GL_BLEND_EQUATION: +/* case GL_BLEND_EQUATION_EXT:*/ +/* case GL_BLEND_EQUATION_RGB_EXT:*/ + case GL_CONVOLUTION_1D: + case GL_CONVOLUTION_2D: + case GL_SEPARABLE_2D: + case GL_MAX_CONVOLUTION_WIDTH: +/* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ + case GL_MAX_CONVOLUTION_HEIGHT: +/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ + case GL_POST_CONVOLUTION_RED_SCALE: +/* case GL_POST_CONVOLUTION_RED_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_GREEN_SCALE: +/* case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_BLUE_SCALE: +/* case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_ALPHA_SCALE: +/* case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:*/ + case GL_POST_CONVOLUTION_RED_BIAS: +/* case GL_POST_CONVOLUTION_RED_BIAS_EXT:*/ + case GL_POST_CONVOLUTION_GREEN_BIAS: +/* case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:*/ + case GL_POST_CONVOLUTION_BLUE_BIAS: +/* case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:*/ + case GL_POST_CONVOLUTION_ALPHA_BIAS: +/* case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:*/ + case GL_HISTOGRAM: + case GL_MINMAX: + case GL_POLYGON_OFFSET_FACTOR: + case GL_RESCALE_NORMAL: +/* case GL_RESCALE_NORMAL_EXT:*/ + case GL_TEXTURE_BINDING_1D: + case GL_TEXTURE_BINDING_2D: + case GL_TEXTURE_BINDING_3D: + case GL_PACK_SKIP_IMAGES: + case GL_PACK_IMAGE_HEIGHT: + case GL_UNPACK_SKIP_IMAGES: + case GL_UNPACK_IMAGE_HEIGHT: + case GL_TEXTURE_3D: + case GL_VERTEX_ARRAY: + case GL_NORMAL_ARRAY: + case GL_COLOR_ARRAY: + case GL_INDEX_ARRAY: + case GL_TEXTURE_COORD_ARRAY: + case GL_EDGE_FLAG_ARRAY: + case GL_VERTEX_ARRAY_SIZE: + case GL_VERTEX_ARRAY_TYPE: + case GL_VERTEX_ARRAY_STRIDE: + case GL_NORMAL_ARRAY_TYPE: + case GL_NORMAL_ARRAY_STRIDE: + case GL_COLOR_ARRAY_SIZE: + case GL_COLOR_ARRAY_TYPE: + case GL_COLOR_ARRAY_STRIDE: + case GL_INDEX_ARRAY_TYPE: + case GL_INDEX_ARRAY_STRIDE: + case GL_TEXTURE_COORD_ARRAY_SIZE: + case GL_TEXTURE_COORD_ARRAY_TYPE: + case GL_TEXTURE_COORD_ARRAY_STRIDE: + case GL_EDGE_FLAG_ARRAY_STRIDE: + case GL_MULTISAMPLE: +/* case GL_MULTISAMPLE_ARB:*/ + case GL_SAMPLE_ALPHA_TO_COVERAGE: +/* case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:*/ + case GL_SAMPLE_ALPHA_TO_ONE: +/* case GL_SAMPLE_ALPHA_TO_ONE_ARB:*/ + case GL_SAMPLE_COVERAGE: +/* case GL_SAMPLE_COVERAGE_ARB:*/ + case GL_SAMPLE_BUFFERS: +/* case GL_SAMPLE_BUFFERS_ARB:*/ + case GL_SAMPLES: +/* case GL_SAMPLES_ARB:*/ + case GL_SAMPLE_COVERAGE_VALUE: +/* case GL_SAMPLE_COVERAGE_VALUE_ARB:*/ + case GL_SAMPLE_COVERAGE_INVERT: +/* case GL_SAMPLE_COVERAGE_INVERT_ARB:*/ + case GL_COLOR_MATRIX_STACK_DEPTH: + case GL_MAX_COLOR_MATRIX_STACK_DEPTH: + case GL_POST_COLOR_MATRIX_RED_SCALE: + case GL_POST_COLOR_MATRIX_GREEN_SCALE: + case GL_POST_COLOR_MATRIX_BLUE_SCALE: + case GL_POST_COLOR_MATRIX_ALPHA_SCALE: + case GL_POST_COLOR_MATRIX_RED_BIAS: + case GL_POST_COLOR_MATRIX_GREEN_BIAS: + case GL_POST_COLOR_MATRIX_BLUE_BIAS: + case GL_POST_COLOR_MATRIX_ALPHA_BIAS: + case GL_BLEND_DST_RGB: + case GL_BLEND_SRC_RGB: + case GL_BLEND_DST_ALPHA: + case GL_BLEND_SRC_ALPHA: + case GL_COLOR_TABLE: + case GL_POST_CONVOLUTION_COLOR_TABLE: + case GL_POST_COLOR_MATRIX_COLOR_TABLE: + case GL_MAX_ELEMENTS_VERTICES: + case GL_MAX_ELEMENTS_INDICES: + case GL_CLIP_VOLUME_CLIPPING_HINT_EXT: + case GL_OCCLUSION_TEST_HP: + case GL_OCCLUSION_TEST_RESULT_HP: + case GL_LIGHT_MODEL_COLOR_CONTROL: + case GL_FOG_COORDINATE_SOURCE: +/* case GL_FOG_COORD_SOURCE:*/ + case GL_CURRENT_FOG_COORDINATE: +/* case GL_CURRENT_FOG_COORD:*/ + case GL_FOG_COORDINATE_ARRAY_TYPE: +/* case GL_FOG_COORD_ARRAY_TYPE:*/ + case GL_FOG_COORDINATE_ARRAY_STRIDE: +/* case GL_FOG_COORD_ARRAY_STRIDE:*/ + case GL_FOG_COORDINATE_ARRAY: +/* case GL_FOG_COORD_ARRAY:*/ + case GL_COLOR_SUM_ARB: + case GL_SECONDARY_COLOR_ARRAY_SIZE: + case GL_SECONDARY_COLOR_ARRAY_TYPE: + case GL_SECONDARY_COLOR_ARRAY_STRIDE: + case GL_SECONDARY_COLOR_ARRAY: + case GL_ACTIVE_TEXTURE: +/* case GL_ACTIVE_TEXTURE_ARB:*/ + case GL_CLIENT_ACTIVE_TEXTURE: +/* case GL_CLIENT_ACTIVE_TEXTURE_ARB:*/ + case GL_MAX_TEXTURE_UNITS: +/* case GL_MAX_TEXTURE_UNITS_ARB:*/ + case GL_TEXTURE_COMPRESSION_HINT: +/* case GL_TEXTURE_COMPRESSION_HINT_ARB:*/ + case GL_TEXTURE_RECTANGLE_ARB: +/* case GL_TEXTURE_RECTANGLE_NV:*/ + case GL_TEXTURE_BINDING_RECTANGLE_ARB: +/* case GL_TEXTURE_BINDING_RECTANGLE_NV:*/ + case GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB: +/* case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:*/ + case GL_MAX_TEXTURE_LOD_BIAS: + case GL_MAX_SHININESS_NV: + case GL_MAX_SPOT_EXPONENT_NV: + case GL_TEXTURE_CUBE_MAP: +/* case GL_TEXTURE_CUBE_MAP_ARB:*/ + case GL_TEXTURE_BINDING_CUBE_MAP: +/* case GL_TEXTURE_BINDING_CUBE_MAP_ARB:*/ + case GL_MAX_CUBE_MAP_TEXTURE_SIZE: +/* case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:*/ + case GL_MULTISAMPLE_FILTER_HINT_NV: + case GL_FOG_DISTANCE_MODE_NV: + case GL_VERTEX_PROGRAM_ARB: + case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB: + case GL_MAX_PROGRAM_MATRICES_ARB: + case GL_CURRENT_MATRIX_STACK_DEPTH_ARB: + case GL_VERTEX_PROGRAM_POINT_SIZE_ARB: + case GL_VERTEX_PROGRAM_TWO_SIDE_ARB: + case GL_PROGRAM_ERROR_POSITION_ARB: + case GL_DEPTH_CLAMP_NV: + case GL_NUM_COMPRESSED_TEXTURE_FORMATS: +/* case GL_NUM_TEXTURE_COMPRESSED_FORMATS_ARB:*/ + case GL_MAX_VERTEX_UNITS_ARB: + case GL_ACTIVE_VERTEX_UNITS_ARB: + case GL_WEIGHT_SUM_UNITY_ARB: + case GL_VERTEX_BLEND_ARB: + case GL_CURRENT_WEIGHT_ARB: + case GL_WEIGHT_ARRAY_TYPE_ARB: + case GL_WEIGHT_ARRAY_STRIDE_ARB: + case GL_WEIGHT_ARRAY_SIZE_ARB: + case GL_WEIGHT_ARRAY_ARB: + case GL_PACK_INVERT_MESA: + case GL_FRAGMENT_PROGRAM_ARB: + case GL_MAX_DRAW_BUFFERS_ARB: +/* case GL_MAX_DRAW_BUFFERS_ATI:*/ + case GL_DRAW_BUFFER0_ARB: +/* case GL_DRAW_BUFFER0_ATI:*/ + case GL_DRAW_BUFFER1_ARB: +/* case GL_DRAW_BUFFER1_ATI:*/ + case GL_DRAW_BUFFER2_ARB: +/* case GL_DRAW_BUFFER2_ATI:*/ + case GL_DRAW_BUFFER3_ARB: +/* case GL_DRAW_BUFFER3_ATI:*/ + case GL_DRAW_BUFFER4_ARB: +/* case GL_DRAW_BUFFER4_ATI:*/ + case GL_DRAW_BUFFER5_ARB: +/* case GL_DRAW_BUFFER5_ATI:*/ + case GL_DRAW_BUFFER6_ARB: +/* case GL_DRAW_BUFFER6_ATI:*/ + case GL_DRAW_BUFFER7_ARB: +/* case GL_DRAW_BUFFER7_ATI:*/ + case GL_DRAW_BUFFER8_ARB: +/* case GL_DRAW_BUFFER8_ATI:*/ + case GL_DRAW_BUFFER9_ARB: +/* case GL_DRAW_BUFFER9_ATI:*/ + case GL_DRAW_BUFFER10_ARB: +/* case GL_DRAW_BUFFER10_ATI:*/ + case GL_DRAW_BUFFER11_ARB: +/* case GL_DRAW_BUFFER11_ATI:*/ + case GL_DRAW_BUFFER12_ARB: +/* case GL_DRAW_BUFFER12_ATI:*/ + case GL_DRAW_BUFFER13_ARB: +/* case GL_DRAW_BUFFER13_ATI:*/ + case GL_DRAW_BUFFER14_ARB: +/* case GL_DRAW_BUFFER14_ATI:*/ + case GL_DRAW_BUFFER15_ARB: +/* case GL_DRAW_BUFFER15_ATI:*/ + case GL_BLEND_EQUATION_ALPHA_EXT: + case GL_MATRIX_PALETTE_ARB: + case GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB: + case GL_MAX_PALETTE_MATRICES_ARB: + case GL_CURRENT_PALETTE_MATRIX_ARB: + case GL_MATRIX_INDEX_ARRAY_ARB: + case GL_CURRENT_MATRIX_INDEX_ARB: + case GL_MATRIX_INDEX_ARRAY_SIZE_ARB: + case GL_MATRIX_INDEX_ARRAY_TYPE_ARB: + case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB: + case GL_POINT_SPRITE_ARB: +/* case GL_POINT_SPRITE_NV:*/ + case GL_POINT_SPRITE_R_MODE_NV: + case GL_MAX_VERTEX_ATTRIBS_ARB: + case GL_DEPTH_BOUNDS_TEST_EXT: + case GL_STENCIL_TEST_TWO_SIDE_EXT: + case GL_ACTIVE_STENCIL_FACE_EXT: + case GL_RASTER_POSITION_UNCLIPPED_IBM: + return 1; + case GL_POINT_SIZE_RANGE: +/* case GL_SMOOTH_POINT_SIZE_RANGE:*/ + case GL_LINE_WIDTH_RANGE: +/* case GL_SMOOTH_LINE_WIDTH_RANGE:*/ + case GL_POLYGON_MODE: + case GL_DEPTH_RANGE: + case GL_MAX_VIEWPORT_DIMS: + case GL_MAP1_GRID_DOMAIN: + case GL_MAP2_GRID_SEGMENTS: + case GL_ALIASED_POINT_SIZE_RANGE: + case GL_ALIASED_LINE_WIDTH_RANGE: + case GL_DEPTH_BOUNDS_EXT: + return 2; + case GL_CURRENT_NORMAL: + return 3; + case GL_CURRENT_COLOR: + case GL_CURRENT_TEXTURE_COORDS: + case GL_CURRENT_RASTER_COLOR: + case GL_CURRENT_RASTER_TEXTURE_COORDS: + case GL_CURRENT_RASTER_POSITION: + case GL_LIGHT_MODEL_AMBIENT: + case GL_FOG_COLOR: + case GL_ACCUM_CLEAR_VALUE: + case GL_VIEWPORT: + case GL_SCISSOR_BOX: + case GL_COLOR_CLEAR_VALUE: + case GL_COLOR_WRITEMASK: + case GL_MAP2_GRID_DOMAIN: + case GL_BLEND_COLOR: +/* case GL_BLEND_COLOR_EXT:*/ + case GL_CURRENT_SECONDARY_COLOR: + return 4; + case GL_MODELVIEW_MATRIX: + case GL_PROJECTION_MATRIX: + case GL_TEXTURE_MATRIX: + case GL_MODELVIEW0_ARB: + case GL_COLOR_MATRIX: + case GL_MODELVIEW1_ARB: + case GL_CURRENT_MATRIX_ARB: + case GL_MODELVIEW2_ARB: + case GL_MODELVIEW3_ARB: + case GL_MODELVIEW4_ARB: + case GL_MODELVIEW5_ARB: + case GL_MODELVIEW6_ARB: + case GL_MODELVIEW7_ARB: + case GL_MODELVIEW8_ARB: + case GL_MODELVIEW9_ARB: + case GL_MODELVIEW10_ARB: + case GL_MODELVIEW11_ARB: + case GL_MODELVIEW12_ARB: + case GL_MODELVIEW13_ARB: + case GL_MODELVIEW14_ARB: + case GL_MODELVIEW15_ARB: + case GL_MODELVIEW16_ARB: + case GL_MODELVIEW17_ARB: + case GL_MODELVIEW18_ARB: + case GL_MODELVIEW19_ARB: + case GL_MODELVIEW20_ARB: + case GL_MODELVIEW21_ARB: + case GL_MODELVIEW22_ARB: + case GL_MODELVIEW23_ARB: + case GL_MODELVIEW24_ARB: + case GL_MODELVIEW25_ARB: + case GL_MODELVIEW26_ARB: + case GL_MODELVIEW27_ARB: + case GL_MODELVIEW28_ARB: + case GL_MODELVIEW29_ARB: + case GL_MODELVIEW30_ARB: + case GL_MODELVIEW31_ARB: + case GL_TRANSPOSE_CURRENT_MATRIX_ARB: + return 16; + case GL_COMPRESSED_TEXTURE_FORMATS: + return __glGetBooleanv_variable_size( e ); + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetTexParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_TEXTURE_MAG_FILTER: + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + case GL_TEXTURE_PRIORITY: + case GL_TEXTURE_RESIDENT: + case GL_TEXTURE_WRAP_R: + case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: +/* case GL_SHADOW_AMBIENT_SGIX:*/ + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_CLIPMAP_FRAME_SGIX: + case GL_TEXTURE_LOD_BIAS_S_SGIX: + case GL_TEXTURE_LOD_BIAS_T_SGIX: + case GL_TEXTURE_LOD_BIAS_R_SGIX: + case GL_GENERATE_MIPMAP: +/* case GL_GENERATE_MIPMAP_SGIS:*/ + case GL_TEXTURE_COMPARE_SGIX: + case GL_TEXTURE_COMPARE_OPERATOR_SGIX: + case GL_TEXTURE_MAX_CLAMP_S_SGIX: + case GL_TEXTURE_MAX_CLAMP_T_SGIX: + case GL_TEXTURE_MAX_CLAMP_R_SGIX: + case GL_TEXTURE_MAX_ANISOTROPY_EXT: + case GL_TEXTURE_LOD_BIAS: +/* case GL_TEXTURE_LOD_BIAS_EXT:*/ + case GL_DEPTH_TEXTURE_MODE: +/* case GL_DEPTH_TEXTURE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_MODE: +/* case GL_TEXTURE_COMPARE_MODE_ARB:*/ + case GL_TEXTURE_COMPARE_FUNC: +/* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ + case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: + return 1; + case GL_TEXTURE_CLIPMAP_CENTER_SGIX: + case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: + return 2; + case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: + return 3; + case GL_TEXTURE_BORDER_COLOR: + case GL_POST_TEXTURE_FILTER_BIAS_SGIX: + case GL_POST_TEXTURE_FILTER_SCALE_SGIX: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetTexLevelParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_TEXTURE_WIDTH: + case GL_TEXTURE_HEIGHT: + case GL_TEXTURE_COMPONENTS: + case GL_TEXTURE_BORDER: + case GL_TEXTURE_RED_SIZE: +/* case GL_TEXTURE_RED_SIZE_EXT:*/ + case GL_TEXTURE_GREEN_SIZE: +/* case GL_TEXTURE_GREEN_SIZE_EXT:*/ + case GL_TEXTURE_BLUE_SIZE: +/* case GL_TEXTURE_BLUE_SIZE_EXT:*/ + case GL_TEXTURE_ALPHA_SIZE: +/* case GL_TEXTURE_ALPHA_SIZE_EXT:*/ + case GL_TEXTURE_LUMINANCE_SIZE: +/* case GL_TEXTURE_LUMINANCE_SIZE_EXT:*/ + case GL_TEXTURE_INTENSITY_SIZE: +/* case GL_TEXTURE_INTENSITY_SIZE_EXT:*/ + case GL_TEXTURE_DEPTH: + case GL_TEXTURE_INDEX_SIZE_EXT: + case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: +/* case GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB:*/ + case GL_TEXTURE_COMPRESSED: +/* case GL_TEXTURE_COMPRESSED_ARB:*/ + case GL_TEXTURE_DEPTH_SIZE: +/* case GL_TEXTURE_DEPTH_SIZE_ARB:*/ + return 1; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetColorTableParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_COLOR_TABLE_FORMAT: +/* case GL_COLOR_TABLE_FORMAT_EXT:*/ + case GL_COLOR_TABLE_WIDTH: +/* case GL_COLOR_TABLE_WIDTH_EXT:*/ + case GL_COLOR_TABLE_RED_SIZE: +/* case GL_COLOR_TABLE_RED_SIZE_EXT:*/ + case GL_COLOR_TABLE_GREEN_SIZE: +/* case GL_COLOR_TABLE_GREEN_SIZE_EXT:*/ + case GL_COLOR_TABLE_BLUE_SIZE: +/* case GL_COLOR_TABLE_BLUE_SIZE_EXT:*/ + case GL_COLOR_TABLE_ALPHA_SIZE: +/* case GL_COLOR_TABLE_ALPHA_SIZE_EXT:*/ + case GL_COLOR_TABLE_LUMINANCE_SIZE: +/* case GL_COLOR_TABLE_LUMINANCE_SIZE_EXT:*/ + case GL_COLOR_TABLE_INTENSITY_SIZE: +/* case GL_COLOR_TABLE_INTENSITY_SIZE_EXT:*/ + return 1; + case GL_COLOR_TABLE_SCALE: + case GL_COLOR_TABLE_BIAS: + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetConvolutionParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_CONVOLUTION_BORDER_MODE: +/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ + case GL_CONVOLUTION_FORMAT: +/* case GL_CONVOLUTION_FORMAT_EXT:*/ + case GL_CONVOLUTION_WIDTH: +/* case GL_CONVOLUTION_WIDTH_EXT:*/ + case GL_CONVOLUTION_HEIGHT: +/* case GL_CONVOLUTION_HEIGHT_EXT:*/ + case GL_MAX_CONVOLUTION_WIDTH: +/* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ + case GL_MAX_CONVOLUTION_HEIGHT: +/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ + return 1; + case GL_CONVOLUTION_FILTER_SCALE: +/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ + case GL_CONVOLUTION_FILTER_BIAS: +/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ + case GL_CONVOLUTION_BORDER_COLOR: +/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ + return 4; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetHistogramParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_HISTOGRAM_WIDTH: + case GL_HISTOGRAM_FORMAT: + case GL_HISTOGRAM_RED_SIZE: + case GL_HISTOGRAM_GREEN_SIZE: + case GL_HISTOGRAM_BLUE_SIZE: + case GL_HISTOGRAM_ALPHA_SIZE: + case GL_HISTOGRAM_LUMINANCE_SIZE: + case GL_HISTOGRAM_SINK: + return 1; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetMinmaxParameterfv_size( GLenum e ) +{ + switch( e ) { + case GL_MINMAX_FORMAT: + case GL_MINMAX_SINK: + return 1; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetProgramivNV_size( GLenum e ) +{ + switch( e ) { + case GL_PROGRAM_LENGTH_NV: + case GL_PROGRAM_TARGET_NV: + case GL_PROGRAM_RESIDENT_NV: + return 1; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetVertexAttribdvARB_size( GLenum e ) +{ + switch( e ) { + case GL_VERTEX_PROGRAM_ARB: + case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB: + case GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB: + case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB: + case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB: + case GL_CURRENT_VERTEX_ATTRIB_ARB: + return 1; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetProgramivARB_size( GLenum e ) +{ + switch( e ) { + case GL_PROGRAM_LENGTH_ARB: + case GL_PROGRAM_BINDING_ARB: + case GL_PROGRAM_ALU_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEX_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEX_INDIRECTIONS_ARB: + case GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: + case GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: + case GL_MAX_TEXTURE_COORDS_ARB: + case GL_MAX_TEXTURE_IMAGE_UNITS_ARB: + case GL_PROGRAM_FORMAT_ARB: + case GL_PROGRAM_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEMPORARIES_ARB: + case GL_MAX_PROGRAM_TEMPORARIES_ARB: + case GL_PROGRAM_NATIVE_TEMPORARIES_ARB: + case GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB: + case GL_PROGRAM_PARAMETERS_ARB: + case GL_MAX_PROGRAM_PARAMETERS_ARB: + case GL_PROGRAM_NATIVE_PARAMETERS_ARB: + case GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB: + case GL_PROGRAM_ATTRIBS_ARB: + case GL_MAX_PROGRAM_ATTRIBS_ARB: + case GL_PROGRAM_NATIVE_ATTRIBS_ARB: + case GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB: + case GL_PROGRAM_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB: + case GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB: + case GL_MAX_PROGRAM_ENV_PARAMETERS_ARB: + case GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB: + case GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV: +/* case GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV:*/ + case GL_MAX_PROGRAM_CALL_DEPTH_NV: +/* case GL_MAX_PROGRAM_CALL_DEPTH_NV:*/ + case GL_MAX_PROGRAM_IF_DEPTH_NV: + case GL_MAX_PROGRAM_LOOP_DEPTH_NV: + case GL_MAX_PROGRAM_LOOP_COUNT_NV: + return 1; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetQueryivARB_size( GLenum e ) +{ + switch( e ) { + case GL_QUERY_COUNTER_BITS_ARB: + case GL_CURRENT_QUERY_ARB: + return 1; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetQueryObjectivARB_size( GLenum e ) +{ + switch( e ) { + case GL_QUERY_RESULT_ARB: + case GL_QUERY_RESULT_AVAILABLE_ARB: + return 1; + default: return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetVertexAttribdvNV_size( GLenum e ) +{ + switch( e ) { + case GL_ATTRIB_ARRAY_SIZE_NV: + case GL_ATTRIB_ARRAY_STRIDE_NV: + case GL_ATTRIB_ARRAY_TYPE_NV: + case GL_CURRENT_ATTRIB_NV: + return 1; + default: return 0; + } +} + +ALIAS( Fogiv, Fogfv ) +ALIAS( Lightiv, Lightfv ) +ALIAS( LightModeliv, LightModelfv ) +ALIAS( Materialiv, Materialfv ) +ALIAS( TexParameteriv, TexParameterfv ) +ALIAS( TexEnviv, TexEnvfv ) +ALIAS( TexGenfv, TexGendv ) +ALIAS( TexGeniv, TexGendv ) +ALIAS( Map1f, Map1d ) +ALIAS( Map2f, Map2d ) +ALIAS( ColorTableParameteriv, ColorTableParameterfv ) +ALIAS( ConvolutionParameteriv, ConvolutionParameterfv ) +ALIAS( PointParameterivNV, PointParameterfvEXT ) +ALIAS( GetDoublev, GetBooleanv ) +ALIAS( GetFloatv, GetBooleanv ) +ALIAS( GetIntegerv, GetBooleanv ) +ALIAS( GetLightfv, Lightfv ) +ALIAS( GetLightiv, Lightfv ) +ALIAS( GetMaterialfv, Materialfv ) +ALIAS( GetMaterialiv, Materialfv ) +ALIAS( GetTexEnvfv, TexEnvfv ) +ALIAS( GetTexEnviv, TexEnvfv ) +ALIAS( GetTexGendv, TexGendv ) +ALIAS( GetTexGenfv, TexGendv ) +ALIAS( GetTexGeniv, TexGendv ) +ALIAS( GetTexParameteriv, GetTexParameterfv ) +ALIAS( GetTexLevelParameteriv, GetTexLevelParameterfv ) +ALIAS( GetColorTableParameteriv, GetColorTableParameterfv ) +ALIAS( GetConvolutionParameteriv, GetConvolutionParameterfv ) +ALIAS( GetHistogramParameteriv, GetHistogramParameterfv ) +ALIAS( GetMinmaxParameteriv, GetMinmaxParameterfv ) +ALIAS( GetHistogramParameterfvEXT, GetHistogramParameterfv ) +ALIAS( GetHistogramParameterivEXT, GetHistogramParameterfv ) +ALIAS( GetMinmaxParameterfvEXT, GetMinmaxParameterfv ) +ALIAS( GetMinmaxParameterivEXT, GetMinmaxParameterfv ) +ALIAS( GetVertexAttribfvARB, GetVertexAttribdvARB ) +ALIAS( GetVertexAttribivARB, GetVertexAttribdvARB ) +ALIAS( GetQueryObjectuivARB, GetQueryObjectivARB ) +ALIAS( GetVertexAttribfvNV, GetVertexAttribdvNV ) +ALIAS( GetVertexAttribivNV, GetVertexAttribdvNV ) diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/glx/indirect_size_get.h Xorg-new-size/xc/programs/Xserver/GL/glx/indirect_size_get.h --- Xorg-new-Mesa/xc/programs/Xserver/GL/glx/indirect_size_get.h 1969-12-31 16:00:00.000000000 -0800 +++ Xorg-new-size/xc/programs/Xserver/GL/glx/indirect_size_get.h 2005-04-12 15:49:51.000000000 -0700 @@ -0,0 +1,102 @@ +/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2004 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#if !defined( _INDIRECT_SIZE_GET_H_ ) +# define _INDIRECT_SIZE_GET_H_ + +/** + * \file + * Prototypes for functions used to determine the number of data elements in + * various GLX protocol messages. + * + * \author Ian Romanick + */ + +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define PURE __attribute__((pure)) +# else +# define PURE +# endif + +# if defined(__i386__) && defined(__GNUC__) +# define FASTCALL __attribute__((fastcall)) +# else +# define FASTCALL +# endif + +# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) +# define INTERNAL __attribute__((visibility("internal"))) +# else +# define INTERNAL +# endif + +extern INTERNAL PURE FASTCALL GLint __glGetBooleanv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetDoublev_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetFloatv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetIntegerv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetLightfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetLightiv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMaterialfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMaterialiv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexEnvfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexEnviv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexGendv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexGenfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexGeniv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetConvolutionParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetConvolutionParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameteriv_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfvEXT_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameterivEXT_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfvEXT_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterivEXT_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetProgramivNV_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetProgramivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetQueryivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectuivARB_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvNV_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvNV_size(GLenum); +extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivNV_size(GLenum); + +# undef PURE +# undef FASTCALL +# undef INTERNAL + +#endif /* !defined( _INDIRECT_SIZE_GET_H_ ) */ diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/glx/indirect_util.c Xorg-new-size/xc/programs/Xserver/GL/glx/indirect_util.c --- Xorg-new-Mesa/xc/programs/Xserver/GL/glx/indirect_util.c 1969-12-31 16:00:00.000000000 -0800 +++ Xorg-new-size/xc/programs/Xserver/GL/glx/indirect_util.c 2005-04-12 19:47:41.000000000 -0700 @@ -0,0 +1,52 @@ +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include +#include +#include +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" + +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) +# define HIDDEN __attribute__((visibility("hidden"))) +#else +# define HIDDEN +#endif + + +HIDDEN GLint +__glGetBooleanv_variable_size( GLenum e ) +{ + if ( e == GL_COMPRESSED_TEXTURE_FORMATS ) { + GLint temp; + + glGetIntegerv( GL_NUM_COMPRESSED_TEXTURE_FORMATS, & temp ); + return temp; + } + else { + return 0; + } +} diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/glx/renderpix.c Xorg-new-size/xc/programs/Xserver/GL/glx/renderpix.c --- Xorg-new-Mesa/xc/programs/Xserver/GL/glx/renderpix.c 2005-01-18 10:56:32.000000000 -0800 +++ Xorg-new-size/xc/programs/Xserver/GL/glx/renderpix.c 2005-04-12 20:00:45.000000000 -0700 @@ -297,8 +297,10 @@ /* XXX check this usage - internal code called ** a version without the packing parameters */ - image1len = __glXImageSize(hdr->format, hdr->type, hdr->width, 1, - hdr->rowLength, hdr->skipRows, hdr->alignment); + image1len = __glXImageSize(hdr->format, hdr->type, 0, + hdr->width, 1, 1, + 0, hdr->rowLength, + 0, hdr->skipRows, hdr->alignment); image1len = __GLX_PAD(image1len); glSeparableFilter2D(hdr->target, hdr->internalformat, diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/glx/renderpixswap.c Xorg-new-size/xc/programs/Xserver/GL/glx/renderpixswap.c --- Xorg-new-Mesa/xc/programs/Xserver/GL/glx/renderpixswap.c 2005-01-18 10:56:32.000000000 -0800 +++ Xorg-new-size/xc/programs/Xserver/GL/glx/renderpixswap.c 2005-04-13 10:36:08.000000000 -0700 @@ -539,8 +539,8 @@ /* XXX check this usage - internal code called ** a version without the packing parameters */ - image1len = __glXImageSize(hdr->format, hdr->type, hdr->width, 1, - hdr->rowLength, hdr->skipRows, hdr->alignment); + image1len = __glXImageSize(hdr->format, hdr->type, 0, hdr->width, 1, 1, + 0, hdr->rowLength, 0, hdr->skipRows, hdr->alignment); image1len = __GLX_PAD(image1len); diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/glx/rensize.c Xorg-new-size/xc/programs/Xserver/GL/glx/rensize.c --- Xorg-new-Mesa/xc/programs/Xserver/GL/glx/rensize.c 2005-01-18 10:56:32.000000000 -0800 +++ Xorg-new-size/xc/programs/Xserver/GL/glx/rensize.c 2005-04-12 16:33:07.000000000 -0700 @@ -38,138 +38,20 @@ #include "glxserver.h" #include "GL/glxproto.h" #include "unpack.h" -#include "impsize.h" +#include "indirect_size.h" +#include "indirect_reqsize.h" #define SWAPL(a) \ (((a & 0xff000000U)>>24) | ((a & 0xff0000U)>>8) | \ ((a & 0xff00U)<<8) | ((a & 0xffU)<<24)) -int __glXCallListsReqSize(GLbyte *pc, Bool swap ) -{ - GLsizei n = *(GLsizei *)(pc + 0); - GLenum type = *(GLenum *)(pc + 4); - - if (swap) { - n = SWAPL( n ); - type = SWAPL( type ); - } - return __glCallLists_size( n, type ); /* defined in samplegl lib */ -} - -int __glXFogivReqSize(GLbyte *pc, Bool swap ) -{ - GLenum pname = *(GLenum *)(pc + 0); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glFogiv_size( pname ); /* defined in samplegl lib */ -} - -int __glXFogfvReqSize(GLbyte *pc, Bool swap ) -{ - return __glXFogivReqSize( pc, swap ); -} - -int __glXLightfvReqSize(GLbyte *pc, Bool swap ) -{ - GLenum pname = *(GLenum *)(pc + 4); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glLightfv_size( pname ); /* defined in samplegl lib */ -} - -int __glXLightivReqSize(GLbyte *pc, Bool swap ) -{ - return __glXLightfvReqSize( pc, swap ); -} - -int __glXLightModelfvReqSize(GLbyte *pc, Bool swap ) -{ - GLenum pname = *(GLenum *)(pc + 0); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glLightModelfv_size( pname ); /* defined in samplegl lib */ -} - -int __glXLightModelivReqSize(GLbyte *pc, Bool swap ) -{ - return __glXLightModelfvReqSize( pc, swap ); -} - -int __glXMaterialfvReqSize(GLbyte *pc, Bool swap ) -{ - GLenum pname = *(GLenum *)(pc + 4); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glMaterialfv_size( pname ); /* defined in samplegl lib */ -} - -int __glXMaterialivReqSize(GLbyte *pc, Bool swap ) -{ - return __glXMaterialfvReqSize( pc, swap ); -} - -int __glXTexGendvReqSize(GLbyte *pc, Bool swap ) -{ - GLenum pname = *(GLenum *)(pc + 4); - if (swap) { - pname = SWAPL( pname ); - } - return 8 * __glTexGendv_size( pname ); /* defined in samplegl lib */ -} - -int __glXTexGenfvReqSize(GLbyte *pc, Bool swap ) -{ - GLenum pname = *(GLenum *)(pc + 4); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glTexGenfv_size( pname ); /* defined in samplegl lib */ -} - -int __glXTexGenivReqSize(GLbyte *pc, Bool swap ) -{ - return __glXTexGenfvReqSize( pc, swap ); -} - -int __glXTexParameterfvReqSize(GLbyte *pc, Bool swap ) -{ - GLenum pname = *(GLenum *)(pc + 4); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glTexParameterfv_size( pname ); /* defined in samplegl lib */ -} - -int __glXTexParameterivReqSize(GLbyte *pc, Bool swap ) -{ - return __glXTexParameterfvReqSize( pc, swap ); -} - -int __glXTexEnvfvReqSize(GLbyte *pc, Bool swap ) -{ - GLenum pname = *(GLenum *)(pc + 4); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glTexEnvfv_size( pname ); /* defined in samplegl lib */ -} - -int __glXTexEnvivReqSize(GLbyte *pc, Bool swap ) -{ - return __glXTexEnvfvReqSize( pc, swap ); -} - static int Map1Size( GLint k, GLint order) { if (order <= 0 || k < 0) return -1; return k * order; } -int __glXMap1dReqSize(GLbyte *pc, Bool swap ) +int __glXMap1dReqSize( const GLbyte *pc, Bool swap ) { GLenum target; GLint order, k; @@ -180,11 +62,11 @@ target = SWAPL( target ); order = SWAPL( order ); } - k = __glEvalComputeK( target ); + k = __glMap1d_size( target ); return 8 * Map1Size( k, order ); } -int __glXMap1fReqSize(GLbyte *pc, Bool swap ) +int __glXMap1fReqSize( const GLbyte *pc, Bool swap ) { GLenum target; GLint order, k; @@ -195,7 +77,7 @@ target = SWAPL( target ); order = SWAPL( order ); } - k = __glEvalComputeK(target); + k = __glMap1d_size( target ); return 4 * Map1Size(k, order); } @@ -205,7 +87,7 @@ return k * majorOrder * minorOrder; } -int __glXMap2dReqSize(GLbyte *pc, Bool swap ) +int __glXMap2dReqSize( const GLbyte *pc, Bool swap ) { GLenum target; GLint uorder, vorder, k; @@ -218,11 +100,11 @@ uorder = SWAPL( uorder ); vorder = SWAPL( vorder ); } - k = __glEvalComputeK( target ); + k = __glMap2d_size( target ); return 8 * Map2Size( k, uorder, vorder ); } -int __glXMap2fReqSize(GLbyte *pc, Bool swap ) +int __glXMap2fReqSize( const GLbyte *pc, Bool swap ) { GLenum target; GLint uorder, vorder, k; @@ -235,48 +117,14 @@ uorder = SWAPL( uorder ); vorder = SWAPL( vorder ); } - k = __glEvalComputeK( target ); + k = __glMap2d_size( target ); return 4 * Map2Size( k, uorder, vorder ); } -int __glXPixelMapfvReqSize(GLbyte *pc, Bool swap ) -{ - GLint mapsize; - mapsize = *(GLint *)(pc + 4); - if (swap) { - mapsize = SWAPL( mapsize ); - } - return 4 * mapsize; -} - -int __glXPixelMapuivReqSize(GLbyte *pc, Bool swap ) -{ - return __glXPixelMapfvReqSize( pc, swap ); -} - -int __glXPixelMapusvReqSize(GLbyte *pc, Bool swap ) -{ - GLint mapsize; - mapsize = *(GLint *)(pc + 4); - if (swap) { - mapsize = SWAPL( mapsize ); - } - return 2 * mapsize; -} - -int __glXImageSize( GLenum format, GLenum type, GLsizei w, GLsizei h, - GLint rowLength, GLint skipRows, GLint alignment ) -{ - return __glXImage3DSize( format, type, w, h, 1, 0, rowLength, - 0, skipRows, alignment ); -} - -/* XXX - * This should be folded into __glXImageSize(). - */ -int __glXImage3DSize( GLenum format, GLenum type, GLsizei w, GLsizei h, - GLsizei d, GLint imageHeight, GLint rowLength, - GLint skipImages, GLint skipRows, GLint alignment ) +int __glXImageSize( GLenum format, GLenum type, GLenum target, + GLsizei w, GLsizei h, GLsizei d, + GLint imageHeight, GLint rowLength, + GLint skipImages, GLint skipRows, GLint alignment ) { GLint bytesPerElement, elementsPerGroup, groupsPerRow; GLint groupSize, rowSize, padding, imageSize; @@ -288,6 +136,22 @@ } if (w==0 || h==0 || d == 0) return 0; + switch( target ) { + case GL_PROXY_TEXTURE_1D: + case GL_PROXY_TEXTURE_2D: + case GL_PROXY_TEXTURE_3D: + case GL_PROXY_TEXTURE_4D_SGIS: + case GL_PROXY_TEXTURE_CUBE_MAP: + case GL_PROXY_TEXTURE_RECTANGLE_ARB: + case GL_PROXY_HISTOGRAM: + case GL_PROXY_COLOR_TABLE: + case GL_PROXY_TEXTURE_COLOR_TABLE_SGI: + case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE: + case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE: + case GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP: + return 0; + } + if (type == GL_BITMAP) { if (rowLength > 0) { groupsPerRow = rowLength; @@ -401,107 +265,6 @@ } -int __glXDrawPixelsReqSize(GLbyte *pc, Bool swap ) -{ - __GLXdispatchDrawPixelsHeader *hdr = (__GLXdispatchDrawPixelsHeader *) pc; - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint h = hdr->height; - GLint rowLength = hdr->rowLength; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - - if (swap) { - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - h = SWAPL( h ); - rowLength = SWAPL( rowLength ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - return __glXImageSize( format, type, w, h, rowLength, skipRows, alignment ); -} - -int __glXBitmapReqSize(GLbyte *pc, Bool swap ) -{ - __GLXdispatchBitmapHeader *hdr = (__GLXdispatchBitmapHeader *) pc; - GLint w = hdr->width; - GLint h = hdr->height; - GLint rowLength = hdr->rowLength; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - - if (swap) { - w = SWAPL( w ); - h = SWAPL( h ); - rowLength = SWAPL( rowLength ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - return __glXImageSize( GL_COLOR_INDEX, GL_BITMAP, w, h, - rowLength, skipRows, alignment ); -} - -int __glXTexImage1DReqSize(GLbyte *pc, Bool swap ) -{ - __GLXdispatchTexImageHeader *hdr = (__GLXdispatchTexImageHeader *) pc; - GLenum target = hdr->target; - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint rowLength = hdr->rowLength; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - - if (swap) { - target = SWAPL( target ); - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - rowLength = SWAPL( rowLength ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - if (target == GL_PROXY_TEXTURE_1D) { - return 0; - } else if (format == GL_STENCIL_INDEX || format == GL_DEPTH_COMPONENT) { - return -1; - } - return __glXImageSize( format, type, w, 1, rowLength, skipRows, alignment ); -} - -int __glXTexImage2DReqSize(GLbyte *pc, Bool swap ) -{ - __GLXdispatchTexImageHeader *hdr = (__GLXdispatchTexImageHeader *) pc; - GLenum target = hdr->target; - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint h = hdr->height; - GLint rowLength = hdr->rowLength; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - - if (swap) { - target = SWAPL( target ); - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - h = SWAPL( h ); - rowLength = SWAPL( rowLength ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - if (target == GL_PROXY_TEXTURE_2D || target == GL_PROXY_TEXTURE_CUBE_MAP_ARB) { - return 0; - } else if (format == GL_STENCIL_INDEX || format == GL_DEPTH_COMPONENT) { - return -1; - } - return __glXImageSize( format, type, w, h, rowLength, skipRows, alignment ); -} - /* XXX this is used elsewhere - should it be exported from glxserver.h? */ int __glXTypeSize(GLenum enm) { @@ -518,7 +281,7 @@ } } -int __glXDrawArraysSize( GLbyte *pc, Bool swap ) +int __glXDrawArraysReqSize( const GLbyte *pc, Bool swap ) { __GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *) pc; __GLXdispatchDrawArraysComponentHeader *compHeader; @@ -585,215 +348,7 @@ (numVertexes * arrayElementSize)); } -int __glXPrioritizeTexturesReqSize(GLbyte *pc, Bool swap ) -{ - GLint n = *(GLsizei *)(pc + 0); - if (swap) n = SWAPL(n); - return(8*n); /* 4*n for textures, 4*n for priorities */ -} - -int __glXTexSubImage1DReqSize(GLbyte *pc, Bool swap ) -{ - __GLXdispatchTexSubImageHeader *hdr = (__GLXdispatchTexSubImageHeader *) pc; - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint rowLength = hdr->rowLength; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - - if (swap) { - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - rowLength = SWAPL( rowLength ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - return __glXImageSize( format, type, w, 1, rowLength, skipRows, alignment ); -} - -int __glXTexSubImage2DReqSize(GLbyte *pc, Bool swap ) -{ - __GLXdispatchTexSubImageHeader *hdr = (__GLXdispatchTexSubImageHeader *) pc; - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint h = hdr->height; - GLint rowLength = hdr->rowLength; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - - if (swap) { - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - h = SWAPL( h ); - rowLength = SWAPL( rowLength ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - return __glXImageSize( format, type, w, h, rowLength, skipRows, alignment ); -} - -int __glXTexImage3DReqSize(GLbyte *pc, Bool swap ) -{ - __GLXdispatchTexImage3DHeader *hdr = (__GLXdispatchTexImage3DHeader *) pc; - GLenum target = hdr->target; - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint h = hdr->height; - GLint d = hdr->depth; - GLint imageHeight = hdr->imageHeight; - GLint rowLength = hdr->rowLength; - GLint skipImages = hdr->skipImages; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - GLint nullImage = hdr->nullimage; - - if (swap) { - target = SWAPL( target ); - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - h = SWAPL( h ); - d = SWAPL( d ); - imageHeight = SWAPL( imageHeight ); - rowLength = SWAPL( rowLength ); - skipImages = SWAPL( skipImages ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - if (target == GL_PROXY_TEXTURE_3D || nullImage) { - return 0; - } else { - return __glXImage3DSize( format, type, w, h, d, imageHeight, - rowLength, skipImages, skipRows, - alignment); - } -} - -int __glXTexSubImage3DReqSize(GLbyte *pc, Bool swap ) -{ - __GLXdispatchTexSubImage3DHeader *hdr = - (__GLXdispatchTexSubImage3DHeader *) pc; - GLenum target = hdr->target; - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint h = hdr->height; - GLint d = hdr->depth; - GLint imageHeight = hdr->imageHeight; - GLint rowLength = hdr->rowLength; - GLint skipImages = hdr->skipImages; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - - if (swap) { - target = SWAPL( target ); - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - h = SWAPL( h ); - d = SWAPL( d ); - imageHeight = SWAPL( imageHeight ); - rowLength = SWAPL( rowLength ); - skipImages = SWAPL( skipImages ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - if (target == GL_PROXY_TEXTURE_3D) { - return 0; - } else { - return __glXImage3DSize( format, type, w, h, d, imageHeight, - rowLength, skipImages, skipRows, - alignment); - } -} - -int __glXConvolutionFilter1DReqSize(GLbyte *pc, Bool swap ) -{ - __GLXdispatchConvolutionFilterHeader *hdr = - (__GLXdispatchConvolutionFilterHeader *) pc; - - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint rowLength = hdr->rowLength; - GLint alignment = hdr->alignment; - - if (swap) { - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - rowLength = SWAPL( rowLength ); - alignment = SWAPL( alignment ); - } - - return __glXImageSize ( format, type, w, 1, rowLength, 0, alignment ); -} - -int __glXConvolutionFilter2DReqSize(GLbyte *pc, Bool swap ) -{ - __GLXdispatchConvolutionFilterHeader *hdr = - (__GLXdispatchConvolutionFilterHeader *) pc; - - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint h = hdr->height; - GLint rowLength = hdr->rowLength; - GLint skipRows = hdr->skipRows; - GLint alignment = hdr->alignment; - - if (swap) { - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - h = SWAPL( h ); - rowLength = SWAPL( rowLength ); - skipRows = SWAPL( skipRows ); - alignment = SWAPL( alignment ); - } - - return __glXImageSize ( format, type, w, h, rowLength, skipRows, alignment ); -} - -int __glXConvolutionParameterivSize(GLenum pname) -{ - switch (pname) { - case GL_CONVOLUTION_BORDER_COLOR: - case GL_CONVOLUTION_FILTER_SCALE: - case GL_CONVOLUTION_FILTER_BIAS: - return 4; - case GL_CONVOLUTION_BORDER_MODE: - return 1; - default: - return -1; - } -} - -int __glXConvolutionParameterfvSize(GLenum pname) -{ - return __glXConvolutionParameterivSize(pname); -} - -int __glXConvolutionParameterivReqSize(GLbyte *pc, Bool swap ) -{ - GLenum pname = *(GLenum *)(pc + 4); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glXConvolutionParameterivSize( pname ); -} - -int __glXConvolutionParameterfvReqSize(GLbyte *pc, Bool swap ) -{ - return __glXConvolutionParameterivReqSize( pc, swap ); -} - -int __glXSeparableFilter2DReqSize(GLbyte *pc, Bool swap ) +int __glXSeparableFilter2DReqSize( const GLbyte *pc, Bool swap ) { __GLXdispatchConvolutionFilterHeader *hdr = (__GLXdispatchConvolutionFilterHeader *) pc; @@ -816,113 +371,8 @@ } /* XXX Should rowLength be used for either or both image? */ - image1size = __glXImageSize ( format, type, w, 1, rowLength, 0, alignment ); + image1size = __glXImageSize ( format, type, 0, w, 1, 1, 0, rowLength, 0, 0, alignment ); image1size = __GLX_PAD(image1size); - image2size = __glXImageSize ( format, type, h, 1, rowLength, 0, alignment ); + image2size = __glXImageSize ( format, type, 0, h, 1, 1, 0, rowLength, 0, 0, alignment ); return image1size + image2size; - -} - -int __glXColorTableParameterfvSize(GLenum pname) -{ - /* currently, only scale and bias are supported; return RGBA */ - switch(pname) { - case GL_COLOR_TABLE_SCALE: - case GL_COLOR_TABLE_BIAS: - return 4; - default: - return 0; - } -} - -int __glXColorTableParameterivSize(GLenum pname) -{ - /* fv and iv are the same in this context */ - return __glXColorTableParameterfvSize(pname); -} - -int __glXColorTableReqSize(GLbyte *pc, Bool swap ) -{ - __GLXdispatchColorTableHeader *hdr = - (__GLXdispatchColorTableHeader *) pc; - - GLenum target = hdr->target; - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint w = hdr->width; - GLint rowLength = hdr->rowLength; - GLint alignment = hdr->alignment; - - switch (target) { - case GL_PROXY_TEXTURE_1D: - case GL_PROXY_TEXTURE_2D: - case GL_PROXY_TEXTURE_3D: - case GL_PROXY_COLOR_TABLE: - case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE: - case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE: - case GL_PROXY_TEXTURE_CUBE_MAP_ARB: - return 0; - } - - if (swap) { - format = SWAPL( format ); - type = SWAPL( type ); - w = SWAPL( w ); - rowLength = SWAPL( rowLength ); - alignment = SWAPL( alignment ); - } - - return __glXImageSize ( format, type, w, 1, rowLength, 0, alignment ); -} - -int __glXColorSubTableReqSize(GLbyte *pc, Bool swap ) -{ - __GLXdispatchColorSubTableHeader *hdr = - (__GLXdispatchColorSubTableHeader *) pc; - - GLenum format = hdr->format; - GLenum type = hdr->type; - GLint count = hdr->count; - GLint rowLength = hdr->rowLength; - GLint alignment = hdr->alignment; - - if (swap) { - format = SWAPL( format ); - type = SWAPL( type ); - count = SWAPL( count ); - rowLength = SWAPL( rowLength ); - alignment = SWAPL( alignment ); - } - - return __glXImageSize ( format, type, count, 1, rowLength, 0, alignment ); -} - -int __glXColorTableParameterfvReqSize(GLbyte *pc, Bool swap ) -{ - GLenum pname = *(GLenum *)(pc + 4); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glXColorTableParameterfvSize(pname); -} - -int __glXColorTableParameterivReqSize(GLbyte *pc, Bool swap ) -{ - /* no difference between fv and iv versions */ - return __glXColorTableParameterfvReqSize(pc, swap); -} - -int __glXPointParameterfvARBReqSize(GLbyte *pc, Bool swap ) -{ - GLenum pname = *(GLenum *)(pc + 0); - if (swap) { - pname = SWAPL( pname ); - } - return 4 * __glPointParameterfvARB_size( pname ); -} - -int __glXPointParameterivReqSize(GLbyte *pc, Bool swap ) -{ - /* no difference between fv and iv versions */ - return __glXPointParameterfvARBReqSize(pc, swap); } diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/glx/rensizetab.c Xorg-new-size/xc/programs/Xserver/GL/glx/rensizetab.c --- Xorg-new-Mesa/xc/programs/Xserver/GL/glx/rensizetab.c 2005-01-18 10:56:32.000000000 -0800 +++ Xorg-new-size/xc/programs/Xserver/GL/glx/rensizetab.c 2005-04-12 20:10:08.000000000 -0700 @@ -35,6 +35,7 @@ */ #include "glxserver.h" +#include "indirect_reqsize.h" #include "g_disptab_EXT.h" __GLXrenderSizeData __glXRenderSizeTable[__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN_RENDER_OPCODE_EXT + 1] = { @@ -231,7 +232,7 @@ /* Translatef */ { 16, 0 }, /* Viewport */ { 20, 0 }, /* PolygonOffset */ { 12, 0 }, - /* DrawArrays */ { 16, __glXDrawArraysSize }, + /* DrawArrays */ { 16, __glXDrawArraysReqSize }, /* Indexubv */ { 8, 0 }, /* ColorSubTable */ { 44, __glXColorSubTableReqSize }, /* CopyColorSubTable */ { 24, 0 }, @@ -284,7 +285,7 @@ /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, /* PointParameterfARB 2065 */ { 12, 0 }, - /* PointParameterfvARB 2066 */ { 8, __glXPointParameterfvARBReqSize }, + /* PointParameterfvARB 2066 */ { 8, __glXPointParameterfvEXTReqSize }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, /* no such opcode */ { 0, 0 }, @@ -2334,7 +2335,7 @@ /* ResetMinmax */ { 8, }, /* TexImage3D */ { 84, __glXTexImage3DReqSize }, /* TexSubImage3D */ { 92, __glXTexSubImage3DReqSize }, - /* DrawArrays */ { 16, __glXDrawArraysSize }, + /* DrawArrays */ { 16, __glXDrawArraysReqSize }, /* BindTexture */ { 12, 0 }, /* PrioritizeTextures */ { 8, __glXPrioritizeTexturesReqSize }, /* CopyTexImage1D */ { 32, 0 }, @@ -2440,5 +2441,5 @@ /* no such opcode */ { 0, 0 }, /* ActiveStencilFaceEXT 4220 */ { 8, 0 }, /* PointParameteri 4221 */ { 12, 0 }, - /* PointParameteriv 4222 */ { 8, __glXPointParameterivReqSize }, + /* PointParameteriv 4222 */ { 8, __glXPointParameterivNVReqSize }, }; diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/glx/singlesize.c Xorg-new-size/xc/programs/Xserver/GL/glx/singlesize.c --- Xorg-new-Mesa/xc/programs/Xserver/GL/glx/singlesize.c 2005-01-18 10:56:32.000000000 -0800 +++ Xorg-new-size/xc/programs/Xserver/GL/glx/singlesize.c 2005-04-13 10:16:22.000000000 -0700 @@ -37,6 +37,9 @@ #include #include "glxserver.h" #include "singlesize.h" +#include "glapitable.h" +#include "glapi.h" +#include "glthread.h" /* ** These routines compute the size of variable-size returned parameters. @@ -47,184 +50,7 @@ GLint __glReadPixels_size(GLenum format, GLenum type, GLint w, GLint h) { - return __glXImage3DSize( format, type, w, h, 1, 0, 0, 0, 0, 4 ); -} - -/** - * Determine the number of data elements that go with the specified \c pname - * to a \c glGetTexEnvfv or \c glGetTexEnviv call. - * - * \todo - * Replace this function with a call to \c __glTexEnvfv_size. Make that there - * aren't any values of \c pname that are valid for one but not the other. - */ -GLint __glGetTexEnvfv_size(GLenum pname) -{ - switch (pname) { - case GL_TEXTURE_ENV_MODE: - case GL_TEXTURE_LOD_BIAS: - case GL_COMBINE_RGB: - case GL_COMBINE_ALPHA: - case GL_SOURCE0_RGB: - case GL_SOURCE1_RGB: - case GL_SOURCE2_RGB: - case GL_SOURCE0_ALPHA: - case GL_SOURCE1_ALPHA: - case GL_SOURCE2_ALPHA: - case GL_OPERAND0_RGB: - case GL_OPERAND1_RGB: - case GL_OPERAND2_RGB: - case GL_OPERAND0_ALPHA: - case GL_OPERAND1_ALPHA: - case GL_OPERAND2_ALPHA: - case GL_RGB_SCALE: - case GL_ALPHA_SCALE: - - /* GL_ARB_point_sprite / GL_NV_point_sprite */ - case GL_COORD_REPLACE_ARB: - - /* GL_NV_texture_env_combine4 */ - case GL_SOURCE3_RGB_NV: - case GL_SOURCE3_ALPHA_NV: - case GL_OPERAND3_RGB_NV: - case GL_OPERAND3_ALPHA_NV: - return 1; - - case GL_TEXTURE_ENV_COLOR: - return 4; - default: - return -1; - } -} - - -GLint __glGetTexEnviv_size(GLenum pname) -{ - return __glGetTexEnvfv_size(pname); -} - -GLint __glGetTexGenfv_size(GLenum pname) -{ - switch (pname) { - case GL_TEXTURE_GEN_MODE: - return 1; - case GL_OBJECT_PLANE: - return 4; - case GL_EYE_PLANE: - return 4; - default: - return -1; - } -} - -GLint __glGetTexGendv_size(GLenum pname) -{ - return __glGetTexGenfv_size(pname); -} - -GLint __glGetTexGeniv_size(GLenum pname) -{ - return __glGetTexGenfv_size(pname); -} - -GLint __glGetTexParameterfv_size(GLenum pname) -{ - switch (pname) { - case GL_TEXTURE_BORDER_COLOR: - return 4; - - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_MAG_FILTER: - case GL_TEXTURE_PRIORITY: - case GL_TEXTURE_RESIDENT: - - /* GL_SGIS_texture_lod / GL_EXT_texture_lod / GL 1.2 */ - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - case GL_TEXTURE_BASE_LEVEL: - case GL_TEXTURE_MAX_LEVEL: - - /* GL_SGIX_texture_lod_bias */ - case GL_TEXTURE_LOD_BIAS_S_SGIX: - case GL_TEXTURE_LOD_BIAS_T_SGIX: - case GL_TEXTURE_LOD_BIAS_R_SGIX: - - /* GL_ARB_shadow / GL 1.4 */ - case GL_TEXTURE_COMPARE_MODE: - case GL_TEXTURE_COMPARE_FUNC: - - /* GL_SGIS_generate_mipmap / GL 1.4 */ - case GL_GENERATE_MIPMAP: - - /* GL_ARB_depth_texture / GL 1.4 */ - case GL_DEPTH_TEXTURE_MODE: - - /* GL_EXT_texture_lod_bias / GL 1.4 */ - case GL_TEXTURE_LOD_BIAS: - - /* GL_SGIX_shadow_ambient / GL_ARB_shadow_ambient */ - case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: - - /* GL_SGIX_shadow */ - case GL_TEXTURE_COMPARE_SGIX: - case GL_TEXTURE_COMPARE_OPERATOR_SGIX: - - /* GL_SGIX_texture_coordinate_clamp */ - case GL_TEXTURE_MAX_CLAMP_S_SGIX: - case GL_TEXTURE_MAX_CLAMP_T_SGIX: - case GL_TEXTURE_MAX_CLAMP_R_SGIX: - - /* GL_EXT_texture_filter_anisotropic */ - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - - /* GL_NV_texture_expand_normal */ - case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: - return 1; - - default: - return -1; - } -} - -GLint __glGetTexParameteriv_size(GLenum pname) -{ - return __glGetTexParameterfv_size(pname); -} - -GLint __glGetLightfv_size(GLenum pname) -{ - switch (pname) { - case GL_AMBIENT: - return 4; - case GL_DIFFUSE: - return 4; - case GL_SPECULAR: - return 4; - case GL_POSITION: - return 4; - case GL_SPOT_DIRECTION: - return 3; - case GL_SPOT_EXPONENT: - return 1; - case GL_SPOT_CUTOFF: - return 1; - case GL_CONSTANT_ATTENUATION: - return 1; - case GL_LINEAR_ATTENUATION: - return 1; - case GL_QUADRATIC_ATTENUATION: - return 1; - default: - return -1; - } -} - -GLint __glGetLightiv_size(GLenum pname) -{ - return __glGetLightfv_size(pname); + return __glXImageSize( format, type, 0, w, h, 1, 0, 0, 0, 0, 4 ); } static GLint EvalComputeK(GLenum target) @@ -330,33 +156,6 @@ return __glGetMap_size(target, query); } -GLint __glGetMaterialfv_size(GLenum pname) -{ - switch (pname) { - case GL_SHININESS: - return 1; - case GL_COLOR_INDEXES: - return 3; - case GL_EMISSION: - return 4; - case GL_AMBIENT: - return 4; - case GL_DIFFUSE: - return 4; - case GL_SPECULAR: - return 4; - case GL_AMBIENT_AND_DIFFUSE: - return 4; - default: - return -1; - } -} - -GLint __glGetMaterialiv_size(GLenum pname) -{ - return __glGetMaterialfv_size(pname); -} - GLint __glGetPixelMap_size(GLenum map) { GLint size; @@ -415,833 +214,9 @@ return __glGetPixelMap_size(map); } -/* -** Return the number of words needed to pass back the requested -** value. -*/ -GLint __glGet_size(GLenum sq) -{ - switch (sq) { - case GL_MAX_TEXTURE_SIZE: - return 1; - case GL_SUBPIXEL_BITS: - return 1; - case GL_MAX_LIST_NESTING: - return 1; - case GL_MAP1_COLOR_4: - case GL_MAP1_INDEX: - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_1: - case GL_MAP1_TEXTURE_COORD_2: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP1_VERTEX_3: - case GL_MAP1_VERTEX_4: - return 1; - case GL_MAP2_COLOR_4: - case GL_MAP2_INDEX: - case GL_MAP2_NORMAL: - case GL_MAP2_TEXTURE_COORD_1: - case GL_MAP2_TEXTURE_COORD_2: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_3: - case GL_MAP2_VERTEX_4: - return 1; - case GL_AUTO_NORMAL: - return 1; - case GL_CURRENT_COLOR: - return 4; - case GL_CURRENT_INDEX: - return 1; - case GL_CURRENT_NORMAL: - return 3; - case GL_CURRENT_TEXTURE_COORDS: - return 4; - case GL_CURRENT_RASTER_INDEX: - return 1; - case GL_CURRENT_RASTER_COLOR: - return 4; - case GL_CURRENT_RASTER_TEXTURE_COORDS: - return 4; - case GL_CURRENT_RASTER_POSITION: - return 4; - case GL_CURRENT_RASTER_POSITION_VALID: - return 1; - case GL_CURRENT_RASTER_DISTANCE: - return 1; - case GL_POINT_SIZE: - return 1; - case GL_POINT_SIZE_RANGE: - /* case GL_SMOOTH_POINT_SIZE_RANGE: */ /* alias */ - return 2; - case GL_POINT_SIZE_GRANULARITY: - /* case GL_SMOOTH_POINT_SIZE_GRANULARITY: */ /* alias */ - return 1; - case GL_ALIASED_POINT_SIZE_RANGE: - return 2; - case GL_POINT_SMOOTH: - return 1; - case GL_LINE_SMOOTH: - return 1; - case GL_LINE_WIDTH: - return 1; - case GL_LINE_WIDTH_RANGE: - /* case GL_SMOOTH_LINE_WIDTH_RANGE: */ /* alias */ - return 2; - case GL_LINE_WIDTH_GRANULARITY: - /* case GL_SMOOTH_LINE_WIDTH_GRANULARITY: */ /* alias */ - return 1; - case GL_ALIASED_LINE_WIDTH_RANGE: - return 2; - case GL_LINE_STIPPLE_PATTERN: - return 1; - case GL_LINE_STIPPLE_REPEAT: - return 1; - case GL_LINE_STIPPLE: - return 1; - case GL_POLYGON_MODE: - return 2; - case GL_POLYGON_SMOOTH: - return 1; - case GL_POLYGON_STIPPLE: - return 1; - case GL_EDGE_FLAG: - return 1; - case GL_CULL_FACE: - return 1; - case GL_CULL_FACE_MODE: - return 1; - case GL_FRONT_FACE: - return 1; - case GL_LIGHTING: - return 1; - case GL_LIGHT_MODEL_LOCAL_VIEWER: - return 1; - case GL_LIGHT_MODEL_TWO_SIDE: - return 1; - case GL_LIGHT_MODEL_AMBIENT: - return 4; - case GL_LIGHT_MODEL_COLOR_CONTROL: - return 1; - case GL_COLOR_MATERIAL: - return 1; - case GL_COLOR_MATERIAL_FACE: - return 1; - case GL_COLOR_MATERIAL_PARAMETER: - return 1; - case GL_SHADE_MODEL: - return 1; - case GL_FOG: - return 1; - case GL_FOG_INDEX: - return 1; - case GL_FOG_DENSITY: - return 1; - case GL_FOG_START: - return 1; - case GL_FOG_END: - return 1; - case GL_FOG_MODE: - return 1; - case GL_FOG_COLOR: - return 4; - case GL_DEPTH_RANGE: - return 2; - case GL_DEPTH_TEST: - return 1; - case GL_DEPTH_WRITEMASK: - return 1; - case GL_DEPTH_CLEAR_VALUE: - return 1; - case GL_DEPTH_FUNC: - return 1; - case GL_ACCUM_CLEAR_VALUE: - return 4; - case GL_STENCIL_TEST: - return 1; - case GL_STENCIL_CLEAR_VALUE: - return 1; - case GL_STENCIL_FUNC: - return 1; - case GL_STENCIL_VALUE_MASK: - return 1; - case GL_STENCIL_FAIL: - return 1; - case GL_STENCIL_PASS_DEPTH_FAIL: - return 1; - case GL_STENCIL_PASS_DEPTH_PASS: - return 1; - case GL_STENCIL_REF: - return 1; - case GL_STENCIL_WRITEMASK: - return 1; - case GL_MATRIX_MODE: - return 1; - case GL_NORMALIZE: - return 1; - case GL_VIEWPORT: - return 4; - case GL_ATTRIB_STACK_DEPTH: - return 1; - case GL_MODELVIEW_STACK_DEPTH: - return 1; - case GL_PROJECTION_STACK_DEPTH: - return 1; - case GL_TEXTURE_STACK_DEPTH: - return 1; - case GL_MODELVIEW_MATRIX: - return 16; - case GL_PROJECTION_MATRIX: - return 16; - case GL_TEXTURE_MATRIX: - return 16; - case GL_ALPHA_TEST: - return 1; - case GL_ALPHA_TEST_FUNC: - return 1; - case GL_ALPHA_TEST_REF: - return 1; - case GL_DITHER: - return 1; - case GL_BLEND_DST: - return 1; - case GL_BLEND_SRC: - return 1; - case GL_BLEND: - return 1; - case GL_LOGIC_OP_MODE: - return 1; - case GL_LOGIC_OP: - return 1; - case GL_DRAW_BUFFER: - return 1; - case GL_READ_BUFFER: - return 1; - case GL_SCISSOR_TEST: - return 1; - case GL_SCISSOR_BOX: - return 4; - case GL_INDEX_CLEAR_VALUE: - return 1; - case GL_INDEX_MODE: - return 1; - case GL_INDEX_WRITEMASK: - return 1; - case GL_COLOR_CLEAR_VALUE: - return 4; - case GL_RGBA_MODE: - return 1; - case GL_COLOR_WRITEMASK: - return 4; - case GL_RENDER_MODE: - return 1; - case GL_PERSPECTIVE_CORRECTION_HINT: - return 1; - case GL_POINT_SMOOTH_HINT: - return 1; - case GL_LINE_SMOOTH_HINT: - return 1; - case GL_POLYGON_SMOOTH_HINT: - return 1; - case GL_FOG_HINT: - return 1; - case GL_LIST_BASE: - return 1; - case GL_LIST_INDEX: - return 1; - case GL_LIST_MODE: - return 1; - case GL_TEXTURE_GEN_S: - return 1; - case GL_TEXTURE_GEN_T: - return 1; - case GL_TEXTURE_GEN_R: - return 1; - case GL_TEXTURE_GEN_Q: - return 1; - case GL_PACK_SWAP_BYTES: - return 1; - case GL_PACK_LSB_FIRST: - return 1; - case GL_PACK_ROW_LENGTH: - return 1; - case GL_PACK_IMAGE_HEIGHT: - return 1; - case GL_PACK_SKIP_ROWS: - return 1; - case GL_PACK_SKIP_PIXELS: - return 1; - case GL_PACK_SKIP_IMAGES: - return 1; - case GL_PACK_ALIGNMENT: - return 1; - case GL_UNPACK_SWAP_BYTES: - return 1; - case GL_UNPACK_LSB_FIRST: - return 1; - case GL_UNPACK_ROW_LENGTH: - return 1; - case GL_UNPACK_IMAGE_HEIGHT: - return 1; - case GL_UNPACK_SKIP_ROWS: - return 1; - case GL_UNPACK_SKIP_PIXELS: - return 1; - case GL_UNPACK_SKIP_IMAGES: - return 1; - case GL_UNPACK_ALIGNMENT: - return 1; - case GL_MAP_COLOR: - return 1; - case GL_MAP_STENCIL: - return 1; - case GL_INDEX_SHIFT: - return 1; - case GL_INDEX_OFFSET: - return 1; - case GL_RED_SCALE: - case GL_GREEN_SCALE: - case GL_BLUE_SCALE: - case GL_ALPHA_SCALE: - case GL_DEPTH_SCALE: - return 1; - case GL_RED_BIAS: - case GL_GREEN_BIAS: - case GL_BLUE_BIAS: - case GL_ALPHA_BIAS: - case GL_DEPTH_BIAS: - return 1; - case GL_ZOOM_X: - case GL_ZOOM_Y: - return 1; - case GL_PIXEL_MAP_I_TO_I_SIZE: case GL_PIXEL_MAP_S_TO_S_SIZE: - case GL_PIXEL_MAP_I_TO_R_SIZE: case GL_PIXEL_MAP_I_TO_G_SIZE: - case GL_PIXEL_MAP_I_TO_B_SIZE: case GL_PIXEL_MAP_I_TO_A_SIZE: - case GL_PIXEL_MAP_R_TO_R_SIZE: case GL_PIXEL_MAP_G_TO_G_SIZE: - case GL_PIXEL_MAP_B_TO_B_SIZE: case GL_PIXEL_MAP_A_TO_A_SIZE: - return 1; - case GL_MAX_EVAL_ORDER: - return 1; - case GL_MAX_LIGHTS: - return 1; - case GL_MAX_CLIP_PLANES: - return 1; - case GL_MAX_PIXEL_MAP_TABLE: - return 1; - case GL_MAX_ATTRIB_STACK_DEPTH: - return 1; - case GL_MAX_MODELVIEW_STACK_DEPTH: - return 1; - case GL_MAX_NAME_STACK_DEPTH: - return 1; - case GL_MAX_PROJECTION_STACK_DEPTH: - return 1; - case GL_MAX_TEXTURE_STACK_DEPTH: - return 1; - case GL_INDEX_BITS: - return 1; - case GL_RED_BITS: - return 1; - case GL_GREEN_BITS: - return 1; - case GL_BLUE_BITS: - return 1; - case GL_ALPHA_BITS: - return 1; - case GL_DEPTH_BITS: - return 1; - case GL_STENCIL_BITS: - return 1; - case GL_ACCUM_RED_BITS: - case GL_ACCUM_GREEN_BITS: - case GL_ACCUM_BLUE_BITS: - case GL_ACCUM_ALPHA_BITS: - return 1; - case GL_MAP1_GRID_DOMAIN: - return 2; - case GL_MAP1_GRID_SEGMENTS: - return 1; - case GL_MAP2_GRID_DOMAIN: - return 4; - case GL_MAP2_GRID_SEGMENTS: - return 2; - case GL_TEXTURE_1D: - case GL_TEXTURE_2D: - case GL_TEXTURE_3D: - return 1; - case GL_NAME_STACK_DEPTH: - return 1; - case GL_MAX_VIEWPORT_DIMS: - return 2; - case GL_DOUBLEBUFFER: - return 1; - case GL_AUX_BUFFERS: - return 1; - case GL_STEREO: - return 1; - case GL_CLIP_PLANE0: case GL_CLIP_PLANE1: - case GL_CLIP_PLANE2: case GL_CLIP_PLANE3: - case GL_CLIP_PLANE4: case GL_CLIP_PLANE5: - return 1; - case GL_LIGHT0: case GL_LIGHT1: - case GL_LIGHT2: case GL_LIGHT3: - case GL_LIGHT4: case GL_LIGHT5: - case GL_LIGHT6: case GL_LIGHT7: - return 1; - case GL_VERTEX_ARRAY: - case GL_VERTEX_ARRAY_SIZE: - case GL_VERTEX_ARRAY_TYPE: - case GL_VERTEX_ARRAY_STRIDE: - case GL_NORMAL_ARRAY: - case GL_NORMAL_ARRAY_TYPE: - case GL_NORMAL_ARRAY_STRIDE: - case GL_COLOR_ARRAY: - case GL_COLOR_ARRAY_SIZE: - case GL_COLOR_ARRAY_TYPE: - case GL_COLOR_ARRAY_STRIDE: - case GL_INDEX_ARRAY: - case GL_INDEX_ARRAY_TYPE: - case GL_INDEX_ARRAY_STRIDE: - case GL_TEXTURE_COORD_ARRAY: - case GL_TEXTURE_COORD_ARRAY_SIZE: - case GL_TEXTURE_COORD_ARRAY_TYPE: - case GL_TEXTURE_COORD_ARRAY_STRIDE: - case GL_EDGE_FLAG_ARRAY: - case GL_EDGE_FLAG_ARRAY_STRIDE: - return 1; - case GL_TEXTURE_BINDING_1D: - case GL_TEXTURE_BINDING_2D: - case GL_TEXTURE_BINDING_3D: - return 1; - case GL_BLEND_COLOR: - return 4; - case GL_BLEND_EQUATION: - return 1; - case GL_COLOR_MATRIX: - return 16; - case GL_COLOR_MATRIX_STACK_DEPTH: - return 1; - case GL_COLOR_TABLE: - case GL_POST_CONVOLUTION_COLOR_TABLE: - case GL_POST_COLOR_MATRIX_COLOR_TABLE: - case GL_CONVOLUTION_1D: - case GL_CONVOLUTION_2D: - case GL_SEPARABLE_2D: - case GL_HISTOGRAM: - case GL_MINMAX: - return 1; - case GL_POLYGON_OFFSET_FACTOR: - case GL_POLYGON_OFFSET_UNITS: - return 1; - case GL_POST_CONVOLUTION_RED_SCALE: - case GL_POST_CONVOLUTION_GREEN_SCALE: - case GL_POST_CONVOLUTION_BLUE_SCALE: - case GL_POST_CONVOLUTION_ALPHA_SCALE: - case GL_POST_CONVOLUTION_RED_BIAS: - case GL_POST_CONVOLUTION_GREEN_BIAS: - case GL_POST_CONVOLUTION_BLUE_BIAS: - case GL_POST_CONVOLUTION_ALPHA_BIAS: - return 1; - case GL_POST_COLOR_MATRIX_RED_SCALE: - case GL_POST_COLOR_MATRIX_GREEN_SCALE: - case GL_POST_COLOR_MATRIX_BLUE_SCALE: - case GL_POST_COLOR_MATRIX_ALPHA_SCALE: - case GL_POST_COLOR_MATRIX_RED_BIAS: - case GL_POST_COLOR_MATRIX_GREEN_BIAS: - case GL_POST_COLOR_MATRIX_BLUE_BIAS: - case GL_POST_COLOR_MATRIX_ALPHA_BIAS: - return 1; - case GL_RESCALE_NORMAL: - return 1; - case GL_MAX_ELEMENTS_INDICES: - case GL_MAX_ELEMENTS_VERTICES: - return 1; - case GL_ACTIVE_TEXTURE_ARB: - case GL_CLIENT_ACTIVE_TEXTURE_ARB: - case GL_MAX_TEXTURE_UNITS_ARB: - return 1; - case GL_MAX_COLOR_MATRIX_STACK_DEPTH: - case GL_MAX_CONVOLUTION_WIDTH: - case GL_MAX_CONVOLUTION_HEIGHT: - return 1; - case GL_OCCLUSION_TEST_RESULT_HP: - case GL_OCCLUSION_TEST_HP: - return 1; - case GL_PACK_INVERT_MESA: - return 1; - case GL_CULL_VERTEX_IBM: - return 1; - case GL_RASTER_POSITION_UNCLIPPED_IBM: - return 1; - - /* GL_ARB_texture_cube_map / GL 1.3 */ - case GL_TEXTURE_CUBE_MAP: - case GL_TEXTURE_BINDING_CUBE_MAP: - case GL_MAX_CUBE_MAP_TEXTURE_SIZE: - - /* GL_ARB_multisample / GL 1.3 */ - case GL_MULTISAMPLE: - case GL_SAMPLE_ALPHA_TO_COVERAGE: - case GL_SAMPLE_ALPHA_TO_ONE: - case GL_SAMPLE_COVERAGE: - case GL_SAMPLE_BUFFERS: - case GL_SAMPLES: - case GL_SAMPLE_COVERAGE_VALUE: - case GL_SAMPLE_COVERAGE_INVERT: - - /* GL_ARB_texture_comrpession / GL 1.3 */ - case GL_TEXTURE_COMPRESSION_HINT: - case GL_NUM_COMPRESSED_TEXTURE_FORMATS: - - /* GL_EXT_blend_func_separate / GL 1.4 */ - case GL_BLEND_DST_RGB: - case GL_BLEND_SRC_RGB: - case GL_BLEND_DST_ALPHA: - case GL_BLEND_SRC_ALPHA: - - /* GL_EXT_fog_coord / GL 1.4 */ - case GL_CURRENT_FOG_COORD: - case GL_FOG_COORD_ARRAY_TYPE: - case GL_FOG_COORD_ARRAY_STRIDE: - case GL_FOG_COORD_ARRAY: - case GL_FOG_COORD_SRC: - - /* GL_EXT_secondary_color / GL 1.4 */ - case GL_COLOR_SUM: - case GL_SECONDARY_COLOR_ARRAY_SIZE: - case GL_SECONDARY_COLOR_ARRAY_TYPE: - case GL_SECONDARY_COLOR_ARRAY_STRIDE: - case GL_SECONDARY_COLOR_ARRAY: - - /* GL_EXT_texture_lod_bias / GL 1.4 */ - case GL_MAX_TEXTURE_LOD_BIAS: - - /* GL_ARB_point_sprite */ - case GL_POINT_SPRITE_ARB: - - /* GL_ARB_vertex_blend */ - case GL_MAX_VERTEX_UNITS_ARB: - case GL_ACTIVE_VERTEX_UNITS_ARB: - case GL_WEIGHT_SUM_UNITY_ARB: - case GL_VERTEX_BLEND_ARB: - case GL_CURRENT_WEIGHT_ARB: - case GL_WEIGHT_ARRAY_ARB: - case GL_WEIGHT_ARRAY_TYPE_ARB: - case GL_WEIGHT_ARRAY_STRIDE_ARB: - case GL_WEIGHT_ARRAY_SIZE_ARB: - - /* GL_ARB_matrix_palette */ - case GL_MATRIX_PALETTE_ARB: - case GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB: - case GL_MAX_PALETTE_MATRICES_ARB: - case GL_CURRENT_PALETTE_MATRIX_ARB: - case GL_CURRENT_MATRIX_INDEX_ARB: - case GL_MATRIX_INDEX_ARRAY_ARB: - case GL_MATRIX_INDEX_ARRAY_SIZE_ARB: - case GL_MATRIX_INDEX_ARRAY_TYPE_ARB: - case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB: - - /* GL_EXT_clip_volume_hint */ - case GL_CLIP_VOLUME_CLIPPING_HINT_EXT: - - /* GL_EXT_depth_bounds_test */ - case GL_DEPTH_BOUNDS_TEST_EXT: - - /* GL_EXT_stencil_two_size */ - case GL_STENCIL_TEST_TWO_SIDE_EXT: - case GL_ACTIVE_STENCIL_FACE_EXT: - - /* GL_EXT_vertex_weighting */ - case GL_VERTEX_WEIGHTING_EXT: - case GL_MODELVIEW0_EXT: - case GL_MODELVIEW1_EXT: - case GL_CURRENT_VERTEX_WEIGHT_EXT: - case GL_VERTEX_WEIGHT_ARRAY_EXT: - case GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT: - case GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT: - case GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT: - /* case GL_MODELVIEW0_STACK_DEPTH_EXT: */ /* alias */ - case GL_MODELVIEW1_STACK_DEPTH_EXT: - - /* GL_EXT_blend_equation_separate */ - /* case GL_BLEND_EQUATION_RGB_EXT: */ /* alias */ - case GL_BLEND_EQUATION_ALPHA_EXT: - - /* GL_ATI_vertex_streams */ - case GL_MAX_VERTEX_STREAMS_ATI: - - /* GL_ATI_draw_buffers */ - case GL_MAX_DRAW_BUFFERS_ATI: - case GL_DRAW_BUFFER0_ATI: - case GL_DRAW_BUFFER1_ATI: - case GL_DRAW_BUFFER2_ATI: - case GL_DRAW_BUFFER3_ATI: - case GL_DRAW_BUFFER4_ATI: - case GL_DRAW_BUFFER5_ATI: - case GL_DRAW_BUFFER6_ATI: - case GL_DRAW_BUFFER7_ATI: - case GL_DRAW_BUFFER8_ATI: - case GL_DRAW_BUFFER9_ATI: - case GL_DRAW_BUFFER10_ATI: - case GL_DRAW_BUFFER11_ATI: - case GL_DRAW_BUFFER12_ATI: - case GL_DRAW_BUFFER13_ATI: - case GL_DRAW_BUFFER14_ATI: - case GL_DRAW_BUFFER15_ATI: - - /* GL_ATI_separate_stencil */ - case GL_STENCIL_BACK_FUNC_ATI: - case GL_STENCIL_BACK_FAIL_ATI: - case GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI: - case GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI: - - /* GL_NV_depth_clamp */ - case GL_DEPTH_CLAMP_NV: - - /* GL_NV_fog_distance */ - case GL_FOG_DISTANCE_MODE_NV: - - /* GL_NV_light_max_exponent */ - case GL_MAX_SHININESS_NV: - case GL_MAX_SPOT_EXPONENT_NV: - - /* GL_NV_multisample_filter_hint */ - case GL_MULTISAMPLE_FILTER_HINT_NV: - - /* GL_NV_point_sprite */ - /* case GL_POINT_SPRITE_NV: */ /* alias */ - case GL_POINT_SPRITE_R_MODE_NV: - - /* GL_NV_primitive_restart */ - case GL_PRIMITIVE_RESTART_NV: - case GL_PRIMITIVE_RESTART_INDEX_NV: - - /* GL_NV_register_combiners */ - case GL_REGISTER_COMBINERS_NV: - case GL_NUM_GENERAL_COMBINERS_NV: - case GL_COLOR_SUM_CLAMP_NV: - case GL_MAX_GENERAL_COMBINERS_NV: - - /* GL_NV_register_combiners2 */ - case GL_PER_STAGE_CONSTANTS_NV: - - /* GL_NV_texture_rectangle */ - case GL_TEXTURE_RECTANGLE_NV: - case GL_TEXTURE_BINDING_RECTANGLE_NV: - case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV: - return 1; - - /* GL_EXT_depth_bounds_test */ - case GL_DEPTH_BOUNDS_EXT: - return 2; - - /* GL_EXT_secondary_color / GL 1.4 */ - case GL_CURRENT_SECONDARY_COLOR: - - /* GL_NV_register_combiners */ - case GL_CONSTANT_COLOR0_NV: - case GL_CONSTANT_COLOR1_NV: - return 4; - - /* GL_ARB_vertex_blend */ - /* case GL_MODELVIEW0_ARB: */ /* alias */ - /* case GL_MODELVIEW1_ARB: */ /* alias */ - case GL_MODELVIEW2_ARB: - case GL_MODELVIEW3_ARB: - case GL_MODELVIEW4_ARB: - case GL_MODELVIEW5_ARB: - case GL_MODELVIEW6_ARB: - case GL_MODELVIEW7_ARB: - case GL_MODELVIEW8_ARB: - case GL_MODELVIEW9_ARB: - case GL_MODELVIEW10_ARB: - case GL_MODELVIEW11_ARB: - case GL_MODELVIEW12_ARB: - case GL_MODELVIEW13_ARB: - case GL_MODELVIEW14_ARB: - case GL_MODELVIEW15_ARB: - case GL_MODELVIEW16_ARB: - case GL_MODELVIEW17_ARB: - case GL_MODELVIEW18_ARB: - case GL_MODELVIEW19_ARB: - case GL_MODELVIEW20_ARB: - case GL_MODELVIEW21_ARB: - case GL_MODELVIEW22_ARB: - case GL_MODELVIEW23_ARB: - case GL_MODELVIEW24_ARB: - case GL_MODELVIEW25_ARB: - case GL_MODELVIEW26_ARB: - case GL_MODELVIEW27_ARB: - case GL_MODELVIEW28_ARB: - case GL_MODELVIEW29_ARB: - case GL_MODELVIEW30_ARB: - case GL_MODELVIEW31_ARB: - - /* GL_EXT_vertex_weighting */ - /* case GL_MODELVIEW0_MATRIX_EXT: */ /* alias */ - case GL_MODELVIEW1_MATRIX_EXT: - return 32; - - /* GL_ARB_texture_comrpession / GL 1.3 */ - case GL_COMPRESSED_TEXTURE_FORMATS: { - GLint temp; - - glGetIntegerv( GL_NUM_COMPRESSED_TEXTURE_FORMATS, & temp ); - return temp; - } - - default: - return -1; - } -} - -GLint __glGetDoublev_size(GLenum sq) -{ - return __glGet_size(sq); -} - -GLint __glGetFloatv_size(GLenum sq) -{ - return __glGet_size(sq); -} - -GLint __glGetIntegerv_size(GLenum sq) -{ - return __glGet_size(sq); -} - -GLint __glGetBooleanv_size(GLenum sq) -{ - return __glGet_size(sq); -} - -GLint __glGetTexLevelParameterfv_size(GLenum pname) -{ - switch (pname) { - case GL_TEXTURE_WIDTH: - case GL_TEXTURE_HEIGHT: - case GL_TEXTURE_DEPTH: - case GL_TEXTURE_COMPONENTS: - case GL_TEXTURE_BORDER: - case GL_TEXTURE_RED_SIZE: - case GL_TEXTURE_GREEN_SIZE: - case GL_TEXTURE_BLUE_SIZE: - case GL_TEXTURE_ALPHA_SIZE: - case GL_TEXTURE_LUMINANCE_SIZE: - case GL_TEXTURE_INTENSITY_SIZE: - - /* GL_ARB_texture_compression / GL 1.3 */ - case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: - case GL_TEXTURE_COMPRESSED: - - /* GL_ARB_depth_texture / GL 1.4 */ - case GL_TEXTURE_DEPTH_SIZE: - return 1; - - default: - return -1; - } -} - -GLint __glGetTexLevelParameteriv_size(GLenum pname) -{ - return __glGetTexLevelParameterfv_size(pname); -} - GLint __glGetTexImage_size(GLenum target, GLint level, GLenum format, GLenum type, GLint width, GLint height, GLint depth) { - return __glXImage3DSize( format, type, width, height, depth, - 0, 0, 0, 0, 4 ); -} - -GLint __glGetConvolutionParameteriv_size(GLenum pname) -{ - switch (pname) { - case GL_CONVOLUTION_BORDER_COLOR: - case GL_CONVOLUTION_FILTER_SCALE: - case GL_CONVOLUTION_FILTER_BIAS: - return 4; - case GL_CONVOLUTION_BORDER_MODE: - case GL_CONVOLUTION_FORMAT: - case GL_CONVOLUTION_WIDTH: - case GL_CONVOLUTION_HEIGHT: - case GL_MAX_CONVOLUTION_WIDTH: - case GL_MAX_CONVOLUTION_HEIGHT: - return 1; - default: - return -1; - } -} - -GLint __glGetConvolutionParameterfv_size(GLenum pname) -{ - return __glGetConvolutionParameteriv_size(pname); -} - - -GLint __glGetHistogramParameterfv_size(GLenum pname) -{ - switch (pname) { - case GL_HISTOGRAM_WIDTH: - case GL_HISTOGRAM_FORMAT: - case GL_HISTOGRAM_RED_SIZE: - case GL_HISTOGRAM_GREEN_SIZE: - case GL_HISTOGRAM_BLUE_SIZE: - case GL_HISTOGRAM_ALPHA_SIZE: - case GL_HISTOGRAM_LUMINANCE_SIZE: - case GL_HISTOGRAM_SINK: - return 1; - default: - return -1; - } -} - -GLint __glGetHistogramParameteriv_size(GLenum pname) -{ - return __glGetHistogramParameterfv_size(pname); -} - -GLint __glGetMinmaxParameterfv_size(GLenum pname) -{ - switch (pname) { - case GL_MINMAX_FORMAT: - case GL_MINMAX_SINK: - return 1; - default: - return -1; - } -} - -GLint __glGetMinmaxParameteriv_size(GLenum pname) -{ - return __glGetMinmaxParameterfv_size(pname); -} - -GLint __glGetColorTableParameterfv_size(GLenum pname) -{ - switch(pname) { - - case GL_COLOR_TABLE_SCALE: /* return RGBA */ - case GL_COLOR_TABLE_BIAS: - return 4; - case GL_COLOR_TABLE_FORMAT: - case GL_COLOR_TABLE_WIDTH: - case GL_COLOR_TABLE_RED_SIZE: - case GL_COLOR_TABLE_GREEN_SIZE: - case GL_COLOR_TABLE_BLUE_SIZE: - case GL_COLOR_TABLE_ALPHA_SIZE: - case GL_COLOR_TABLE_LUMINANCE_SIZE: - case GL_COLOR_TABLE_INTENSITY_SIZE: - return 1; - default: - return 0; - } -} - -GLint __glGetColorTableParameteriv_size(GLenum pname) -{ - return __glGetColorTableParameterfv_size(pname); + return __glXImageSize( format, type, 0, width, height, depth, + 0, 0, 0, 0, 4 ); } - diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/glx/singlesize.h Xorg-new-size/xc/programs/Xserver/GL/glx/singlesize.h --- Xorg-new-Mesa/xc/programs/Xserver/GL/glx/singlesize.h 2004-04-23 11:44:36.000000000 -0700 +++ Xorg-new-size/xc/programs/Xserver/GL/glx/singlesize.h 2005-04-12 20:04:13.000000000 -0700 @@ -39,43 +39,17 @@ extern GLint __glReadPixels_size(GLenum format, GLenum type, GLint width, GLint height); -extern GLint __glGetTexEnvfv_size(GLenum pname); -extern GLint __glGetTexEnviv_size(GLenum pname); -extern GLint __glGetTexGenfv_size(GLenum pname); -extern GLint __glGetTexGendv_size(GLenum pname); -extern GLint __glGetTexGeniv_size(GLenum pname); -extern GLint __glGetTexParameterfv_size(GLenum pname); -extern GLint __glGetTexParameteriv_size(GLenum pname); -extern GLint __glGetLightfv_size(GLenum pname); -extern GLint __glGetLightiv_size(GLenum pname); extern GLint __glGetMap_size(GLenum pname, GLenum query); extern GLint __glGetMapdv_size(GLenum target, GLenum query); extern GLint __glGetMapfv_size(GLenum target, GLenum query); extern GLint __glGetMapiv_size(GLenum target, GLenum query); -extern GLint __glGetMaterialfv_size(GLenum pname); -extern GLint __glGetMaterialiv_size(GLenum pname); extern GLint __glGetPixelMap_size(GLenum map); extern GLint __glGetPixelMapfv_size(GLenum map); extern GLint __glGetPixelMapuiv_size(GLenum map); extern GLint __glGetPixelMapusv_size(GLenum map); -extern GLint __glGet_size(GLenum sq); -extern GLint __glGetDoublev_size(GLenum sq); -extern GLint __glGetFloatv_size(GLenum sq); -extern GLint __glGetIntegerv_size(GLenum sq); -extern GLint __glGetBooleanv_size(GLenum sq); -extern GLint __glGetTexLevelParameterfv_size(GLenum pname); -extern GLint __glGetTexLevelParameteriv_size(GLenum pname); extern GLint __glGetTexImage_size(GLenum target, GLint level, GLenum format, GLenum type, GLint width, GLint height, GLint depth); -extern GLint __glGetColorTableParameterfv_size(GLenum pname); -extern GLint __glGetColorTableParameteriv_size(GLenum pname); -extern GLint __glGetConvolutionParameterfv_size(GLenum pname); -extern GLint __glGetConvolutionParameteriv_size(GLenum pname); -extern GLint __glGetHistogramParameterfv_size(GLenum pname); -extern GLint __glGetHistogramParameteriv_size(GLenum pname); -extern GLint __glGetMinmaxParameterfv_size(GLenum pname); -extern GLint __glGetMinmaxParameteriv_size(GLenum pname); #endif /* _singlesize_h_ */ diff --exclude CVS -Nudr Xorg-new-Mesa/xc/programs/Xserver/GL/mesa/X/Imakefile Xorg-new-size/xc/programs/Xserver/GL/mesa/X/Imakefile --- Xorg-new-Mesa/xc/programs/Xserver/GL/mesa/X/Imakefile 2005-01-18 10:56:32.000000000 -0800 +++ Xorg-new-size/xc/programs/Xserver/GL/mesa/X/Imakefile 2005-04-13 10:41:28.000000000 -0700 @@ -22,8 +22,6 @@ #endif -LinkSourceFile(compsize.c,$(LIBSRC)/GL/glx) - DRIVER_SRCS = $(XMESA_SRCS) DRIVER_OBJS = $(XMESA_OBJS) @@ -37,8 +35,8 @@ #endif - GLX_SRCS = xf86glx.c xf86glx_util.c compsize.c - GLX_OBJS = xf86glx.o xf86glx_util.o compsize.o + GLX_SRCS = xf86glx.c xf86glx_util.c + GLX_OBJS = xf86glx.o xf86glx_util.o SRCS = $(DRIVER_SRCS) $(GLX_SRCS) $(COMMON_SRCS) OBJS = $(DRIVER_OBJS) $(GLX_OBJS) $(COMMON_OBJS)