diff options
author | Ian Romanick <[email protected]> | 2004-02-27 19:11:08 +0000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2004-02-27 19:11:08 +0000 |
commit | ad1e06fafe8061984fd993b0fc2a70fb4aa94bf0 (patch) | |
tree | 0f3d5d2b9028c21a82910dbae852e1456ad348f9 /src | |
parent | db79b5683cfc3f2ea3f9b0aca8c4d149bf9a63f7 (diff) |
Fix a problem with 24-bit screens. Modes with 0 stencil bits were
erroneously marked as GLX_SLOW_CONFIG.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_screen.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_screen.c b/src/mesa/drivers/dri/r200/r200_screen.c index 45d7c1699e0..c3fa252a72d 100644 --- a/src/mesa/drivers/dri/r200/r200_screen.c +++ b/src/mesa/drivers/dri/r200/r200_screen.c @@ -200,10 +200,8 @@ r200FillInModes( unsigned pixel_bits, unsigned depth_bits, GLX_NONE, GLX_SWAP_UNDEFINED_OML /*, GLX_SWAP_COPY_OML */ }; - int depth_buffer_modes[2][2] = { - { 0, 0 }, - { 0, 0 } - }; + int depth_buffer_modes[2][2]; + depth_buffer_modes[0][0] = depth_bits; depth_buffer_modes[1][0] = depth_bits; @@ -212,6 +210,7 @@ r200FillInModes( unsigned pixel_bits, unsigned depth_bits, * with a stencil buffer. It will be a sw fallback, but some apps won't * care about that. */ + depth_buffer_modes[0][1] = 0; depth_buffer_modes[1][1] = (stencil_bits == 0) ? 8 : stencil_bits; depth_buffer_factor = ((depth_bits != 0) || (stencil_bits != 0)) ? 2 : 1; @@ -238,8 +237,8 @@ r200FillInModes( unsigned pixel_bits, unsigned depth_bits, /* Mark the visual as slow if there are "fake" stencil bits. */ for ( m = modes ; m != NULL ; m = m->next ) { - if ( m->stencilBits != stencil_bits ) { - m->visualRating = GLX_SLOW_CONFIG; + if ( (m->stencilBits != 0) && (m->stencilBits != stencil_bits) ) { + m->visualRating = GLX_SLOW_CONFIG; } } |