From be5a429cf9389eb6c464887b26bf42d2f85adef0 Mon Sep 17 00:00:00 2001 From: alanh Date: Fri, 18 Jan 2002 10:21:52 +0000 Subject: latest Mesa 4.0.x changes. --- xc/extras/Mesa/src/api_arrayelt.c | 228 +++++++++++++++++++++------------- xc/extras/Mesa/src/api_compat.c | 93 -------------- xc/extras/Mesa/src/api_compat.h | 64 ---------- xc/extras/Mesa/src/api_loopback.c | 14 +-- xc/extras/Mesa/src/drawpix.c | 17 ++- xc/extras/Mesa/src/swrast/s_drawpix.c | 7 +- xc/extras/Mesa/src/swrast/s_lines.c | 4 +- xc/extras/Mesa/src/tnl/t_imm_dlist.c | 7 +- xc/lib/GL/mesa/src/Imakefile.inc | 6 - 9 files changed, 173 insertions(+), 267 deletions(-) delete mode 100644 xc/extras/Mesa/src/api_compat.c delete mode 100644 xc/extras/Mesa/src/api_compat.h (limited to 'xc') diff --git a/xc/extras/Mesa/src/api_arrayelt.c b/xc/extras/Mesa/src/api_arrayelt.c index baadaa4bd..fe31441a2 100644 --- a/xc/extras/Mesa/src/api_arrayelt.c +++ b/xc/extras/Mesa/src/api_arrayelt.c @@ -1,10 +1,10 @@ -/* $Id: api_arrayelt.c,v 1.1.6.6 2002/01/12 19:18:04 alanh Exp $ */ +/* $Id: api_arrayelt.c,v 1.1.6.7 2002/01/18 10:21:52 alanh Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.2 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -37,16 +37,19 @@ #include "mtypes.h" +typedef void (*texarray_func)( GLenum, const void * ); + typedef struct { GLint unit; struct gl_client_array *array; - void (*func)( GLenum, const void * ); + texarray_func func; } AEtexarray; +typedef void (*array_func)( const void * ); typedef struct { struct gl_client_array *array; - void (*func)( const void * ); + array_func func; } AEarray; typedef struct { @@ -59,149 +62,200 @@ typedef struct { #define TYPE_IDX(t) ((t) & 0xf) static void (*colorfuncs[2][8])( const void * ) = { - { (void (*)( const void * ))glColor3bv, - (void (*)( const void * ))glColor3ub, - (void (*)( const void * ))glColor3sv, - (void (*)( const void * ))glColor3usv, - (void (*)( const void * ))glColor3iv, - (void (*)( const void * ))glColor3uiv, - (void (*)( const void * ))glColor3fv, - (void (*)( const void * ))glColor3dv }, - - { (void (*)( const void * ))glColor4bv, - (void (*)( const void * ))glColor4ub, - (void (*)( const void * ))glColor4sv, - (void (*)( const void * ))glColor4usv, - (void (*)( const void * ))glColor4iv, - (void (*)( const void * ))glColor4uiv, - (void (*)( const void * ))glColor4fv, - (void (*)( const void * ))glColor4dv } + { (array_func)glColor3bv, + (array_func)glColor3ub, + (array_func)glColor3sv, + (array_func)glColor3usv, + (array_func)glColor3iv, + (array_func)glColor3uiv, + (array_func)glColor3fv, + (array_func)glColor3dv }, + + { (array_func)glColor4bv, + (array_func)glColor4ub, + (array_func)glColor4sv, + (array_func)glColor4usv, + (array_func)glColor4iv, + (array_func)glColor4uiv, + (array_func)glColor4fv, + (array_func)glColor4dv } }; static void (*vertexfuncs[3][8])( const void * ) = { { 0, 0, - (void (*)( const void * ))glVertex2sv, + (array_func)glVertex2sv, 0, - (void (*)( const void * ))glVertex2iv, + (array_func)glVertex2iv, 0, - (void (*)( const void * ))glVertex2fv, - (void (*)( const void * ))glVertex2dv }, + (array_func)glVertex2fv, + (array_func)glVertex2dv }, { 0, 0, - (void (*)( const void * ))glVertex3sv, + (array_func)glVertex3sv, 0, - (void (*)( const void * ))glVertex3iv, + (array_func)glVertex3iv, 0, - (void (*)( const void * ))glVertex3fv, - (void (*)( const void * ))glVertex3dv }, + (array_func)glVertex3fv, + (array_func)glVertex3dv }, { 0, 0, - (void (*)( const void * ))glVertex4sv, + (array_func)glVertex4sv, 0, - (void (*)( const void * ))glVertex4iv, + (array_func)glVertex4iv, 0, - (void (*)( const void * ))glVertex4fv, - (void (*)( const void * ))glVertex4dv } + (array_func)glVertex4fv, + (array_func)glVertex4dv } }; static void (*multitexfuncs[4][8])( GLenum, const void * ) = { { 0, 0, - (void (*)( GLenum, const void * ))glMultiTexCoord1svARB, + (texarray_func)glMultiTexCoord1svARB, 0, - (void (*)( GLenum, const void * ))glMultiTexCoord1ivARB, + (texarray_func)glMultiTexCoord1ivARB, 0, - (void (*)( GLenum, const void * ))glMultiTexCoord1fvARB, - (void (*)( GLenum, const void * ))glMultiTexCoord1dvARB }, + (texarray_func)glMultiTexCoord1fvARB, + (texarray_func)glMultiTexCoord1dvARB }, { 0, 0, - (void (*)( GLenum, const void * ))glMultiTexCoord2svARB, + (texarray_func)glMultiTexCoord2svARB, 0, - (void (*)( GLenum, const void * ))glMultiTexCoord2ivARB, + (texarray_func)glMultiTexCoord2ivARB, 0, - (void (*)( GLenum, const void * ))glMultiTexCoord2fvARB, - (void (*)( GLenum, const void * ))glMultiTexCoord2dvARB }, + (texarray_func)glMultiTexCoord2fvARB, + (texarray_func)glMultiTexCoord2dvARB }, { 0, 0, - (void (*)( GLenum, const void * ))glMultiTexCoord3svARB, + (texarray_func)glMultiTexCoord3svARB, 0, - (void (*)( GLenum, const void * ))glMultiTexCoord3ivARB, + (texarray_func)glMultiTexCoord3ivARB, 0, - (void (*)( GLenum, const void * ))glMultiTexCoord3fvARB, - (void (*)( GLenum, const void * ))glMultiTexCoord3dvARB }, + (texarray_func)glMultiTexCoord3fvARB, + (texarray_func)glMultiTexCoord3dvARB }, { 0, 0, - (void (*)( GLenum, const void * ))glMultiTexCoord4svARB, + (texarray_func)glMultiTexCoord4svARB, 0, - (void (*)( GLenum, const void * ))glMultiTexCoord4ivARB, + (texarray_func)glMultiTexCoord4ivARB, 0, - (void (*)( GLenum, const void * ))glMultiTexCoord4fvARB, - (void (*)( GLenum, const void * ))glMultiTexCoord4dvARB } + (texarray_func)glMultiTexCoord4fvARB, + (texarray_func)glMultiTexCoord4dvARB } }; static void (*indexfuncs[8])( const void * ) = { 0, - (void (*)( const void * ))glIndexubv, - (void (*)( const void * ))glIndexsv, + (array_func)glIndexubv, + (array_func)glIndexsv, 0, - (void (*)( const void * ))glIndexiv, + (array_func)glIndexiv, 0, - (void (*)( const void * ))glIndexfv, - (void (*)( const void * ))glIndexdv + (array_func)glIndexfv, + (array_func)glIndexdv }; static void (*normalfuncs[8])( const void * ) = { - (void (*)( const void * ))glNormal3bv, + (array_func)glNormal3bv, 0, - (void (*)( const void * ))glNormal3sv, + (array_func)glNormal3sv, 0, - (void (*)( const void * ))glNormal3iv, + (array_func)glNormal3iv, 0, - (void (*)( const void * ))glNormal3fv, - (void (*)( const void * ))glNormal3dv, + (array_func)glNormal3fv, + (array_func)glNormal3dv, }; -static void (*fogcoordfuncs[8])( const void * ); -static void (*secondarycolorfuncs[8])( const void * ); -GLboolean _ae_create_context( GLcontext *ctx ) +/* Wrapper functions in case glSecondaryColor*EXT doesn't exist */ +static void SecondaryColor3bvEXT(const GLbyte *c) +{ + _glapi_Dispatch->SecondaryColor3bvEXT(c); +} + +static void SecondaryColor3ubvEXT(const GLubyte *c) +{ + _glapi_Dispatch->SecondaryColor3ubvEXT(c); +} + +static void SecondaryColor3svEXT(const GLshort *c) +{ + _glapi_Dispatch->SecondaryColor3svEXT(c); +} + +static void SecondaryColor3usvEXT(const GLushort *c) +{ + _glapi_Dispatch->SecondaryColor3usvEXT(c); +} + +static void SecondaryColor3ivEXT(const GLint *c) +{ + _glapi_Dispatch->SecondaryColor3ivEXT(c); +} + +static void SecondaryColor3uivEXT(const GLuint *c) +{ + _glapi_Dispatch->SecondaryColor3uivEXT(c); +} + +static void SecondaryColor3fvEXT(const GLfloat *c) +{ + _glapi_Dispatch->SecondaryColor3fvEXT(c); +} + +static void SecondaryColor3dvEXT(const GLdouble *c) +{ + _glapi_Dispatch->SecondaryColor3dvEXT(c); +} + +static void (*secondarycolorfuncs[8])( const void * ) = { + (array_func) SecondaryColor3bvEXT, + (array_func) SecondaryColor3ubvEXT, + (array_func) SecondaryColor3svEXT, + (array_func) SecondaryColor3usvEXT, + (array_func) SecondaryColor3ivEXT, + (array_func) SecondaryColor3uivEXT, + (array_func) SecondaryColor3fvEXT, + (array_func) SecondaryColor3dvEXT, +}; + + +/* Again, wrapper functions in case glSecondaryColor*EXT doesn't exist */ +static void FogCoordfvEXT(const GLfloat *f) +{ + _glapi_Dispatch->FogCoordfvEXT(f); +} + +static void FogCoorddvEXT(const GLdouble *f) { - static int firsttime = 1; + _glapi_Dispatch->FogCoorddvEXT(f); +} + +static void (*fogcoordfuncs[8])( const void * ) = { + 0, + 0, + 0, + 0, + 0, + 0, + (array_func) FogCoordfvEXT, + (array_func) FogCoorddvEXT +}; + + +GLboolean _ae_create_context( GLcontext *ctx ) +{ ctx->aelt_context = MALLOC( sizeof(AEcontext) ); if (!ctx->aelt_context) return GL_FALSE; - - if (firsttime) - { - firsttime = 0; - - /* Don't really want to use api_compat.h for this, but the - * rationale for using _glaph_get_proc_address is the same. No - * benefit to shortcircuiting this in the non-dri case, either. - */ - fogcoordfuncs[0] = _glapi_get_proc_address("glSecondaryColor3bvEXT"); - fogcoordfuncs[1] = _glapi_get_proc_address("glSecondaryColor3ubvEXT"); - fogcoordfuncs[2] = _glapi_get_proc_address("glSecondaryColor3svEXT"); - fogcoordfuncs[3] = _glapi_get_proc_address("glSecondaryColor3usvEXT"); - fogcoordfuncs[4] = _glapi_get_proc_address("glSecondaryColor3ivEXT"); - fogcoordfuncs[5] = _glapi_get_proc_address("glSecondaryColor3uivEXT"); - fogcoordfuncs[6] = _glapi_get_proc_address("glSecondaryColor3fvEXT"); - fogcoordfuncs[7] = _glapi_get_proc_address("glSecondaryColor3dvEXT"); - - secondarycolorfuncs[6] = _glapi_get_proc_address("glFogCoordfvEXT"); - secondarycolorfuncs[7] = _glapi_get_proc_address("glFogCoorddvEXT"); - } - AE_CONTEXT(ctx)->NewState = ~0; return GL_TRUE; } @@ -253,7 +307,7 @@ static void _ae_update_state( GLcontext *ctx ) if (ctx->Array.EdgeFlag.Enabled) { aa->array = &ctx->Array.EdgeFlag; - aa->func = (void (*)( const void * ))glEdgeFlagv; + aa->func = (array_func) glEdgeFlagv; aa++; } diff --git a/xc/extras/Mesa/src/api_compat.c b/xc/extras/Mesa/src/api_compat.c deleted file mode 100644 index d6b93b027..000000000 --- a/xc/extras/Mesa/src/api_compat.c +++ /dev/null @@ -1,93 +0,0 @@ -/* $Id: api_compat.c,v 1.1.2.1 2001/12/20 10:29:11 keithw Exp $ */ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Keith Whitwell - */ - -#ifdef XF86DRI - -#include "api_compat.h" -#include "glapi.h" - -/* In some applications (the dri drivers, specifically), core mesa is - * divorced from the dispatch layer in libGL.so, which contains - * entrypoints like glVertex3f, etc. - * - * It is possible to imagine a situation where a new DRI driver - * containing new extensions is used with an old libGL.so, which lacks - * the extension entrypoints. Thus, if mesa ever calls these - * functions, then there is a problem as they won't be present in the - * old libGL.so. - */ - -static void GLAPIENTRY _init_FogCoordfEXT( GLfloat f ) -{ - _compat_FogCoordfEXT = _glapi_get_proc_address( "glFogCoordfEXT "); - _compat_FogCoordfEXT( f ); -} - -static void GLAPIENTRY _init_SecondaryColor3fvEXT( const GLfloat *v ) -{ - _compat_SecondaryColor3fvEXT = - _glapi_get_proc_address( "glSecondaryColor3fvEXT" ); - _compat_SecondaryColor3fvEXT( v ); -} - -static void GLAPIENTRY _init_SecondaryColor3fEXT( GLfloat a, - GLfloat b, - GLfloat c ) -{ - _compat_SecondaryColor3fEXT = - _glapi_get_proc_address( "glSecondaryColor3fEXT" ); - _compat_SecondaryColor3fEXT( a, b, c ); -} - -static void GLAPIENTRY _init_SecondaryColor3ubEXT( GLubyte a, - GLubyte b, - GLubyte c ) -{ - _compat_SecondaryColor3ubEXT = - _glapi_get_proc_address( "glSecondaryColor3ubEXT" ); - _compat_SecondaryColor3ubEXT( a, b, c ); -} - -void (GLAPIENTRY *_compat_FogCoordfEXT)( GLfloat ) = -_init_FogCoordfEXT; - -void (GLAPIENTRY *_compat_SecondaryColor3fvEXT)( const GLfloat * ) = -_init_SecondaryColor3fvEXT; - -void (GLAPIENTRY *_compat_SecondaryColor3fEXT)( GLfloat, GLfloat, GLfloat ) = -_init_SecondaryColor3fEXT; - -void (GLAPIENTRY *_compat_SecondaryColor3ubEXT)( GLubyte, GLubyte, GLubyte ) = -_init_SecondaryColor3ubEXT; - -#else -void _api_compat_dummy( void ) -{ -} -#endif diff --git a/xc/extras/Mesa/src/api_compat.h b/xc/extras/Mesa/src/api_compat.h deleted file mode 100644 index 80a0506c0..000000000 --- a/xc/extras/Mesa/src/api_compat.h +++ /dev/null @@ -1,64 +0,0 @@ -/* $Id: api_compat.h,v 1.1.2.1 2001/12/20 10:29:11 keithw Exp $ */ - -/* - * Mesa 3-D graphics library - * Version: 3.5 - * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Authors: - * Keith Whitwell - */ - -#ifndef API_COMPAT_H -#define API_COMPAT_H - -#ifdef XF86DRI - -#include "mtypes.h" - -/* In some applications (the dri drivers, specifically), core mesa is - * divorced from the dispatch layer in libGL.so, which contains - * entrypoints like glVertex3f, etc. - * - * It is possible to imagine a situation where a new DRI driver - * containing new extensions is used with an old libGL.so, which lacks - * the extension entrypoints. Thus, if mesa ever calls these - * functions, then there is a problem as they won't be present in the - * old libGL.so. - */ -extern void (GLAPIENTRY *_compat_FogCoordfEXT)( const GLfloat ); -extern void (GLAPIENTRY *_compat_SecondaryColor3fvEXT)( const GLfloat * ); -extern void (GLAPIENTRY *_compat_SecondaryColor3fEXT)( GLfloat, - GLfloat, GLfloat ); -extern void (GLAPIENTRY *_compat_SecondaryColor3ubEXT)( GLubyte, - GLubyte, GLubyte ); - -#else - -/* Otherwise, just alias these to the GL entrypoints. - */ -#define _compat_FogCoordfEXT glFogCoordfEXT -#define _compat_SecondaryColor3fvEXT glSecondaryColor3fvEXT -#define _compat_SecondaryColor3fEXT glSecondaryColor3fEXT -#define _compat_SecondaryColor3ubEXT glSecondaryColor3ubEXT - -#endif -#endif diff --git a/xc/extras/Mesa/src/api_loopback.c b/xc/extras/Mesa/src/api_loopback.c index 9d2b7825e..6e775f3b4 100644 --- a/xc/extras/Mesa/src/api_loopback.c +++ b/xc/extras/Mesa/src/api_loopback.c @@ -1,10 +1,10 @@ -/* $Id: api_loopback.c,v 1.1.6.2 2001/12/20 10:29:11 keithw Exp $ */ +/* $Id: api_loopback.c,v 1.1.6.3 2002/01/18 10:21:53 alanh Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.5 + * Version: 4.0.2 * - * Copyright (C) 1999-2001 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2002 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -29,10 +29,10 @@ #include "glheader.h" +#include "glapi.h" #include "glapitable.h" #include "macros.h" #include "colormac.h" -#include "api_compat.h" #include "api_loopback.h" /* KW: A set of functions to convert unusual Color/Normal/Vertex/etc @@ -66,9 +66,9 @@ -#define FOGCOORDF(x) _compat_FogCoordfEXT(x) -#define SECONDARYCOLORUB(a,b,c) _compat_SecondaryColor3ubEXT(a,b,c) -#define SECONDARYCOLORF(a,b,c) _compat_SecondaryColor3fEXT(a,b,c) +#define FOGCOORDF(x) _glapi_Dispatch->FogCoordfEXT(x) +#define SECONDARYCOLORUB(a,b,c) _glapi_Dispatch->SecondaryColor3ubEXT(a,b,c) +#define SECONDARYCOLORF(a,b,c) _glapi_Dispatch->SecondaryColor3fEXT(a,b,c) static void diff --git a/xc/extras/Mesa/src/drawpix.c b/xc/extras/Mesa/src/drawpix.c index 31971f9e8..4a0105772 100644 --- a/xc/extras/Mesa/src/drawpix.c +++ b/xc/extras/Mesa/src/drawpix.c @@ -1,4 +1,4 @@ -/* $Id: drawpix.c,v 1.13.28.2 2001/12/14 16:22:38 alanh Exp $ */ +/* $Id: drawpix.c,v 1.13.28.3 2002/01/18 10:21:53 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -52,6 +52,11 @@ _mesa_DrawPixels( GLsizei width, GLsizei height, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (width < 0 || height < 0) { + _mesa_error( ctx, GL_INVALID_VALUE, "glDrawPixels(width or height < 0" ); + return; + } + if (ctx->RenderMode==GL_RENDER) { GLint x, y; if (!pixels || !ctx->Current.RasterPosValid) { @@ -97,6 +102,11 @@ _mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (width < 0 || height < 0) { + _mesa_error( ctx, GL_INVALID_VALUE, "glReadPixels(width or height < 0)" ); + return; + } + if (!pixels) { _mesa_error( ctx, GL_INVALID_VALUE, "glReadPixels(pixels)" ); return; @@ -121,7 +131,7 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height, ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); if (width < 0 || height < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glCopyPixels" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glCopyPixels(width or height < 0)" ); return; } @@ -170,9 +180,8 @@ _mesa_Bitmap( GLsizei width, GLsizei height, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - /* Error checking */ if (width < 0 || height < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glBitmap" ); + _mesa_error( ctx, GL_INVALID_VALUE, "glBitmap(width or height < 0)" ); return; } diff --git a/xc/extras/Mesa/src/swrast/s_drawpix.c b/xc/extras/Mesa/src/swrast/s_drawpix.c index b2199f3d9..18369de6c 100644 --- a/xc/extras/Mesa/src/swrast/s_drawpix.c +++ b/xc/extras/Mesa/src/swrast/s_drawpix.c @@ -1,4 +1,4 @@ -/* $Id: s_drawpix.c,v 1.1.6.1 2001/12/03 14:53:53 alanh Exp $ */ +/* $Id: s_drawpix.c,v 1.1.6.2 2002/01/18 10:21:53 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -560,6 +560,11 @@ draw_stencil_pixels( GLcontext *ctx, GLint x, GLint y, return; } + if (ctx->Visual.stencilBits == 0) { + _mesa_error( ctx, GL_INVALID_OPERATION, "glDrawPixels(no stencil buffer)"); + return; + } + drawWidth = (width > MAX_WIDTH) ? MAX_WIDTH : width; for (row = 0; row < height; row++, y++) { diff --git a/xc/extras/Mesa/src/swrast/s_lines.c b/xc/extras/Mesa/src/swrast/s_lines.c index 197c5e332..05618367e 100644 --- a/xc/extras/Mesa/src/swrast/s_lines.c +++ b/xc/extras/Mesa/src/swrast/s_lines.c @@ -1,4 +1,4 @@ -/* $Id: s_lines.c,v 1.1.6.1 2001/12/03 14:53:53 alanh Exp $ */ +/* $Id: s_lines.c,v 1.1.6.2 2002/01/18 10:21:53 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -759,6 +759,7 @@ static void smooth_multitextured_line( GLcontext *ctx, GLchan (*pbspec)[3] = PB->spec; PB->mono = GL_FALSE; + PB->haveSpec = GL_TRUE; if (ctx->Line.StippleFlag) { /* stippled */ @@ -860,6 +861,7 @@ static void flat_multitextured_line( GLcontext *ctx, GLchan sBlue = vert1->specular[2]; PB->mono = GL_FALSE; + PB->haveSpec = GL_TRUE; if (ctx->Line.StippleFlag) { /* stippled */ diff --git a/xc/extras/Mesa/src/tnl/t_imm_dlist.c b/xc/extras/Mesa/src/tnl/t_imm_dlist.c index 896d53e11..fa57f97d5 100644 --- a/xc/extras/Mesa/src/tnl/t_imm_dlist.c +++ b/xc/extras/Mesa/src/tnl/t_imm_dlist.c @@ -1,4 +1,4 @@ -/* $Id: t_imm_dlist.c,v 1.1.6.8 2002/01/12 19:18:06 alanh Exp $ */ +/* $Id: t_imm_dlist.c,v 1.1.6.9 2002/01/18 10:21:53 alanh Exp $ */ /* * Mesa 3-D graphics library @@ -29,7 +29,6 @@ #include "glheader.h" -#include "api_compat.h" #include "context.h" #include "dlist.h" #include "debug.h" @@ -621,10 +620,10 @@ static void loopback_compiled_cassette( GLcontext *ctx, struct immediate *IM ) } if (flags[i] & VERT_SPEC_RGB) - _compat_SecondaryColor3fvEXT( IM->SecondaryColor[i] ); + _glapi_Dispatch->SecondaryColor3fvEXT( IM->SecondaryColor[i] ); if (flags[i] & VERT_FOG_COORD) - _compat_FogCoordfEXT( IM->FogCoord[i] ); + _glapi_Dispatch->FogCoordfEXT( IM->FogCoord[i] ); if (flags[i] & VERT_INDEX) glIndexi( IM->Index[i] ); diff --git a/xc/lib/GL/mesa/src/Imakefile.inc b/xc/lib/GL/mesa/src/Imakefile.inc index 2dc732678..57473d867 100644 --- a/xc/lib/GL/mesa/src/Imakefile.inc +++ b/xc/lib/GL/mesa/src/Imakefile.inc @@ -22,7 +22,6 @@ MESA_CORE_INCLUDES = -I$(MESASRCDIR)/src/array_cache \ COREMESABASESRCS = \ $(MESABUILDDIR)accum.c \ $(MESABUILDDIR)api_arrayelt.c \ - $(MESABUILDDIR)api_compat.c \ $(MESABUILDDIR)api_eval.c \ $(MESABUILDDIR)api_loopback.c \ $(MESABUILDDIR)api_noop.c \ @@ -145,7 +144,6 @@ COREMESASRCS = $(COREMESABASESRCS) \ #ifdef NeedToLinkMesaSrc LinkSourceFile(accum.c, $(MESASRCDIR)/src) LinkSourceFile(api_arrayelt.c, $(MESASRCDIR)/src) -LinkSourceFile(api_compat.c, $(MESASRCDIR)/src) LinkSourceFile(api_eval.c, $(MESASRCDIR)/src) LinkSourceFile(api_loopback.c, $(MESASRCDIR)/src) LinkSourceFile(api_noop.c, $(MESASRCDIR)/src) @@ -212,7 +210,6 @@ GLAPINOOPOBJS = $(MESABUILDDIR)glapinoop.o COREMESABASEOBJS = \ $(MESABUILDDIR)accum.o \ $(MESABUILDDIR)api_arrayelt.o \ - $(MESABUILDDIR)api_compat.o \ $(MESABUILDDIR)api_eval.o \ $(MESABUILDDIR)api_loopback.o \ $(MESABUILDDIR)api_noop.o \ @@ -341,7 +338,6 @@ GLAPINOOPUOBJS = $(MESABUILDDIR)unshared/glapinoop.o COREMESAUOBJS = $(MESABUILDDIR)unshared/accum.o \ $(MESABUILDDIR)unshared/api_arrayelt.o \ - $(MESABUILDDIR)unshared/api_compat.o \ $(MESABUILDDIR)unshared/api_eval.o \ $(MESABUILDDIR)unshared/api_loopback.o \ $(MESABUILDDIR)unshared/api_noop.o \ @@ -468,7 +464,6 @@ GLAPINOOPDOBJS = $(MESABUILDDIR)debugger/glapinoop.o COREMESADOBJS = $(MESABUILDDIR)debugger/accum.o \ $(MESABUILDDIR)debugger/api_arrayelt.o \ - $(MESABUILDDIR)debugger/api_compat.o \ $(MESABUILDDIR)debugger/api_eval.o \ $(MESABUILDDIR)debugger/api_loopback.o \ $(MESABUILDDIR)debugger/api_noop.o \ @@ -595,7 +590,6 @@ GLAPINOOPPOBJS = $(MESABUILDDIR)profiled/glapinoop.o COREMESAPOBJS = $(MESABUILDDIR)profiled/accum.o \ $(MESABUILDDIR)profiled/api_arrayelt.o \ - $(MESABUILDDIR)profiled/api_compat.o \ $(MESABUILDDIR)profiled/api_eval.o \ $(MESABUILDDIR)profiled/api_loopback.o \ $(MESABUILDDIR)profiled/api_noop.o \ -- cgit v1.2.3