diff options
Diffstat (limited to 'src/mesa/swrast/s_alpha.c')
-rw-r--r-- | src/mesa/swrast/s_alpha.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_alpha.c b/src/mesa/swrast/s_alpha.c index 79e27d5755e..5cbfe8617a5 100644 --- a/src/mesa/swrast/s_alpha.c +++ b/src/mesa/swrast/s_alpha.c @@ -1,4 +1,4 @@ -/* $Id: s_alpha.c,v 1.11 2002/08/07 00:45:07 brianp Exp $ */ +/* $Id: s_alpha.c,v 1.12 2002/10/04 19:10:12 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -50,11 +50,13 @@ GLint _mesa_alpha_test( const GLcontext *ctx, struct sw_span *span ) { const GLchan (*rgba)[4] = (const GLchan (*)[4]) span->array->rgba; - const GLchan ref = ctx->Color.AlphaRef; + GLchan ref; const GLuint n = span->end; GLubyte *mask = span->array->mask; GLuint i; + CLAMPED_FLOAT_TO_CHAN(ref, ctx->Color.AlphaRef); + if (span->arrayMask & SPAN_RGBA) { /* Use the array values */ switch (ctx->Color.AlphaFunc) { |