From 8115e29ddc2ea0407c3680bcc17c845f0db86332 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 4 Nov 2002 20:29:04 +0000 Subject: misc driver updates (Daniel Borca) --- src/mesa/drivers/glide/fxdd.c | 5 +++-- src/mesa/drivers/glide/fxddspan.c | 4 ++-- src/mesa/drivers/glide/fxdrv.h | 4 ++-- src/mesa/drivers/glide/fxsetup.c | 7 ++++--- src/mesa/drivers/glide/fxvb.c | 10 +++++----- 5 files changed, 16 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c index fddd63e440..35dd6553b8 100644 --- a/src/mesa/drivers/glide/fxdd.c +++ b/src/mesa/drivers/glide/fxdd.c @@ -1,4 +1,4 @@ -/* $Id: fxdd.c,v 1.93 2002/10/29 15:03:16 brianp Exp $ */ +/* $Id: fxdd.c,v 1.94 2002/11/04 20:29:04 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -45,6 +45,7 @@ #include "fxdrv.h" #include "enums.h" #include "extensions.h" +#include "mmath.h" #include "texstore.h" #include "swrast/swrast.h" #include "swrast_setup/swrast_setup.h" @@ -698,7 +699,7 @@ fxDDInitFxMesaContext(fxMesaContext fxMesa) fxMesa->unitsState.alphaTestEnabled = GL_FALSE; fxMesa->unitsState.alphaTestFunc = GR_CMP_ALWAYS; - fxMesa->unitsState.alphaTestRefValue = 0; + fxMesa->unitsState.alphaTestRefValue = 0.0; fxMesa->unitsState.blendEnabled = GL_FALSE; fxMesa->unitsState.blendSrcFuncRGB = GR_BLEND_ONE; diff --git a/src/mesa/drivers/glide/fxddspan.c b/src/mesa/drivers/glide/fxddspan.c index f9108cfd19..04d832d8d9 100644 --- a/src/mesa/drivers/glide/fxddspan.c +++ b/src/mesa/drivers/glide/fxddspan.c @@ -1,4 +1,4 @@ -/* $Id: fxddspan.c,v 1.21 2002/10/11 17:41:05 brianp Exp $ */ +/* $Id: fxddspan.c,v 1.22 2002/11/04 20:29:04 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -542,7 +542,7 @@ fxDDSetBuffer(GLcontext * ctx, GLframebuffer * buffer, GLuint bufferBit) (void) buffer; if (MESA_VERBOSE & VERBOSE_DRIVER) { - fprintf(stderr, "fxmesa: fxDDSetBuffer(%x)\n", (int) mode); + fprintf(stderr, "fxmesa: fxDDSetBuffer(%x)\n", (int) bufferBit); } if (bufferBit == FRONT_LEFT_BIT) { diff --git a/src/mesa/drivers/glide/fxdrv.h b/src/mesa/drivers/glide/fxdrv.h index d6d3be5b70..ce72d7acfa 100644 --- a/src/mesa/drivers/glide/fxdrv.h +++ b/src/mesa/drivers/glide/fxdrv.h @@ -1,4 +1,4 @@ -/* $Id: fxdrv.h,v 1.54 2002/10/24 23:57:23 brianp Exp $ */ +/* $Id: fxdrv.h,v 1.55 2002/11/04 20:29:04 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -503,7 +503,7 @@ extern void fxDDTexPalette(GLcontext *, struct gl_texture_object *); extern void fxDDTexUseGlbPalette(GLcontext *, GLboolean); extern void fxDDEnable(GLcontext *, GLenum, GLboolean); -extern void fxDDAlphaFunc(GLcontext *, GLenum, GLchan); +extern void fxDDAlphaFunc(GLcontext *, GLenum, GLfloat); extern void fxDDBlendFunc(GLcontext *, GLenum, GLenum); extern void fxDDDepthMask(GLcontext *, GLboolean); extern void fxDDDepthFunc(GLcontext *, GLenum); diff --git a/src/mesa/drivers/glide/fxsetup.c b/src/mesa/drivers/glide/fxsetup.c index bf51635b31..48a1ae6926 100644 --- a/src/mesa/drivers/glide/fxsetup.c +++ b/src/mesa/drivers/glide/fxsetup.c @@ -1,4 +1,4 @@ -/* $Id: fxsetup.c,v 1.37 2002/06/15 03:03:10 brianp Exp $ */ +/* $Id: fxsetup.c,v 1.38 2002/11/04 20:29:04 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1173,7 +1173,7 @@ fxSetupBlend(GLcontext * ctx) /************************************************************************/ void -fxDDAlphaFunc(GLcontext * ctx, GLenum func, GLchan ref) +fxDDAlphaFunc(GLcontext * ctx, GLenum func, GLfloat ref) { fxMesaContext fxMesa = (fxMesaContext) ctx->DriverCtx; tfxUnitsState *us = &fxMesa->unitsState; @@ -1229,8 +1229,9 @@ fxSetupAlphaTest(GLcontext * ctx) tfxUnitsState *us = &fxMesa->unitsState; if (us->alphaTestEnabled) { + GrAlpha_t ref = (GLint) (us->alphaTestRefValue * 255.0); FX_grAlphaTestFunction(us->alphaTestFunc); - FX_grAlphaTestReferenceValue(us->alphaTestRefValue); + FX_grAlphaTestReferenceValue(ref); } else FX_grAlphaTestFunction(GR_CMP_ALWAYS); diff --git a/src/mesa/drivers/glide/fxvb.c b/src/mesa/drivers/glide/fxvb.c index 00203f17fb..d14e53d21d 100644 --- a/src/mesa/drivers/glide/fxvb.c +++ b/src/mesa/drivers/glide/fxvb.c @@ -1,4 +1,4 @@ -/* $Id: fxvb.c,v 1.15 2002/10/24 23:57:23 brianp Exp $ */ +/* $Id: fxvb.c,v 1.16 2002/11/04 20:29:04 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -304,18 +304,18 @@ void fxBuildVertices( GLcontext *ctx, GLuint start, GLuint count, if (!newinputs) return; - if (newinputs & VERT_CLIP) { + if (newinputs & VERT_BIT_CLIP) { setup_tab[fxMesa->SetupIndex].emit( ctx, start, count, v ); } else { GLuint ind = 0; - if (newinputs & VERT_RGBA) + if (newinputs & VERT_BIT_COLOR0) ind |= SETUP_RGBA; - if (newinputs & VERT_TEX0) + if (newinputs & VERT_BIT_TEX0) ind |= SETUP_TMU0; - if (newinputs & VERT_TEX1) + if (newinputs & VERT_BIT_TEX1) ind |= SETUP_TMU0|SETUP_TMU1; if (fxMesa->SetupIndex & SETUP_PTEX) -- cgit v1.2.3