summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/glide
diff options
context:
space:
mode:
authorDaniel Borca <[email protected]>2004-05-12 05:36:24 +0000
committerDaniel Borca <[email protected]>2004-05-12 05:36:24 +0000
commite61d60eb813ae1891e5c9f65c16f23cc45a48841 (patch)
tree1e58f434634a5685ddf830056210de90201d5488 /src/mesa/drivers/glide
parenta156b49800c1419785d0709b78ef0d35e6dab5df (diff)
minor fixes
Diffstat (limited to 'src/mesa/drivers/glide')
-rw-r--r--src/mesa/drivers/glide/fxapi.c2
-rw-r--r--src/mesa/drivers/glide/fxdd.c8
2 files changed, 3 insertions, 7 deletions
diff --git a/src/mesa/drivers/glide/fxapi.c b/src/mesa/drivers/glide/fxapi.c
index 5d7bcdb2c30..e827ec31ddc 100644
--- a/src/mesa/drivers/glide/fxapi.c
+++ b/src/mesa/drivers/glide/fxapi.c
@@ -500,6 +500,8 @@ fxMesaCreateContext(GLuint win,
pixFmt = GR_PIXFMT_RGB_565;
}
break;
+ case 24:
+ fxMesa->colDepth = 32;
case 32:
redBits = 8;
greenBits = 8;
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c
index ffebcdae464..93613c8db24 100644
--- a/src/mesa/drivers/glide/fxdd.c
+++ b/src/mesa/drivers/glide/fxdd.c
@@ -152,15 +152,9 @@ static void fxDDClear( GLcontext *ctx,
fxMesaContext fxMesa = FX_CONTEXT(ctx);
GLbitfield softwareMask = mask & (DD_ACCUM_BIT);
const GLuint stencil_size = fxMesa->haveHwStencil ? ctx->Visual.stencilBits : 0;
- const FxU32 clearD = (FxU32) (((1 << ctx->Visual.depthBits) - 1) * ctx->Depth.Clear);
+ const FxU32 clearD = (FxU32) (ctx->DepthMaxF * ctx->Depth.Clear);
const FxU8 clearS = (FxU8) (ctx->Stencil.Clear & 0xff);
- /* [dBorca] Hack alert:
- * if we set Mesa for 32bit depth, we'll get
- * clearD == 0
- * due to 32bit integer overflow!
- */
-
if ( TDFX_DEBUG & MESA_VERBOSE ) {
fprintf( stderr, "fxDDClear( %d, %d, %d, %d )\n",
(int) x, (int) y, (int) width, (int) height );