From 2f8734e13b18ac38d54d6d4e7e6028f41518e5be Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Thu, 7 Feb 2019 15:11:57 -0800 Subject: [PATCH] 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 --- src/egl/main/eglsurface.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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(); -- 2.30.2