egl: expose EGL 1.5 if all requirements are met
authorMarek Olšák <marek.olsak@amd.com>
Mon, 11 May 2015 20:18:04 +0000 (22:18 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 5 Jun 2015 17:44:33 +0000 (19:44 +0200)
There's no driver support yet, because EGL_KHR_gl_colorspace isn't
implemented.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
src/egl/main/eglapi.c
src/egl/main/egldisplay.h

index bc360fe9107325aa33c2da287c00f3721847e6ea..105e919683a15e865bfbd9c19287743b1cc8604c 100644 (file)
@@ -451,6 +451,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;
 }
 
 /**
index bc8cc7d63195f2466e74aa6b760b18a8a2743fea..84cfbe19f7e79ea2377ab2474cfa9cf872bc8fdb 100644 (file)
@@ -101,6 +101,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;