[Glamor] [PATCH 2/2] Prefer KHR_surfaceless_context EGL extension over KHR_surfaceless_opengl/gles2.
Michel Dänzer
michel at daenzer.net
Tue Aug 7 09:13:33 PDT 2012
From: Michel Dänzer <michel.daenzer at amd.com>
Current Mesa Git only advertises the former instead of the latter.
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/glamor_egl.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/glamor_egl.c b/src/glamor_egl.c
index 596470c..0398fe1 100644
--- a/src/glamor_egl.c
+++ b/src/glamor_egl.c
@@ -512,12 +512,19 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
return FALSE; \
}
+#define GLAMOR_CHECK_EGL_EXTENSIONS(EXT1, EXT2) \
+ if (!glamor_egl_has_extension(glamor_egl, "EGL_" #EXT1) && \
+ !glamor_egl_has_extension(glamor_egl, "EGL_" #EXT2)) { \
+ ErrorF("EGL_" #EXT1 " or " #EXT2 " required.\n"); \
+ return FALSE; \
+ }
+
GLAMOR_CHECK_EGL_EXTENSION(MESA_drm_image);
GLAMOR_CHECK_EGL_EXTENSION(KHR_gl_renderbuffer_image);
#ifdef GLAMOR_GLES2
- GLAMOR_CHECK_EGL_EXTENSION(KHR_surfaceless_gles2);
+ GLAMOR_CHECK_EGL_EXTENSIONS(KHR_surfaceless_context, KHR_surfaceless_gles2);
#else
- GLAMOR_CHECK_EGL_EXTENSION(KHR_surfaceless_opengl);
+ GLAMOR_CHECK_EGL_EXTENSIONS(KHR_surfaceless_context, KHR_surfaceless_opengl);
#endif
glamor_egl->egl_create_image_khr = (PFNEGLCREATEIMAGEKHRPROC)
--
1.7.10.4
More information about the Glamor
mailing list