egl_dri2: Enable pixmap bind_to_texture according to the extension
authorBenjamin Franzke <benjaminfranzke@googlemail.com>
Fri, 4 Feb 2011 11:32:30 +0000 (12:32 +0100)
committerBenjamin Franzke <benjaminfranzke@googlemail.com>
Mon, 7 Feb 2011 13:01:30 +0000 (14:01 +0100)
src/egl/drivers/dri2/egl_dri2.c

index f16bec2f90f3b1e07ce3142db74b54b9f8ba52c1..fc479cffd0d1218dc9ca5df685bc1740d09d613b 100644 (file)
@@ -173,7 +173,8 @@ dri2_add_config(_EGLDisplay *disp, const __DRIconfig *dri_config, int id,
    base.NativeRenderable = EGL_TRUE;
 
    base.SurfaceType = surface_type;
-   if (surface_type & (EGL_PIXMAP_BIT | EGL_PBUFFER_BIT)) {
+   if (surface_type & (EGL_PBUFFER_BIT |
+       (disp->Extensions.NOK_texture_from_pixmap ? EGL_PIXMAP_BIT : 0))) {
       base.BindToTextureRGB = bind_to_texture_rgb;
       if (base.AlphaSize > 0)
          base.BindToTextureRGBA = bind_to_texture_rgba;