From e61d60eb813ae1891e5c9f65c16f23cc45a48841 Mon Sep 17 00:00:00 2001 From: Daniel Borca Date: Wed, 12 May 2004 05:36:24 +0000 Subject: [PATCH] minor fixes --- src/mesa/drivers/glide/fxapi.c | 2 ++ src/mesa/drivers/glide/fxdd.c | 8 +------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/glide/fxapi.c b/src/mesa/drivers/glide/fxapi.c index 5d7bcdb..e827ec3 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 ffebcda..93613c8 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 ); -- 2.7.4