aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_alpha.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-10-04 19:10:06 +0000
committerBrian Paul <[email protected]>2002-10-04 19:10:06 +0000
commitfc80ad6e62fb2b53d53756593099330477a44c52 (patch)
tree0b47f3ee84d613dfa2264d6f23e5c2a60cecc9ba /src/mesa/swrast/s_alpha.c
parentf782b8189e718974a40d72ac4f6b8d213ca99e1e (diff)
Changed a number of context fields from GLchan to GLfloat (such as ClearColor).
Also changed parameter types for some driver functions (like ctx->Driver.Clear- Color). Updated all the device drivers. Someday, we want to support 8, 16 and 32-bit channels dynamically at runtime.
Diffstat (limited to 'src/mesa/swrast/s_alpha.c')
-rw-r--r--src/mesa/swrast/s_alpha.c6
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) {