From: Chia-I Wu Date: Thu, 7 Feb 2019 23:11:57 +0000 (-0800) Subject: egl: fix KHR_partial_update without EXT_buffer_age X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2f8734e13b18ac38d54d6d4e7e6028f41518e5be;p=mesa.git egl: fix KHR_partial_update without EXT_buffer_age EGL_BUFFER_AGE_EXT can be queried without EXT_buffer_age. Signed-off-by: Chia-I Wu Acked-by: Lionel Landwerlin Reviewed-by: Eric Engestrom --- diff --git a/src/egl/main/eglsurface.c b/src/egl/main/eglsurface.c index ffef1b8f259..7d96514f775 100644 --- a/src/egl/main/eglsurface.c +++ b/src/egl/main/eglsurface.c @@ -522,7 +522,12 @@ _eglQuerySurface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surface, *value = surface->PostSubBufferSupportedNV; break; case EGL_BUFFER_AGE_EXT: - if (!disp->Extensions.EXT_buffer_age) + /* Both EXT_buffer_age and KHR_partial_update accept EGL_BUFFER_AGE_EXT. + * To be precise, the KHR one accepts EGL_BUFFER_AGE_KHR which is an + * alias with the same numeric value. + */ + if (!disp->Extensions.EXT_buffer_age && + !disp->Extensions.KHR_partial_update) return _eglError(EGL_BAD_ATTRIBUTE, "eglQuerySurface"); _EGLContext *ctx = _eglGetCurrentContext();