egl: Limit the EGL ver for android
authorAbhishek Kumar <abhishek4.kumar@intel.com>
Thu, 7 May 2020 16:32:02 +0000 (22:02 +0530)
committerAbhishek Kumar <abhishek4.kumar@intel.com>
Mon, 11 May 2020 13:06:22 +0000 (13:06 +0000)
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@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4951>

src/egl/main/eglapi.c

index 58cc90329251d8bfbc96862d03a4875a58e53f19..47640fdde71be1b193998f20805bf132c2ec0533 100644 (file)
@@ -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
 }
 
 /**