Mesa (mesa_7_5_branch): radeon: With DRI1, if we have HW stencil, only expose fbconfigs with stencil.
Michel Dänzer
daenzer at kemper.freedesktop.org
Mon Jul 20 18:37:20 UTC 2009
Module: Mesa
Branch: mesa_7_5_branch
Commit: 5ed440400573631f540701f3efd479d8c1592007
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5ed440400573631f540701f3efd479d8c1592007
Author: Michel Dänzer <daenzer at vmware.com>
Date: Mon Jul 20 20:26:28 2009 +0200
radeon: With DRI1, if we have HW stencil, only expose fbconfigs with stencil.
Otherwise simple apps like glxgears pick up a DirectColor visual since the X
server mixes the depth 32 visual in with the other GLX visuals, and this seems
to result in a (mostly) black screen due to a bad ColorMap for a lot of people.
The bad ColorMap may be a bug in the apps, the X server or X driver, and
regardless of that I think the X server should ideally make the depth 32 GLX
visual separate from the rest again, but in the meantime this makes us cope.
(depth_bits is either 16 or 24, never 0)
---
src/mesa/drivers/dri/radeon/radeon_screen.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 791f598..a977bed 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -283,12 +283,12 @@ radeonFillInModes( __DRIscreenPrivate *psp,
* with a stencil buffer. It will be a sw fallback, but some apps won't
* care about that.
*/
- stencil_bits_array[0] = 0;
+ stencil_bits_array[0] = stencil_bits;
stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits;
msaa_samples_array[0] = 0;
- depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1;
+ depth_buffer_factor = (stencil_bits == 0) ? 2 : 1;
back_buffer_factor = (have_back_buffer) ? 2 : 1;
if (pixel_bits == 16) {
More information about the mesa-commit
mailing list