From ec82cba5a3efa129712a13bb88af476acbfee3be Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 21 Jul 2016 11:56:07 +0100 Subject: [PATCH] Revert "wegl: add EGL image create/destroy" This reverts commit 1a8e8ef3b8072fa1135dbe2a04dc6bb9f8e3a12f. The symbols were added as they are required by the null/surfaceless platform. Since that one hasn't landed yet, just remove the patch. Furthermore, using dlsym is non-compatible (according to the spec) since the symbols are part of an extension. eglGetProcAddress should be used. Feel free to bring it back, when needed. Cc: Frank Henigman Reviewed-by: Chad Versace --- src/waffle/egl/wegl_platform.c | 9 +-------- src/waffle/egl/wegl_platform.h | 4 ---- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/waffle/egl/wegl_platform.c b/src/waffle/egl/wegl_platform.c index 0c9eb44..800025e 100644 --- a/src/waffle/egl/wegl_platform.c +++ b/src/waffle/egl/wegl_platform.c @@ -72,11 +72,8 @@ wegl_platform_init(struct wegl_platform *self) goto error; } -#define OPTIONAL_EGL_SYMBOL(function) \ - self->function = dlsym(self->eglHandle, #function); - #define RETRIEVE_EGL_SYMBOL(function) \ - OPTIONAL_EGL_SYMBOL(function) \ + self->function = dlsym(self->eglHandle, #function); \ if (!self->function) { \ wcore_errorf(WAFFLE_ERROR_FATAL, \ "dlsym(\"%s\", \"" #function "\") failed: %s", \ @@ -85,9 +82,6 @@ wegl_platform_init(struct wegl_platform *self) goto error; \ } - OPTIONAL_EGL_SYMBOL(eglCreateImageKHR); - OPTIONAL_EGL_SYMBOL(eglDestroyImageKHR); - RETRIEVE_EGL_SYMBOL(eglMakeCurrent); RETRIEVE_EGL_SYMBOL(eglGetProcAddress); @@ -112,7 +106,6 @@ wegl_platform_init(struct wegl_platform *self) RETRIEVE_EGL_SYMBOL(eglDestroySurface); RETRIEVE_EGL_SYMBOL(eglSwapBuffers); -#undef OPTIONAL_EGL_SYMBOL #undef RETRIEVE_EGL_SYMBOL error: diff --git a/src/waffle/egl/wegl_platform.h b/src/waffle/egl/wegl_platform.h index 7ae0490..645c3f8 100644 --- a/src/waffle/egl/wegl_platform.h +++ b/src/waffle/egl/wegl_platform.h @@ -26,7 +26,6 @@ #pragma once #include -#include #include "wcore_platform.h" #include "wcore_util.h" @@ -69,9 +68,6 @@ struct wegl_platform { const EGLint *attrib_list); EGLBoolean (*eglDestroySurface)(EGLDisplay dpy, EGLSurface surface); EGLBoolean (*eglSwapBuffers)(EGLDisplay dpy, EGLSurface surface); - - EGLImageKHR (*eglCreateImageKHR) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); - EGLBoolean (*eglDestroyImageKHR)(EGLDisplay dpy, EGLImageKHR image); }; DEFINE_CONTAINER_CAST_FUNC(wegl_platform, -- 2.11.4.GIT