glx: add a few missing glXChooseFBConfig() attributes
authorBrian Paul <brianp@vmware.com>
Mon, 11 Jul 2011 14:00:59 +0000 (08:00 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 11 Jul 2011 14:02:49 +0000 (08:02 -0600)
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=38842

NOTE: This is a candidate for the 7.11 branch.

src/gallium/state_trackers/glx/xlib/glx_api.c
src/mesa/drivers/x11/fakeglx.c

index 6233fb817811cf797e8742256b4e1cfaa92b87e5..a7aafd846cdfbe700b81b392fab5a8559f6f2380 100644 (file)
@@ -864,16 +864,19 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
             parselist++;
             break;
          case GLX_FBCONFIG_ID:
+         case GLX_VISUAL_ID:
             if (!fbConfig)
                return NULL;
             parselist++;
             desiredVisualID = *parselist++;
             break;
          case GLX_X_RENDERABLE:
+         case GLX_MAX_PBUFFER_WIDTH:
+         case GLX_MAX_PBUFFER_HEIGHT:
+         case GLX_MAX_PBUFFER_PIXELS:
             if (!fbConfig)
-               return NULL;
-            parselist += 2;
-            /* ignore */
+               return NULL; /* invalid config option */
+            parselist += 2; /* ignore the parameter */
             break;
 
 #ifdef GLX_EXT_texture_from_pixmap
index 48657b44be1caba6a235fcadf9da7f4184096d90..1f5fc33d7755ec1477138171b3d796dd240d0dd8 100644 (file)
@@ -1097,12 +1097,16 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
             parselist++;
             break;
          case GLX_FBCONFIG_ID:
+         case GLX_VISUAL_ID:
             if (!fbConfig)
                return NULL;
             parselist++;
             desiredVisualID = *parselist++;
             break;
          case GLX_X_RENDERABLE:
+         case GLX_MAX_PBUFFER_WIDTH:
+         case GLX_MAX_PBUFFER_HEIGHT:
+         case GLX_MAX_PBUFFER_PIXELS:
             if (!fbConfig)
                return NULL;
             parselist += 2;