[waffle] [PATCH] egl: resolve build issue with pre EGL 1.5 headers

Emil Velikov emil.l.velikov at gmail.com
Wed Jul 20 16:27:02 UTC 2016


In some cases (like building on Android) the headers might not have the
1.5 definitions, leading to a build failures like the one in github
issue #41.

Since the ABI is baked in stone, add a local define to resolve that.

Cc: Chad Versace <chad.versace at intel.com>
Fixes: f8a485e7cc7 ("egl: Improve support for robust GLES contexts on
EGL 1.5")
Issue: https://github.com/waffle-gl/waffle/issues/41
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/waffle/egl/wegl_context.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/waffle/egl/wegl_context.c b/src/waffle/egl/wegl_context.c
index 0e59231..97931fc 100644
--- a/src/waffle/egl/wegl_context.c
+++ b/src/waffle/egl/wegl_context.c
@@ -34,6 +34,11 @@
 #include "wegl_platform.h"
 #include "wegl_util.h"
 
+// Pre EGL 1.5 headers lack the definition.
+#ifndef EGL_CONTEXT_OPENGL_ROBUST_ACCESS
+#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS  0x31B2
+#endif
+
 static bool
 bind_api(struct wegl_platform *plat, int32_t waffle_context_api)
 {
-- 
2.9.0



More information about the waffle mailing list