summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglsurface.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2019-02-07 15:11:57 -0800
committerEric Engestrom <[email protected]>2019-02-12 19:14:34 +0000
commit2f8734e13b18ac38d54d6d4e7e6028f41518e5be (patch)
treec33ed16ada372d08194e44231053af3fc1ca69cf /src/egl/main/eglsurface.c
parent5a006b026de5e1a26d1de5ca635773658846ce39 (diff)
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 <[email protected]> Acked-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/egl/main/eglsurface.c')
-rw-r--r--src/egl/main/eglsurface.c7
1 files changed, 6 insertions, 1 deletions
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();