[Mesa-dev] [PATCH] egl_dri2: Expose EGL_KHR_image_base unconditionally

Boyan Ding boyan.j.ding at gmail.com
Tue Sep 15 07:27:55 PDT 2015


EGL_KHR_image_base only creates the mechanism about EGLimage without
providing real functionality, so it is safe to expose unconditionally
since egl/main should handle it well. It also saves some platforms from
manually exposing it.

Signed-off-by: Boyan Ding <boyan.j.ding at gmail.com>
---
 src/egl/drivers/dri2/egl_dri2.c             | 2 +-
 src/egl/drivers/dri2/platform_android.c     | 1 -
 src/egl/drivers/dri2/platform_surfaceless.c | 2 --
 3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 1740ee3..38739b4 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -582,6 +582,7 @@ dri2_setup_screen(_EGLDisplay *disp)
       disp->ClientAPIs |= EGL_OPENGL_ES3_BIT_KHR;
 
    assert(dri2_dpy->dri2 || dri2_dpy->swrast);
+   disp->Extensions.KHR_image_base = EGL_TRUE;
    disp->Extensions.KHR_surfaceless_context = EGL_TRUE;
    disp->Extensions.MESA_configless_context = EGL_TRUE;
 
@@ -620,7 +621,6 @@ dri2_setup_screen(_EGLDisplay *disp)
             disp->Extensions.MESA_image_dma_buf_export = EGL_TRUE;
       }
 
-      disp->Extensions.KHR_image_base = EGL_TRUE;
       disp->Extensions.KHR_gl_renderbuffer_image = EGL_TRUE;
       if (dri2_dpy->image->base.version >= 5 &&
           dri2_dpy->image->createImageFromTexture) {
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
index 4abe82f..00a1110 100644
--- a/src/egl/drivers/dri2/platform_android.c
+++ b/src/egl/drivers/dri2/platform_android.c
@@ -708,7 +708,6 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy)
    }
 
    dpy->Extensions.ANDROID_image_native_buffer = EGL_TRUE;
-   dpy->Extensions.KHR_image_base = EGL_TRUE;
 
    /* Fill vtbl last to prevent accidentally calling virtual function during
     * initialization.
diff --git a/src/egl/drivers/dri2/platform_surfaceless.c b/src/egl/drivers/dri2/platform_surfaceless.c
index 48f15df..1546fab 100644
--- a/src/egl/drivers/dri2/platform_surfaceless.c
+++ b/src/egl/drivers/dri2/platform_surfaceless.c
@@ -142,8 +142,6 @@ dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp)
                       i + 1, EGL_WINDOW_BIT, NULL, NULL);
    }
 
-   disp->Extensions.KHR_image_base = EGL_TRUE;
-
    /* Fill vtbl last to prevent accidentally calling virtual function during
     * initialization.
     */
-- 
2.5.1



More information about the mesa-dev mailing list