Calculate haveAccumBuffer, haveDepthBuffer and haveStencilBuffer in
authorKeith Whitwell <keith@tungstengraphics.com>
Tue, 22 Mar 2005 13:16:20 +0000 (13:16 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Tue, 22 Mar 2005 13:16:20 +0000 (13:16 +0000)
driFillInModes().

src/mesa/drivers/dri/common/utils.c

index 85527f9..1b82383 100644 (file)
@@ -593,6 +593,13 @@ driFillInModes( __GLcontextModes ** ptr_to_modes,
                    modes->swapMethod = db_modes[i];
                }
 
+               modes->haveAccumBuffer = ((modes->accumRedBits +
+                                          modes->accumGreenBits +
+                                          modes->accumBlueBits +
+                                          modes->accumAlphaBits) > 0);
+               modes->haveDepthBuffer = (modes->depthBits > 0);
+               modes->haveStencilBuffer = (modes->stencilBits > 0);
+
                modes = modes->next;
            }
        }