1.1 --- a/src/drivers/video_glx.c Mon May 12 10:00:13 2008 +0000
1.2 +++ b/src/drivers/video_glx.c Tue May 27 23:59:54 2008 +0000
1.5 #include <X11/Xlib.h>
1.8 #include "pvr2/pvr2.h"
1.9 #include "pvr2/glutil.h"
1.10 #include "drivers/video_glx.h"
1.11 @@ -112,7 +113,16 @@
1.12 fb_attribs, &nelem );
1.14 if( configs == NULL || nelem == 0 ) {
1.15 - /* Didn't work. Fallback to 1.2 methods */
1.16 + /* Try a 16-bit depth buffer and see if it helps */
1.17 + fb_attribs[5] = 16;
1.18 + configs = glXChooseFBConfig( display, screen, fb_attribs, &nelem );
1.20 + WARN( "Using a 16-bit depth buffer - expect video glitches" );
1.24 + if( configs == NULL || nelem == 0 ) {
1.25 + /* Still didn't work. Fallback to 1.2 methods */
1.26 glx_fbconfig_supported = FALSE;
1.27 glx_pbuffer_supported = FALSE;
1.29 @@ -125,6 +135,14 @@
1.30 if( !glx_fbconfig_supported ) {
1.31 int attribs[] = { GLX_RGBA, GLX_DEPTH_SIZE, 24, 0 };
1.32 glx_visual = glXChooseVisual( display, screen, attribs );
1.33 + if( glx_visual == NULL ) {
1.34 + /* Try the 16-bit fallback here too */
1.36 + glx_visual = glXChooseVisual( display, screen, attribs );
1.37 + if( glx_visual != NULL ) {
1.38 + WARN( "Using a 16-bit depth buffer - expect video glitches" );
1.43 if( glx_visual == NULL ) {