[Mesa-dev] [PATCH 1/4] egl: treat EGL_OPENGL_API as invalid on Android
Emil Velikov
emil.l.velikov at gmail.com
Thu Aug 25 16:07:12 UTC 2016
From: Emil Velikov <emil.velikov at collabora.com>
At the moment one can use OpenGL in eglBindAPI() only to clear the
EGL_OPENGL_BIT from RenderableType and Conformant for _each_ config.
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
src/egl/main/eglcurrent.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/egl/main/eglcurrent.h b/src/egl/main/eglcurrent.h
index 1e386ac..3f8a0b2 100644
--- a/src/egl/main/eglcurrent.h
+++ b/src/egl/main/eglcurrent.h
@@ -69,7 +69,13 @@ struct _egl_thread_info
static inline EGLBoolean
_eglIsApiValid(EGLenum api)
{
- return (api >= _EGL_API_FIRST_API && api <= _EGL_API_LAST_API);
+#ifdef ANDROID
+ /* OpenGL is not a valid/supported API on Android */
+ return api >= _EGL_API_FIRST_API && api <= _EGL_API_LAST_API &&
+ api != EGL_OPENGL_API;
+#else
+ return api >= _EGL_API_FIRST_API && api <= _EGL_API_LAST_API;
+#endif
}
--
2.9.0
More information about the mesa-dev
mailing list