diff options
Diffstat (limited to 'GL/glx/g_render.c')
-rw-r--r-- | GL/glx/g_render.c | 177 |
1 files changed, 3 insertions, 174 deletions
diff --git a/GL/glx/g_render.c b/GL/glx/g_render.c index a599423cc..35e083399 100644 --- a/GL/glx/g_render.c +++ b/GL/glx/g_render.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/g_render.c,v 1.8 2004/02/03 21:34:36 alanh Exp $ */ +/* $XFree86: xc/programs/Xserver/GL/glx/g_render.c,v 1.4 2001/03/21 16:29:35 dawes Exp $ */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ /* ** License Applicability. Except to the extent portions of this file are @@ -59,157 +59,6 @@ void __glXDisp_Begin(GLbyte *pc) ); } -#define __GLX_SWAP_GLbyte(ptr) -#define __GLX_SWAP_GLshort(ptr) __GLX_SWAP_SHORT(ptr) -#define __GLX_SWAP_GLint(ptr) __GLX_SWAP_INT(ptr) -#define __GLX_SWAP_GLubyte(ptr) -#define __GLX_SWAP_GLushort(ptr) __GLX_SWAP_SHORT(ptr) -#define __GLX_SWAP_GLuint(ptr) __GLX_SWAP_INT(ptr) -#define __GLX_SWAP_GLdouble(ptr) __GLX_SWAP_DOUBLE(ptr) -#define __GLX_SWAP_GLfloat(ptr) __GLX_SWAP_FLOAT(ptr) - -#define __GLX_SWAP_GLbyte_ARRAY(ptr,count) (void) swapEnd; (void) swapPC; (void) sw; -#define __GLX_SWAP_GLshort_ARRAY(ptr,count) __GLX_SWAP_SHORT_ARRAY(ptr,count) -#define __GLX_SWAP_GLint_ARRAY(ptr,count) __GLX_SWAP_INT_ARRAY(ptr,count) -#define __GLX_SWAP_GLenum_ARRAY(ptr,count) __GLX_SWAP_INT_ARRAY(ptr,count) -#define __GLX_SWAP_GLubyte_ARRAY(ptr,count) (void) swapEnd; (void) swapPC; (void) sw; -#define __GLX_SWAP_GLushort_ARRAY(ptr,count) __GLX_SWAP_SHORT_ARRAY(ptr,count) -#define __GLX_SWAP_GLuint_ARRAY(ptr,count) __GLX_SWAP_INT_ARRAY(ptr,count) -#define __GLX_SWAP_GLdouble_ARRAY(ptr,count) __GLX_SWAP_DOUBLE_ARRAY(ptr,count) -#define __GLX_SWAP_GLfloat_ARRAY(ptr,count) __GLX_SWAP_FLOAT_ARRAY(ptr,count) - -#ifdef __GLX_ALIGN64 -/* If type is not GLdouble, the compiler should optimize this away. - */ -# define GLX_DO_ALIGN_MAGIC(count, type) \ - do { \ - if ( (sizeof(type) == 8) && ((unsigned long)(pc) & 7)) \ - { \ - __GLX_MEM_COPY(pc-4, pc, (count * sizeof( type ) )); \ - pc -= 4; \ - } \ - } while( 0 ) -#else -# define GLX_DO_ALIGN_MAGIC(count, type) -#endif - -#define dispatch_template_1( name, type ) \ - void __glXDisp_ ## name ( GLbyte * pc ) \ - { \ - GLX_DO_ALIGN_MAGIC( 1, type ); \ - gl ## name ( (type *) pc ); \ - } \ - void __glXDispSwap_ ## name ( GLbyte * pc ) \ - { \ - __GLX_DECLARE_SWAP_VARIABLES; \ - GLX_DO_ALIGN_MAGIC( 1, type ); \ - __GLX_SWAP_ ## type ( pc ); \ - gl ## name ( (type *) pc ); \ - } - -#define dispatch_template_3( name, type ) \ - void __glXDisp_ ## name ( GLbyte * pc ) \ - { \ - GLX_DO_ALIGN_MAGIC( 3, type ); \ - gl ## name ( (type *) pc ); \ - } \ - void __glXDispSwap_ ## name ( GLbyte * pc ) \ - { \ - __GLX_DECLARE_SWAP_VARIABLES; \ - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; \ - GLX_DO_ALIGN_MAGIC( 3, type ); \ - __GLX_SWAP_ ## type ## _ARRAY(pc, 3); \ - gl ## name ( (type *) pc ); \ - } - -#define dispatch_template_4( name, type ) \ - void __glXDisp_ ## name ( GLbyte * pc ) \ - { \ - GLX_DO_ALIGN_MAGIC( 4, type ); \ - gl ## name ( (type *) pc ); \ - } \ - void __glXDispSwap_ ## name ( GLbyte * pc ) \ - { \ - __GLX_DECLARE_SWAP_VARIABLES; \ - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; \ - GLX_DO_ALIGN_MAGIC( 4, type ); \ - __GLX_SWAP_ ## type ## _ARRAY(pc, 4); \ - gl ## name ( (type *) pc ); \ - } - -#define dispatch_template_4s( name, type ) \ - void __glXDisp_ ## name ( GLbyte * pc ) \ - { \ - GLX_DO_ALIGN_MAGIC( 4, type ); \ - gl ## name ( ((type *) pc)[0], ((type *) pc)[1], \ - ((type *) pc)[2], ((type *) pc)[3] ); \ - } \ - void __glXDispSwap_ ## name ( GLbyte * pc ) \ - { \ - __GLX_DECLARE_SWAP_VARIABLES; \ - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; \ - GLX_DO_ALIGN_MAGIC( 4, type ); \ - __GLX_SWAP_ ## type ## _ARRAY(pc, 4); \ - gl ## name ( ((type *) pc)[0], ((type *) pc)[1], \ - ((type *) pc)[2], ((type *) pc)[3] ); \ - } - -/** - * \bug All of the enum1 templates need to be updated to handle the case where - * \c type is \c GLdouble. When the type is a double, the data comes before - * the enum. This is also the reason the invocation of the - * \c GLX_DO_ALIGN_MAGIC macro was removed. - */ -#define dispatch_template_enum1_1s( name, type ) \ - void __glXDisp_ ## name ( GLbyte * pc ) \ - { \ - gl ## name ( *(GLenum *) (pc + 0), \ - *(type *) (pc + 4) ); \ - } \ - void __glXDispSwap_ ## name ( GLbyte * pc ) \ - { \ - __GLX_DECLARE_SWAP_VARIABLES; \ - __GLX_SWAP_INT (pc + 0); \ - __GLX_SWAP_ ## type (pc + 4); \ - gl ## name ( *(GLenum *) (pc + 0), \ - *(type *) (pc + 4) ); \ - } - -#define dispatch_template_enum1_Vv( name, type ) \ - void __glXDisp_ ## name ( GLbyte * pc ) \ - { \ - gl ## name ( *(GLenum *) (pc + 0), \ - (type *) (pc + 4) ); \ - } \ - void __glXDispSwap_ ## name ( GLbyte * pc ) \ - { \ - GLenum pname; GLint compsize; \ - __GLX_DECLARE_SWAP_VARIABLES; \ - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; \ - __GLX_SWAP_INT(pc + 0); \ - pname = *(GLenum *)(pc + 0); \ - compsize = __gl ## name ## _size(pname); \ - if (compsize < 0) compsize = 0; \ - __GLX_SWAP_ ## type ## _ARRAY(pc + 4, compsize); \ - gl ## name ( *(GLenum *) (pc + 0), \ - (type *) (pc + 4) ); \ - } - -#ifndef MISSING_GL_EXTS -dispatch_template_1( FogCoordfv, GLfloat ) -dispatch_template_1( FogCoorddv, GLdouble ) -dispatch_template_3( SecondaryColor3bv, GLbyte ) -dispatch_template_3( SecondaryColor3sv, GLshort ) -dispatch_template_3( SecondaryColor3iv, GLint ) -dispatch_template_3( SecondaryColor3ubv, GLubyte ) -dispatch_template_3( SecondaryColor3usv, GLushort ) -dispatch_template_3( SecondaryColor3uiv, GLuint ) -dispatch_template_3( SecondaryColor3fv, GLfloat ) -dispatch_template_3( SecondaryColor3dv, GLdouble ) - -dispatch_template_4s( BlendFuncSeparate, GLenum ) -#endif /* !MISSING_GL_EXTS */ - void __glXDisp_Color3bv(GLbyte *pc) { glColor3bv( @@ -1133,7 +982,6 @@ void __glXDisp_TexGend(GLbyte *pc) void __glXDisp_TexGendv(GLbyte *pc) { -#ifdef __GLX_ALIGN64 GLenum pname; GLint cmdlen; GLint compsize; @@ -1142,6 +990,8 @@ void __glXDisp_TexGendv(GLbyte *pc) compsize = __glTexGendv_size(pname); if (compsize < 0) compsize = 0; cmdlen = __GLX_PAD(8+compsize*8); + +#ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { __GLX_MEM_COPY(pc-4, pc, cmdlen); pc -= 4; @@ -2230,8 +2080,6 @@ void __glXDisp_MultiTexCoord4svARB(GLbyte *pc) * Extensions */ -#ifndef MISSING_GL_EXTS - void __glXDisp_PointParameterfARB(GLbyte *pc) { glPointParameterfARB( @@ -2249,15 +2097,6 @@ void __glXDisp_PointParameterfvARB(GLbyte *pc) ); } -#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) { glActiveStencilFaceEXT( @@ -2273,13 +2112,3 @@ void __glXDisp_WindowPos3fARB(GLbyte *pc) *(GLfloat *)(pc + 8) ); } - -#endif /* !MISSING_GL_EXTS */ - -void __glXDisp_SampleCoverageARB(GLbyte *pc) -{ - glSampleCoverageARB( - *(GLfloat *)(pc + 0), - *(GLboolean *)(pc + 4) - ); -} |