From: Chia-I Wu Date: Wed, 18 Mar 2020 19:50:31 +0000 (-0700) Subject: egl/android: enable/disable KHR_partial_update correctly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d63d0006860ac079f411c1f0d81101741a22af10;p=mesa.git egl/android: enable/disable KHR_partial_update correctly Commit f3728816af (egl/android: require ANDROID_native_fence_sync for buffer age) re-added some stale code removed in commit b4345da8762 (egl/android: Delete set_damage_region from egl dri vtbl). Remove it now. Commit b4345da8762 assumes KHR_partial_update is only driver-dependent. That is mostly true except that the extension also introduces buffer age query, which depends on ANDROID_native_fence_sync on Android. Signed-off-by: Chia-I Wu Reviewed-by: Lepton Wu Reviewed-by: Kristian H. Kristensen Tested-by: Marge Bot Part-of: --- diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c index c682b06d200..6f90fd46688 100644 --- a/src/egl/drivers/dri2/platform_android.c +++ b/src/egl/drivers/dri2/platform_android.c @@ -1657,9 +1657,11 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *disp) */ if (disp->Extensions.ANDROID_native_fence_sync) { disp->Extensions.EXT_buffer_age = EGL_TRUE; -#if ANDROID_API_LEVEL >= 23 - disp->Extensions.KHR_partial_update = EGL_TRUE; -#endif + } else { + /* disable KHR_partial_update that might have been enabled in + * dri2_setup_screen + */ + disp->Extensions.KHR_partial_update = EGL_FALSE; } disp->Extensions.KHR_image = EGL_TRUE;