Mesa (master): egl: Limit the EGL ver for android

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 11 14:03:33 UTC 2020


Module: Mesa
Branch: master
Commit: 0bea2a13212be10982e14617002a3ff851b84717
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0bea2a13212be10982e14617002a3ff851b84717

Author: Abhishek Kumar <abhishek4.kumar at intel.com>
Date:   Thu May  7 22:20:02 2020 +0530

egl: Limit the EGL ver for android

Android support EGL 1.5 from Q onwards,
so limit EGL ver to 1.4 for P and below.

Closes: #2892

Signed-off-by: Abhishek Kumar <abhishek4.kumar at intel.com>
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4951>

---

 src/egl/main/eglapi.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index 58cc9032925..47640fdde71 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -597,6 +597,11 @@ _eglComputeVersion(_EGLDisplay *disp)
        disp->Extensions.KHR_gl_colorspace &&
        disp->Extensions.KHR_surfaceless_context)
       disp->Version = 15;
+
+   /* For Android P and below limit the EGL version to 1.4 */
+#if defined(ANDROID) && ANDROID_API_LEVEL <= 28
+   disp->Version = 14;
+#endif
 }
 
 /**



More information about the mesa-commit mailing list