From a4d19e174a4c585269363aa98b5c20e03bb4ac2b Mon Sep 17 00:00:00 2001 From: Kyle Brenneman Date: Wed, 19 Apr 2017 07:08:05 -0600 Subject: [PATCH] Define the platform enums if they aren't in eglext.h. Add #defines for EGL_PLATFORM_X11_KHR, EGL_PLATFORM_WAYLAND_KHR, and EGL_PLATFORM_GBM_KHR, if they aren't already defiend in eglext.h. --- gfx/drivers_context/drm_ctx.c | 4 ++++ gfx/drivers_context/wayland_ctx.c | 4 ++++ gfx/drivers_context/xegl_ctx.c | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index 4f9391e211..cd755adb86 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -60,6 +60,10 @@ #endif +#ifndef EGL_PLATFORM_GBM_KHR +#define EGL_PLATFORM_GBM_KHR 0x31D7 +#endif + static enum gfx_ctx_api drm_api = GFX_CTX_NONE; static struct gbm_bo *g_bo = NULL; diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index 6b1ac60e5e..5314326930 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -113,6 +113,10 @@ static enum gfx_ctx_api wl_api = GFX_CTX_NONE; #define EGL_OPENGL_ES3_BIT_KHR 0x0040 #endif +#ifndef EGL_PLATFORM_WAYLAND_KHR +#define EGL_PLATFORM_WAYLAND_KHR 0x31D8 +#endif + #ifdef HAVE_XKBCOMMON /* FIXME: Move this into a header? */ int init_xkb(int fd, size_t size); diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index 08b57c9c70..f1521f8ffe 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -34,6 +34,10 @@ #define EGL_OPENGL_ES3_BIT_KHR 0x0040 #endif +#ifndef EGL_PLATFORM_X11_KHR +#define EGL_PLATFORM_X11_KHR 0x31D5 +#endif + typedef struct { #ifdef HAVE_EGL