Fix "3D driver claims to not support visual ..." warnings.
authorIan Romanick <idr@us.ibm.com>
Mon, 13 Nov 2006 20:54:51 +0000 (20:54 +0000)
committerIan Romanick <idr@us.ibm.com>
Mon, 13 Nov 2006 20:54:51 +0000 (20:54 +0000)
In 16-bit color modes the 3D driver was erroneously creating fbconfigs
with 16-bits of accumulation alpha.  Since the 2D driver always
generates modes with zero bits of alpha, the lists of fbconfigs did
not match and warnings were generated by libGL.

src/mesa/drivers/dri/tdfx/tdfx_screen.c

index 0a4499c..5e3d07f 100644 (file)
@@ -393,7 +393,7 @@ static __GLcontextModes *tdfxFillInModes(unsigned pixel_bits,
                            m->accumRedBits     = accum ? 16 : 0;
                            m->accumGreenBits   = accum ? 16 : 0;
                            m->accumBlueBits    = accum ? 16 : 0;
-                           m->accumAlphaBits   = accum ? 16 : 0;
+                           m->accumAlphaBits   = (accum && deep) ? 16 : 0;
                            m->stencilBits      = stencil ? 8 : 0;
                            m->depthBits        = deep
                                                  ? (depth ? 24 : 0)