diff options
author | Brian Paul <[email protected]> | 2000-12-13 00:47:10 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2000-12-13 00:47:10 +0000 |
commit | 3cbbef53bcf9a74beec3d6699a03e8d0c2eb24e2 (patch) | |
tree | cbbb4eae575c4a69b3d09a4276e5926a704e3897 /src/mesa | |
parent | 062bc07bde9520d12c3cc051779d67a9543c0ff7 (diff) |
tweaked truecolor dither kernel setup code
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/x11/xm_api.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index fd341736e0c..091e0770097 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -1,4 +1,4 @@ -/* $Id: xm_api.c,v 1.11 2000/12/08 17:37:00 brianp Exp $ */ +/* $Id: xm_api.c,v 1.12 2000/12/13 00:47:10 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1067,7 +1067,7 @@ static void setup_truecolor( XMesaVisual v, XMesaBuffer buffer, GLint rBits = bitcount(rmask); GLint gBits = bitcount(gmask); GLint bBits = bitcount(bmask); - GLint minBits; + GLint maxBits; GLuint i; /* convert pixel components in [0,_mask] to RGB values in [0,255] */ @@ -1096,11 +1096,11 @@ static void setup_truecolor( XMesaVisual v, XMesaBuffer buffer, } /* setup dithering kernel */ - minBits = rBits; - if (gBits < minBits) minBits = gBits; - if (bBits < minBits) minBits = bBits; + maxBits = rBits; + if (gBits > maxBits) maxBits = gBits; + if (bBits > maxBits) maxBits = bBits; for (i=0;i<16;i++) { - v->Kernel[i] = kernel[i] >> minBits; + v->Kernel[i] = kernel[i] >> maxBits; } v->undithered_pf = PF_TRUECOLOR; |