[Mesa-dev] [PATCH 15/15] egl: expose EGL 1.5 if all requirements are met

Marek Olšák maraeo at gmail.com
Tue May 12 15:54:50 PDT 2015


From: Marek Olšák <marek.olsak at amd.com>

There's no driver support yet, because EGL_KHR_gl_colorspace isn't
implemented.
---
 src/egl/main/eglapi.c     | 15 +++++++++++++++
 src/egl/main/egldisplay.h |  1 +
 2 files changed, 16 insertions(+)

diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index ff0217e..8c12453 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -448,6 +448,21 @@ static void
 _eglComputeVersion(_EGLDisplay *disp)
 {
    disp->Version = 14;
+
+   if (disp->Extensions.KHR_fence_sync &&
+       disp->Extensions.KHR_cl_event2 &&
+       disp->Extensions.KHR_wait_sync &&
+       disp->Extensions.KHR_image_base &&
+       disp->Extensions.KHR_gl_texture_2D_image &&
+       disp->Extensions.KHR_gl_texture_3D_image &&
+       disp->Extensions.KHR_gl_texture_cubemap_image &&
+       disp->Extensions.KHR_gl_renderbuffer_image &&
+       disp->Extensions.KHR_create_context &&
+       disp->Extensions.EXT_create_context_robustness &&
+       disp->Extensions.KHR_get_all_proc_addresses &&
+       disp->Extensions.KHR_gl_colorspace &&
+       disp->Extensions.KHR_surfaceless_context)
+      disp->Version = 15;
 }
 
 /**
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index faf6e87..c7ed7ba 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -98,6 +98,7 @@ struct _egl_extensions
    EGLBoolean KHR_image_pixmap;
    EGLBoolean KHR_vg_parent_image;
    EGLBoolean KHR_get_all_proc_addresses;
+   EGLBoolean KHR_gl_colorspace;
    EGLBoolean KHR_gl_texture_2D_image;
    EGLBoolean KHR_gl_texture_cubemap_image;
    EGLBoolean KHR_gl_texture_3D_image;
-- 
2.1.0



More information about the mesa-dev mailing list