egl_dri2: Allow pbuffer and pixmap surfaces for all configs
authorKristian Høgsberg <krh@bitplanet.net>
Tue, 9 Feb 2010 21:06:23 +0000 (16:06 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 10 Feb 2010 02:24:14 +0000 (21:24 -0500)
src/egl/drivers/dri2/egl_dri2.c

index 04d698e81c812231e69ad24678d44366ea0f0c68..a1a89e9a1773d300293812847be382dcdc0cc50c 100644 (file)
@@ -217,20 +217,19 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id)
 
    /* EGL_SWAP_BEHAVIOR_PRESERVED_BIT */
 
+   /* FIXME: Figure out how to get the visual ID and types */
    if (double_buffer) {
-      /* FIXME: Figure out how to get the visual ID and types */
-      _eglSetConfigKey(&conf->base, EGL_SURFACE_TYPE, EGL_WINDOW_BIT);
+      _eglSetConfigKey(&conf->base, EGL_SURFACE_TYPE,
+                      EGL_WINDOW_BIT | EGL_PIXMAP_BIT | EGL_PBUFFER_BIT);
       _eglSetConfigKey(&conf->base, EGL_NATIVE_VISUAL_ID, 0x21);
       _eglSetConfigKey(&conf->base, EGL_NATIVE_VISUAL_TYPE,
                       XCB_VISUAL_CLASS_TRUE_COLOR);
    } else {
-      _eglSetConfigKey(&conf->base,
-                      EGL_SURFACE_TYPE, EGL_PIXMAP_BIT | EGL_PBUFFER_BIT);
-      _eglSetConfigKey(&conf->base,
-                      EGL_BIND_TO_TEXTURE_RGB, bind_to_texture_rgb);
-      _eglSetConfigKey(&conf->base,
-                      EGL_BIND_TO_TEXTURE_RGBA, bind_to_texture_rgba);
+      _eglSetConfigKey(&conf->base, EGL_SURFACE_TYPE,
+                      EGL_PIXMAP_BIT | EGL_PBUFFER_BIT);
    }
+   _eglSetConfigKey(&conf->base, EGL_BIND_TO_TEXTURE_RGB, bind_to_texture_rgb);
+   _eglSetConfigKey(&conf->base, EGL_BIND_TO_TEXTURE_RGBA, bind_to_texture_rgba);
 
    /* EGL_OPENGL_ES_BIT, EGL_OPENVG_BIT, EGL_OPENGL_ES2_BIT */
    _eglSetConfigKey(&conf->base, EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT);