diff options
| author | Brian Paul <brian.paul@tungstengraphics.com> | 2000-11-19 23:10:25 +0000 | 
|---|---|---|
| committer | Brian Paul <brian.paul@tungstengraphics.com> | 2000-11-19 23:10:25 +0000 | 
| commit | a852378a6289d154364dde440f89a39bbfc33e2d (patch) | |
| tree | dbaf6946d80e517a2f0b349a11d1736cde1b83e1 /src/mesa/drivers | |
| parent | b12d8e3b0ddf6dc56dc866530b66230bdc5d73db (diff) | |
Replaced Texture.CurrentD[] with separate Texture.Current1/2/3D vars.
Completely removed the dirty texture object list.  Set texObj->Complete
to GL_FALSE to indicate dirty.
Made point/line/triangle/quad SWvertex parameters const.
Minor code clean-ups.
Diffstat (limited to 'src/mesa/drivers')
| -rw-r--r-- | src/mesa/drivers/glide/fxddtex.c | 2 | ||||
| -rw-r--r-- | src/mesa/drivers/glide/fxsetup.c | 6 | ||||
| -rw-r--r-- | src/mesa/drivers/osmesa/osmesa.c | 20 | ||||
| -rw-r--r-- | src/mesa/drivers/x11/xm_line.c | 40 | ||||
| -rw-r--r-- | src/mesa/drivers/x11/xm_tri.c | 266 | 
5 files changed, 169 insertions, 165 deletions
| diff --git a/src/mesa/drivers/glide/fxddtex.c b/src/mesa/drivers/glide/fxddtex.c index 9f978b3f46..85d2271b72 100644 --- a/src/mesa/drivers/glide/fxddtex.c +++ b/src/mesa/drivers/glide/fxddtex.c @@ -462,7 +462,7 @@ void fxDDTexUseGlbPalette(GLcontext *ctx, GLboolean state)    else {      fxMesa->haveGlobalPaletteTexture = 0; -    if ((ctx->Texture.Unit[0]._Current == ctx->Texture.Unit[0].CurrentD[2]) && +    if ((ctx->Texture.Unit[0]._Current == ctx->Texture.Unit[0].Current2D) &&          (ctx->Texture.Unit[0]._Current != NULL)) {        struct gl_texture_object *tObj = ctx->Texture.Unit[0]._Current; diff --git a/src/mesa/drivers/glide/fxsetup.c b/src/mesa/drivers/glide/fxsetup.c index 2cc6add1d2..a5af36ca41 100644 --- a/src/mesa/drivers/glide/fxsetup.c +++ b/src/mesa/drivers/glide/fxsetup.c @@ -456,7 +456,7 @@ static void fxSetupTextureSingleTMU_NoLock(GLcontext *ctx, GLuint textureset)    GLuint unitsmode;    GLint ifmt;    tfxTexInfo *ti; -  struct gl_texture_object *tObj=ctx->Texture.Unit[textureset].CurrentD[2]; +  struct gl_texture_object *tObj=ctx->Texture.Unit[textureset].Current2D;    int tmu;    if (MESA_VERBOSE&VERBOSE_DRIVER) { @@ -747,8 +747,8 @@ static void fxSetupTextureDoubleTMU_NoLock(GLcontext *ctx)    fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;    GrCombineLocal_t localc,locala;    tfxTexInfo *ti0,*ti1; -  struct gl_texture_object *tObj0=ctx->Texture.Unit[0].CurrentD[2]; -  struct gl_texture_object *tObj1=ctx->Texture.Unit[1].CurrentD[2]; +  struct gl_texture_object *tObj0=ctx->Texture.Unit[0].Current2D; +  struct gl_texture_object *tObj1=ctx->Texture.Unit[1].Current2D;    GLuint envmode,ifmt,unitsmode;    int tmu0=0, tmu1=1; diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index 9f7280564c..3f9a3626b1 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -1,4 +1,4 @@ -/* $Id: osmesa.c,v 1.32 2000/11/17 21:01:40 brianp Exp $ */ +/* $Id: osmesa.c,v 1.33 2000/11/19 23:10:26 brianp Exp $ */  /*   * Mesa 3-D graphics library @@ -1239,7 +1239,7 @@ static void read_index_pixels( const GLcontext *ctx,   * Draw a flat-shaded, RGB line into an osmesa buffer.   */  static void flat_rgba_line( GLcontext *ctx, -                            SWvertex *vert0, SWvertex *vert1 ) +                            const SWvertex *vert0, const SWvertex *vert1 )  {     OSMesaContext osmesa = OSMESA_CONTEXT(ctx);     GLubyte *color = vert0->color; @@ -1261,7 +1261,7 @@ static void flat_rgba_line( GLcontext *ctx,   * Draw a flat-shaded, Z-less, RGB line into an osmesa buffer.   */  static void flat_rgba_z_line( GLcontext *ctx, -			      SWvertex *vert0, SWvertex *vert1 ) +			      const SWvertex *vert0, const SWvertex *vert1 )  {     OSMesaContext osmesa = OSMESA_CONTEXT(ctx);     GLubyte *color = vert0->color; @@ -1290,7 +1290,7 @@ static void flat_rgba_z_line( GLcontext *ctx,   * Draw a flat-shaded, alpha-blended, RGB line into an osmesa buffer.   */  static void flat_blend_rgba_line( GLcontext *ctx, -				  SWvertex *vert0, SWvertex *vert1 ) +				  const SWvertex *vert0, const SWvertex *vert1 )  {     OSMesaContext osmesa = OSMESA_CONTEXT(ctx);     GLint rshift = osmesa->rshift; @@ -1325,7 +1325,7 @@ static void flat_blend_rgba_line( GLcontext *ctx,   * Draw a flat-shaded, Z-less, alpha-blended, RGB line into an osmesa buffer.   */  static void flat_blend_rgba_z_line( GLcontext *ctx, -				    SWvertex *vert0, SWvertex *vert1 ) +				    const SWvertex *vert0, const SWvertex *vert1 )  {     OSMesaContext osmesa = OSMESA_CONTEXT(ctx);     GLint rshift = osmesa->rshift; @@ -1363,7 +1363,7 @@ static void flat_blend_rgba_z_line( GLcontext *ctx,   * Draw a flat-shaded, Z-less, alpha-blended, RGB line into an osmesa buffer.   */  static void flat_blend_rgba_z_line_write( GLcontext *ctx, -					  SWvertex *vert0, SWvertex *vert1 ) +					  const SWvertex *vert0, const SWvertex *vert1 )  {     OSMesaContext osmesa = OSMESA_CONTEXT(ctx);     GLint rshift = osmesa->rshift; @@ -1509,7 +1509,9 @@ osmesa_choose_line_function( GLcontext *ctx )   * Smooth-shaded, z-less triangle, RGBA color.   */  static void smooth_rgba_z_triangle( GLcontext *ctx,  -				    SWvertex *v0, SWvertex *v1, SWvertex *v2 ) +				    const SWvertex *v0, +                                    const SWvertex *v1, +                                    const SWvertex *v2 )  {     OSMesaContext osmesa = OSMESA_CONTEXT(ctx);     GLint rshift = osmesa->rshift; @@ -1551,7 +1553,9 @@ static void smooth_rgba_z_triangle( GLcontext *ctx,   * Flat-shaded, z-less triangle, RGBA color.   */  static void flat_rgba_z_triangle( GLcontext *ctx,  -				  SWvertex *v0, SWvertex *v1, SWvertex *v2 ) +				  const SWvertex *v0, +                                  const SWvertex *v1, +                                  const SWvertex *v2 )  {     OSMesaContext osmesa = OSMESA_CONTEXT(ctx);  #define INTERP_Z 1 diff --git a/src/mesa/drivers/x11/xm_line.c b/src/mesa/drivers/x11/xm_line.c index 0513d045ab..328ba65cee 100644 --- a/src/mesa/drivers/x11/xm_line.c +++ b/src/mesa/drivers/x11/xm_line.c @@ -1,4 +1,4 @@ -/* $Id: xm_line.c,v 1.10 2000/11/16 21:05:40 keithw Exp $ */ +/* $Id: xm_line.c,v 1.11 2000/11/19 23:10:26 brianp Exp $ */  /*   * Mesa 3-D graphics library @@ -54,7 +54,7 @@  /*   * Render an array of points into a pixmap, any pixel format.   */ -static void draw_points_ANY_pixmap( GLcontext *ctx, SWvertex *vert ) +static void draw_points_ANY_pixmap( GLcontext *ctx, const SWvertex *vert )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     XMesaDisplay *dpy = xmesa->xm_visual->display; @@ -117,7 +117,7 @@ void xmesa_choose_point( GLcontext *ctx )   * Draw a flat-shaded, PF_TRUECOLOR line into an XImage.   */  static void flat_TRUECOLOR_line( GLcontext *ctx, -                                 SWvertex *vert0, SWvertex *vert1 ) +                                 const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; @@ -138,7 +138,7 @@ static void flat_TRUECOLOR_line( GLcontext *ctx,   * Draw a flat-shaded, PF_8A8B8G8R line into an XImage.   */  static void flat_8A8B8G8R_line( GLcontext *ctx, -                                SWvertex *vert0, SWvertex *vert1 ) +                                const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; @@ -158,7 +158,7 @@ static void flat_8A8B8G8R_line( GLcontext *ctx,   * Draw a flat-shaded, PF_8R8G8B line into an XImage.   */  static void flat_8R8G8B_line( GLcontext *ctx, -                              SWvertex *vert0, SWvertex *vert1 ) +                              const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; @@ -178,7 +178,7 @@ static void flat_8R8G8B_line( GLcontext *ctx,   * Draw a flat-shaded, PF_8R8G8B24 line into an XImage.   */  static void flat_8R8G8B24_line( GLcontext *ctx, -                              SWvertex *vert0, SWvertex *vert1 ) +                              const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; @@ -201,7 +201,7 @@ static void flat_8R8G8B24_line( GLcontext *ctx,   * Draw a flat-shaded, PF_5R6G5B line into an XImage.   */  static void flat_5R6G5B_line( GLcontext *ctx, -                              SWvertex *vert0, SWvertex *vert1 ) +                              const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; @@ -221,7 +221,7 @@ static void flat_5R6G5B_line( GLcontext *ctx,   * Draw a flat-shaded, PF_DITHER_5R6G5B line into an XImage.   */  static void flat_DITHER_5R6G5B_line( GLcontext *ctx, -                                     SWvertex *vert0, SWvertex *vert1 ) +                                     const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; @@ -241,7 +241,7 @@ static void flat_DITHER_5R6G5B_line( GLcontext *ctx,   * Draw a flat-shaded, PF_DITHER 8-bit line into an XImage.   */  static void flat_DITHER8_line( GLcontext *ctx, -                               SWvertex *vert0, SWvertex *vert1 ) +                               const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; @@ -263,7 +263,7 @@ static void flat_DITHER8_line( GLcontext *ctx,   * Draw a flat-shaded, PF_LOOKUP 8-bit line into an XImage.   */  static void flat_LOOKUP8_line( GLcontext *ctx, -                               SWvertex *vert0, SWvertex *vert1 ) +                               const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; @@ -285,7 +285,7 @@ static void flat_LOOKUP8_line( GLcontext *ctx,   * Draw a flat-shaded, PF_HPCR line into an XImage.   */  static void flat_HPCR_line( GLcontext *ctx, -                            SWvertex *vert0, SWvertex *vert1 ) +                            const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; @@ -307,7 +307,7 @@ static void flat_HPCR_line( GLcontext *ctx,   * Draw a flat-shaded, Z-less, PF_TRUECOLOR line into an XImage.   */  static void flat_TRUECOLOR_z_line( GLcontext *ctx, -                                   SWvertex *vert0, SWvertex *vert1 ) +                                   const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; @@ -333,7 +333,7 @@ static void flat_TRUECOLOR_z_line( GLcontext *ctx,   * Draw a flat-shaded, Z-less, PF_8A8B8G8R line into an XImage.   */  static void flat_8A8B8G8R_z_line( GLcontext *ctx, -                                  SWvertex *vert0, SWvertex *vert1 ) +                                  const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; @@ -359,7 +359,7 @@ static void flat_8A8B8G8R_z_line( GLcontext *ctx,   * Draw a flat-shaded, Z-less, PF_8R8G8B line into an XImage.   */  static void flat_8R8G8B_z_line( GLcontext *ctx, -                                SWvertex *vert0, SWvertex *vert1 ) +                                const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; @@ -385,7 +385,7 @@ static void flat_8R8G8B_z_line( GLcontext *ctx,   * Draw a flat-shaded, Z-less, PF_8R8G8B24 line into an XImage.   */  static void flat_8R8G8B24_z_line( GLcontext *ctx, -                                    SWvertex *vert0, SWvertex *vert1 ) +                                    const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; @@ -412,7 +412,7 @@ static void flat_8R8G8B24_z_line( GLcontext *ctx,   * Draw a flat-shaded, Z-less, PF_5R6G5B line into an XImage.   */  static void flat_5R6G5B_z_line( GLcontext *ctx, -                                SWvertex *vert0, SWvertex *vert1 ) +                                const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; @@ -437,7 +437,7 @@ static void flat_5R6G5B_z_line( GLcontext *ctx,   * Draw a flat-shaded, Z-less, PF_DITHER_5R6G5B line into an XImage.   */  static void flat_DITHER_5R6G5B_z_line( GLcontext *ctx, -                                       SWvertex *vert0, SWvertex *vert1 ) +                                       const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; @@ -461,7 +461,7 @@ static void flat_DITHER_5R6G5B_z_line( GLcontext *ctx,   * Draw a flat-shaded, Z-less, PF_DITHER 8-bit line into an XImage.   */  static void flat_DITHER8_z_line( GLcontext *ctx, -                                 SWvertex *vert0, SWvertex *vert1 ) +                                 const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; @@ -488,7 +488,7 @@ static void flat_DITHER8_z_line( GLcontext *ctx,   * Draw a flat-shaded, Z-less, PF_LOOKUP 8-bit line into an XImage.   */  static void flat_LOOKUP8_z_line( GLcontext *ctx, -                                 SWvertex *vert0, SWvertex *vert1 ) +                                 const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; @@ -516,7 +516,7 @@ static void flat_LOOKUP8_z_line( GLcontext *ctx,   * Draw a flat-shaded, Z-less, PF_HPCR line into an XImage.   */  static void flat_HPCR_z_line( GLcontext *ctx, -                              SWvertex *vert0, SWvertex *vert1 ) +                              const SWvertex *vert0, const SWvertex *vert1 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = vert0->color; diff --git a/src/mesa/drivers/x11/xm_tri.c b/src/mesa/drivers/x11/xm_tri.c index 0badaede8c..c2b15034ad 100644 --- a/src/mesa/drivers/x11/xm_tri.c +++ b/src/mesa/drivers/x11/xm_tri.c @@ -1,4 +1,4 @@ -/* $Id: xm_tri.c,v 1.10 2000/11/16 21:05:40 keithw Exp $ */ +/* $Id: xm_tri.c,v 1.11 2000/11/19 23:10:26 brianp Exp $ */  /*   * Mesa 3-D graphics library @@ -56,9 +56,9 @@   * XImage, smooth, depth-buffered, PF_TRUECOLOR triangle.   */  static void smooth_TRUECOLOR_z_triangle( GLcontext *ctx, -                                         SWvertex *v0, -					 SWvertex *v1, -					 SWvertex *v2 ) +                                         const SWvertex *v0, +					 const SWvertex *v1, +					 const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     XMesaImage *img = xmesa->xm_buffer->backimage; @@ -91,9 +91,9 @@ static void smooth_TRUECOLOR_z_triangle( GLcontext *ctx,   * XImage, smooth, depth-buffered, PF_8A8B8G8R triangle.   */  static void smooth_8A8B8G8R_z_triangle( GLcontext *ctx, -					SWvertex *v0, -					SWvertex *v1, -					SWvertex *v2 ) +					const SWvertex *v0, +					const SWvertex *v1, +					const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_Z 1 @@ -125,9 +125,9 @@ static void smooth_8A8B8G8R_z_triangle( GLcontext *ctx,   * XImage, smooth, depth-buffered, PF_8R8G8B triangle.   */  static void smooth_8R8G8B_z_triangle( GLcontext *ctx, -				      SWvertex *v0, -				      SWvertex *v1, -				      SWvertex *v2 ) +				      const SWvertex *v0, +				      const SWvertex *v1, +				      const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_Z 1 @@ -159,9 +159,9 @@ static void smooth_8R8G8B_z_triangle( GLcontext *ctx,   * XImage, smooth, depth-buffered, PF_8R8G8B24 triangle.   */  static void smooth_8R8G8B24_z_triangle( GLcontext *ctx, -                                        SWvertex *v0, -					SWvertex *v1, -					SWvertex *v2 ) +                                        const SWvertex *v0, +					const SWvertex *v1, +					const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_Z 1 @@ -195,9 +195,9 @@ static void smooth_8R8G8B24_z_triangle( GLcontext *ctx,   * XImage, smooth, depth-buffered, PF_TRUEDITHER triangle.   */  static void smooth_TRUEDITHER_z_triangle( GLcontext *ctx, -					  SWvertex *v0, -					  SWvertex *v1, -					  SWvertex *v2 ) +					  const SWvertex *v0, +					  const SWvertex *v1, +					  const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     XMesaImage *img = xmesa->xm_buffer->backimage; @@ -229,9 +229,9 @@ static void smooth_TRUEDITHER_z_triangle( GLcontext *ctx,   * XImage, smooth, depth-buffered, PF_5R6G5B triangle.   */  static void smooth_5R6G5B_z_triangle( GLcontext *ctx, -                                      SWvertex *v0, -				      SWvertex *v1, -				      SWvertex *v2 ) +                                      const SWvertex *v0, +				      const SWvertex *v1, +				      const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_Z 1 @@ -263,9 +263,9 @@ static void smooth_5R6G5B_z_triangle( GLcontext *ctx,   * XImage, smooth, depth-buffered, PF_DITHER_5R6G5B triangle.   */  static void smooth_DITHER_5R6G5B_z_triangle( GLcontext *ctx, -                                             SWvertex *v0, -					     SWvertex *v1, -					     SWvertex *v2 ) +                                             const SWvertex *v0, +					     const SWvertex *v1, +					     const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_Z 1 @@ -297,9 +297,9 @@ static void smooth_DITHER_5R6G5B_z_triangle( GLcontext *ctx,   * XImage, smooth, depth-buffered, 8-bit, PF_DITHER8 triangle.   */  static void smooth_DITHER8_z_triangle( GLcontext *ctx, -                                       SWvertex *v0, -				       SWvertex *v1, -				       SWvertex *v2 ) +                                       const SWvertex *v0, +				       const SWvertex *v1, +				       const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_Z 1 @@ -332,9 +332,9 @@ static void smooth_DITHER8_z_triangle( GLcontext *ctx,   * XImage, smooth, depth-buffered, PF_DITHER triangle.   */  static void smooth_DITHER_z_triangle( GLcontext *ctx, -				      SWvertex *v0, -				      SWvertex *v1, -				      SWvertex *v2 ) +				      const SWvertex *v0, +				      const SWvertex *v1, +				      const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     XMesaImage *img = xmesa->xm_buffer->backimage; @@ -369,9 +369,9 @@ static void smooth_DITHER_z_triangle( GLcontext *ctx,   * XImage, smooth, depth-buffered, 8-bit PF_LOOKUP triangle.   */  static void smooth_LOOKUP8_z_triangle( GLcontext *ctx,  -				       SWvertex *v0, -				       SWvertex *v1, -				       SWvertex *v2 ) +				       const SWvertex *v0, +				       const SWvertex *v1, +				       const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_Z 1 @@ -405,9 +405,9 @@ static void smooth_LOOKUP8_z_triangle( GLcontext *ctx,   * XImage, smooth, depth-buffered, 8-bit PF_HPCR triangle.   */  static void smooth_HPCR_z_triangle( GLcontext *ctx,  -				    SWvertex *v0, -				    SWvertex *v1, -				    SWvertex *v2 ) +				    const SWvertex *v0, +				    const SWvertex *v1, +				    const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_Z 1 @@ -439,9 +439,9 @@ static void smooth_HPCR_z_triangle( GLcontext *ctx,   * XImage, flat, depth-buffered, PF_TRUECOLOR triangle.   */  static void flat_TRUECOLOR_z_triangle( GLcontext *ctx, -                        	       SWvertex *v0, -				       SWvertex *v1, -				       SWvertex *v2 ) +                        	       const SWvertex *v0, +				       const SWvertex *v1, +				       const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     XMesaImage *img = xmesa->xm_buffer->backimage; @@ -472,9 +472,9 @@ static void flat_TRUECOLOR_z_triangle( GLcontext *ctx,   * XImage, flat, depth-buffered, PF_8A8B8G8R triangle.   */  static void flat_8A8B8G8R_z_triangle( GLcontext *ctx,  -				      SWvertex *v0, -				      SWvertex *v1, -				      SWvertex *v2 ) +				      const SWvertex *v0, +				      const SWvertex *v1, +				      const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_Z 1 @@ -506,9 +506,9 @@ static void flat_8A8B8G8R_z_triangle( GLcontext *ctx,   * XImage, flat, depth-buffered, PF_8R8G8B triangle.   */  static void flat_8R8G8B_z_triangle( GLcontext *ctx,  -				    SWvertex *v0, -				    SWvertex *v1, -				    SWvertex *v2 ) +				    const SWvertex *v0, +				    const SWvertex *v1, +				    const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_Z 1 @@ -540,9 +540,9 @@ static void flat_8R8G8B_z_triangle( GLcontext *ctx,   * XImage, flat, depth-buffered, PF_8R8G8B24 triangle.   */  static void flat_8R8G8B24_z_triangle( GLcontext *ctx,  -				      SWvertex *v0, -				      SWvertex *v1, -				      SWvertex *v2 ) +				      const SWvertex *v0, +				      const SWvertex *v1, +				      const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = v0->color; @@ -575,9 +575,9 @@ static void flat_8R8G8B24_z_triangle( GLcontext *ctx,   * XImage, flat, depth-buffered, PF_TRUEDITHER triangle.   */  static void flat_TRUEDITHER_z_triangle( GLcontext *ctx,  -					SWvertex *v0, -					SWvertex *v1, -					SWvertex *v2 ) +					const SWvertex *v0, +					const SWvertex *v1, +					const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     XMesaImage *img = xmesa->xm_buffer->backimage; @@ -607,9 +607,9 @@ static void flat_TRUEDITHER_z_triangle( GLcontext *ctx,   * XImage, flat, depth-buffered, PF_5R6G5B triangle.   */  static void flat_5R6G5B_z_triangle( GLcontext *ctx,  -				    SWvertex *v0, -				    SWvertex *v1, -				    SWvertex *v2 ) +				    const SWvertex *v0, +				    const SWvertex *v1, +				    const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_Z 1 @@ -641,9 +641,9 @@ static void flat_5R6G5B_z_triangle( GLcontext *ctx,   * XImage, flat, depth-buffered, PF_DITHER_5R6G5B triangle.   */  static void flat_DITHER_5R6G5B_z_triangle( GLcontext *ctx,  -					   SWvertex *v0, -					   SWvertex *v1, -					   SWvertex *v2 ) +					   const SWvertex *v0, +					   const SWvertex *v1, +					   const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = v0->color; @@ -674,9 +674,9 @@ static void flat_DITHER_5R6G5B_z_triangle( GLcontext *ctx,   * XImage, flat, depth-buffered, 8-bit PF_DITHER triangle.   */  static void flat_DITHER8_z_triangle( GLcontext *ctx,  -				     SWvertex *v0, -				     SWvertex *v1, -				     SWvertex *v2 ) +				     const SWvertex *v0, +				     const SWvertex *v1, +				     const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_Z 1 @@ -709,9 +709,9 @@ static void flat_DITHER8_z_triangle( GLcontext *ctx,   * XImage, flat, depth-buffered, PF_DITHER triangle.   */  static void flat_DITHER_z_triangle( GLcontext *ctx,  -				    SWvertex *v0, -				    SWvertex *v1, -				    SWvertex *v2 ) +				    const SWvertex *v0, +				    const SWvertex *v1, +				    const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     XMesaImage *img = xmesa->xm_buffer->backimage; @@ -743,9 +743,9 @@ static void flat_DITHER_z_triangle( GLcontext *ctx,   * XImage, flat, depth-buffered, 8-bit PF_HPCR triangle.   */  static void flat_HPCR_z_triangle( GLcontext *ctx,  -				  SWvertex *v0, -				  SWvertex *v1, -				  SWvertex *v2 ) +				  const SWvertex *v0, +				  const SWvertex *v1, +				  const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_Z 1 @@ -778,9 +778,9 @@ static void flat_HPCR_z_triangle( GLcontext *ctx,   * XImage, flat, depth-buffered, 8-bit PF_LOOKUP triangle.   */  static void flat_LOOKUP8_z_triangle( GLcontext *ctx,  -				     SWvertex *v0, -				     SWvertex *v1, -				     SWvertex *v2 ) +				     const SWvertex *v0, +				     const SWvertex *v1, +				     const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_Z 1 @@ -816,9 +816,9 @@ static void flat_LOOKUP8_z_triangle( GLcontext *ctx,   * XImage, smooth, NON-depth-buffered, PF_TRUECOLOR triangle.   */  static void smooth_TRUECOLOR_triangle( GLcontext *ctx,  -				       SWvertex *v0, -				       SWvertex *v1, -				       SWvertex *v2 ) +				       const SWvertex *v0, +				       const SWvertex *v1, +				       const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     XMesaImage *img = xmesa->xm_buffer->backimage; @@ -841,9 +841,9 @@ static void smooth_TRUECOLOR_triangle( GLcontext *ctx,   * XImage, smooth, NON-depth-buffered, PF_8A8B8G8R triangle.   */  static void smooth_8A8B8G8R_triangle( GLcontext *ctx,  -				      SWvertex *v0, -				      SWvertex *v1, -				      SWvertex *v2 ) +				      const SWvertex *v0, +				      const SWvertex *v1, +				      const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_RGB 1 @@ -868,9 +868,9 @@ static void smooth_8A8B8G8R_triangle( GLcontext *ctx,   * XImage, smooth, NON-depth-buffered, PF_8R8G8B triangle.   */  static void smooth_8R8G8B_triangle( GLcontext *ctx,  -				    SWvertex *v0, -				    SWvertex *v1, -				    SWvertex *v2 ) +				    const SWvertex *v0, +				    const SWvertex *v1, +				    const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_RGB 1 @@ -895,9 +895,9 @@ static void smooth_8R8G8B_triangle( GLcontext *ctx,   * XImage, smooth, NON-depth-buffered, PF_8R8G8B triangle.   */  static void smooth_8R8G8B24_triangle( GLcontext *ctx,  -				      SWvertex *v0, -				      SWvertex *v1, -				      SWvertex *v2 ) +				      const SWvertex *v0, +				      const SWvertex *v1, +				      const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_RGB 1 @@ -924,9 +924,9 @@ static void smooth_8R8G8B24_triangle( GLcontext *ctx,   * XImage, smooth, NON-depth-buffered, PF_TRUEDITHER triangle.   */  static void smooth_TRUEDITHER_triangle( GLcontext *ctx,  -					SWvertex *v0, -					SWvertex *v1, -					SWvertex *v2 ) +					const SWvertex *v0, +					const SWvertex *v1, +					const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     XMesaImage *img = xmesa->xm_buffer->backimage; @@ -950,9 +950,9 @@ static void smooth_TRUEDITHER_triangle( GLcontext *ctx,   * XImage, smooth, NON-depth-buffered, PF_5R6G5B triangle.   */  static void smooth_5R6G5B_triangle( GLcontext *ctx,  -				    SWvertex *v0, -				    SWvertex *v1, -				    SWvertex *v2 ) +				    const SWvertex *v0, +				    const SWvertex *v1, +				    const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_RGB 1 @@ -977,9 +977,9 @@ static void smooth_5R6G5B_triangle( GLcontext *ctx,   * XImage, smooth, NON-depth-buffered, PF_DITHER_5R6G5B triangle.   */  static void smooth_DITHER_5R6G5B_triangle( GLcontext *ctx,  -					   SWvertex *v0, -					   SWvertex *v1, -					   SWvertex *v2 ) +					   const SWvertex *v0, +					   const SWvertex *v1, +					   const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_RGB 1 @@ -1004,9 +1004,9 @@ static void smooth_DITHER_5R6G5B_triangle( GLcontext *ctx,   * XImage, smooth, NON-depth-buffered, 8-bit PF_DITHER triangle.   */  static void smooth_DITHER8_triangle( GLcontext *ctx,  -				     SWvertex *v0, -				     SWvertex *v1, -				     SWvertex *v2 ) +				     const SWvertex *v0, +				     const SWvertex *v1, +				     const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define INTERP_RGB 1 @@ -1032,9 +1032,9 @@ static void smooth_DITHER8_triangle( GLcontext *ctx,   * XImage, smooth, NON-depth-buffered, PF_DITHER triangle.   */  static void smooth_DITHER_triangle( GLcontext *ctx,  -				    SWvertex *v0, -				    SWvertex *v1, -				    SWvertex *v2 ) +				    const SWvertex *v0, +				    const SWvertex *v1, +				    const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     XMesaImage *img = xmesa->xm_buffer->backimage; @@ -1059,9 +1059,9 @@ static void smooth_DITHER_triangle( GLcontext *ctx,   * XImage, smooth, NON-depth-buffered, 8-bit PF_LOOKUP triangle.   */  static void smooth_LOOKUP8_triangle( GLcontext *ctx,  -				     SWvertex *v0, -				     SWvertex *v1, -				     SWvertex *v2 ) +				     const SWvertex *v0, +				     const SWvertex *v1, +				     const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; @@ -1089,9 +1089,9 @@ static void smooth_LOOKUP8_triangle( GLcontext *ctx,   * XImage, smooth, NON-depth-buffered, 8-bit PF_HPCR triangle.   */  static void smooth_HPCR_triangle( GLcontext *ctx,  -				  SWvertex *v0, -				  SWvertex *v1, -				  SWvertex *v2 ) +				  const SWvertex *v0, +				  const SWvertex *v1, +				  const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx; @@ -1117,9 +1117,9 @@ static void smooth_HPCR_triangle( GLcontext *ctx,   * XImage, flat, NON-depth-buffered, PF_TRUECOLOR triangle.   */  static void flat_TRUECOLOR_triangle( GLcontext *ctx,  -				     SWvertex *v0, -				     SWvertex *v1, -				     SWvertex *v2 ) +				     const SWvertex *v0, +				     const SWvertex *v1, +				     const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     XMesaImage *img = xmesa->xm_buffer->backimage; @@ -1142,9 +1142,9 @@ static void flat_TRUECOLOR_triangle( GLcontext *ctx,   * XImage, flat, NON-depth-buffered, PF_8A8B8G8R triangle.   */  static void flat_8A8B8G8R_triangle( GLcontext *ctx,  -				    SWvertex *v0, -				    SWvertex *v1, -				    SWvertex *v2 ) +				    const SWvertex *v0, +				    const SWvertex *v1, +				    const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define PIXEL_ADDRESS(X,Y) PIXELADDR4(xmesa->xm_buffer,X,Y) @@ -1169,9 +1169,9 @@ static void flat_8A8B8G8R_triangle( GLcontext *ctx,   * XImage, flat, NON-depth-buffered, PF_8R8G8B triangle.   */  static void flat_8R8G8B_triangle( GLcontext *ctx,  -				  SWvertex *v0, -				  SWvertex *v1, -				  SWvertex *v2 ) +				  const SWvertex *v0, +				  const SWvertex *v1, +				  const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define PIXEL_ADDRESS(X,Y) PIXELADDR4(xmesa->xm_buffer,X,Y) @@ -1196,9 +1196,9 @@ static void flat_8R8G8B_triangle( GLcontext *ctx,   * XImage, flat, NON-depth-buffered, PF_8R8G8B24 triangle.   */  static void flat_8R8G8B24_triangle( GLcontext *ctx,  -				    SWvertex *v0, -				    SWvertex *v1, -				    SWvertex *v2 ) +				    const SWvertex *v0, +				    const SWvertex *v1, +				    const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = v0->color; @@ -1223,9 +1223,9 @@ static void flat_8R8G8B24_triangle( GLcontext *ctx,   * XImage, flat, NON-depth-buffered, PF_TRUEDITHER triangle.   */  static void flat_TRUEDITHER_triangle( GLcontext *ctx,  -				      SWvertex *v0, -				      SWvertex *v1, -				      SWvertex *v2 ) +				      const SWvertex *v0, +				      const SWvertex *v1, +				      const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     XMesaImage *img = xmesa->xm_buffer->backimage; @@ -1248,9 +1248,9 @@ static void flat_TRUEDITHER_triangle( GLcontext *ctx,   * XImage, flat, NON-depth-buffered, PF_5R6G5B triangle.   */  static void flat_5R6G5B_triangle( GLcontext *ctx,  -				  SWvertex *v0, -				  SWvertex *v1, -				  SWvertex *v2 ) +				  const SWvertex *v0, +				  const SWvertex *v1, +				  const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define PIXEL_ADDRESS(X,Y) PIXELADDR2(xmesa->xm_buffer,X,Y) @@ -1275,9 +1275,9 @@ static void flat_5R6G5B_triangle( GLcontext *ctx,   * XImage, flat, NON-depth-buffered, PF_DITHER_5R6G5B triangle.   */  static void flat_DITHER_5R6G5B_triangle( GLcontext *ctx,  -					 SWvertex *v0, -					 SWvertex *v1, -					 SWvertex *v2 ) +					 const SWvertex *v0, +					 const SWvertex *v1, +					 const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     const GLubyte *color = v0->color; @@ -1301,9 +1301,9 @@ static void flat_DITHER_5R6G5B_triangle( GLcontext *ctx,   * XImage, flat, NON-depth-buffered, 8-bit PF_DITHER triangle.   */  static void flat_DITHER8_triangle( GLcontext *ctx,  -				   SWvertex *v0, -				   SWvertex *v1, -				   SWvertex *v2 ) +				   const SWvertex *v0, +				   const SWvertex *v1, +				   const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) @@ -1329,9 +1329,9 @@ static void flat_DITHER8_triangle( GLcontext *ctx,   * XImage, flat, NON-depth-buffered, PF_DITHER triangle.   */  static void flat_DITHER_triangle( GLcontext *ctx,  -				  SWvertex *v0, -				  SWvertex *v1, -				  SWvertex *v2 ) +				  const SWvertex *v0, +				  const SWvertex *v1, +				  const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;     XMesaImage *img = xmesa->xm_buffer->backimage; @@ -1355,9 +1355,9 @@ static void flat_DITHER_triangle( GLcontext *ctx,   * XImage, flat, NON-depth-buffered, 8-bit PF_HPCR triangle.   */  static void flat_HPCR_triangle( GLcontext *ctx,  -				SWvertex *v0, -				SWvertex *v1, -				SWvertex *v2 ) +				const SWvertex *v0, +				const SWvertex *v1, +				const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) @@ -1383,9 +1383,9 @@ static void flat_HPCR_triangle( GLcontext *ctx,   * XImage, flat, NON-depth-buffered, 8-bit PF_LOOKUP triangle.   */  static void flat_LOOKUP8_triangle( GLcontext *ctx,  -				   SWvertex *v0, -				   SWvertex *v1, -				   SWvertex *v2 ) +				   const SWvertex *v0, +				   const SWvertex *v1, +				   const SWvertex *v2 )  {     XMesaContext xmesa = (XMesaContext) ctx->DriverCtx;  #define PIXEL_ADDRESS(X,Y) PIXELADDR1(xmesa->xm_buffer,X,Y) | 
