glx: Require proper drawableType in init_fbconfig_for_chooser 58/7558/1
authorTomasz Lis <tomasz.lis@intel.com>
Wed, 17 Jul 2013 11:49:20 +0000 (13:49 +0200)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 18 Jul 2013 23:03:42 +0000 (16:03 -0700)
Make sure that init_fbconfig_for_chooser sets correct value of
drawableType for visual configs and fbconfigs.

Signed-off-by: Tomasz Lis <tomasz.lis@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glx/glxcmds.c

index 7c66c9b..3b250cc 100644 (file)
@@ -911,12 +911,17 @@ init_fbconfig_for_chooser(struct glx_config * config,
    config->visualID = (XID) GLX_DONT_CARE;
    config->visualType = GLX_DONT_CARE;
 
-   /* glXChooseFBConfig specifies different defaults for these two than
+   /* glXChooseFBConfig specifies different defaults for these properties than
     * glXChooseVisual.
     */
    if (fbconfig_style_tags) {
       config->rgbMode = GL_TRUE;
       config->doubleBufferMode = GLX_DONT_CARE;
+      /* allow any kind of drawable, including those for off-screen buffers */
+      config->drawableType = 0;
+   } else {
+       /* allow configs which support on-screen drawing */
+       config->drawableType = GLX_WINDOW_BIT;
    }
 
    config->visualRating = GLX_DONT_CARE;