From b305028464f02947c0cce0476af0e35f4ed1fafa Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 4 Dec 2003 03:19:46 +0000 Subject: Port over changes from XFree86/Mesa 5.0.2, mostly to silence compiler warnings. --- src/mesa/swrast/s_drawpix.c | 6 ------ src/mesa/swrast/s_pointtemp.h | 10 +++++++--- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'src/mesa/swrast') diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index 8e97b619bf..5d4093f32c 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -125,7 +125,6 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y, GLint skipPixels = unpack->SkipPixels; GLint skipRows = unpack->SkipRows; GLint rowLength; - GLdepth zSpan[MAX_WIDTH]; /* only used when zooming */ GLint zoomY0 = 0; if (unpack->RowLength > 0) @@ -185,13 +184,8 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y, return GL_TRUE; } else { - /* setup array of fragment Z value to pass to zoom function */ - GLdepth z = (GLdepth) (ctx->Current.RasterPos[2] * ctx->DepthMaxF); - GLint i; if (drawWidth > MAX_WIDTH) return GL_FALSE; /* fall back to general case path */ - for (i=0; iCurrent.RasterPos[1]); diff --git a/src/mesa/swrast/s_pointtemp.h b/src/mesa/swrast/s_pointtemp.h index f21f4f634d..1ae1c946ff 100644 --- a/src/mesa/swrast/s_pointtemp.h +++ b/src/mesa/swrast/s_pointtemp.h @@ -63,10 +63,10 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) #if FLAGS & (ATTENUATE | LARGE | SMOOTH | SPRITE) GLfloat size; #endif -#if FLAGS & ATTENUATE +#if FLAGS & RGBA +#if (FLAGS & ATTENUATE) && (FLAGS & SMOOTH) GLfloat alphaAtten; #endif -#if FLAGS & RGBA const GLchan red = vert->color[0]; const GLchan green = vert->color[1]; const GLchan blue = vert->color[2]; @@ -134,12 +134,16 @@ NAME ( GLcontext *ctx, const SWvertex *vert ) #if FLAGS & ATTENUATE if (vert->pointSize >= ctx->Point.Threshold) { size = MIN2(vert->pointSize, ctx->Point.MaxSize); +#if (FLAGS & RGBA) && (FLAGS & SMOOTH) alphaAtten = 1.0F; +#endif } else { +#if (FLAGS & RGBA) && (FLAGS & SMOOTH) GLfloat dsize = vert->pointSize / ctx->Point.Threshold; - size = MAX2(ctx->Point.Threshold, ctx->Point.MinSize); alphaAtten = dsize * dsize; +#endif + size = MAX2(ctx->Point.Threshold, ctx->Point.MinSize); } #elif FLAGS & (LARGE | SMOOTH | SPRITE) size = ctx->Point._Size; -- cgit v1.2.3