diff options
author | Brendan King <[email protected]> | 2017-02-17 15:12:21 +0000 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2017-02-28 10:11:42 +0000 |
commit | 884f65e1856733697a894c86f94803343cfa9a21 (patch) | |
tree | 3130a3c25d6a0a3ed26ae16d706da7791458fa97 /src/egl | |
parent | 936f5407a7da0449926a4f89abd222503ba43eb4 (diff) |
egl/dri3: implement query surface hook
This is a DRI3 version of a change made for DRI2
(4d6d4f939e0af4252e0b, "egl/dri2: implement query surface hook"),
that fixed failures in dEQP-EGL.functional.resize.surface_size.grow
and dEQP-EGL.functional.resize.surface_size.shrink.
Cc: Tapani Pälli <[email protected]>
Cc: Mark Janes <[email protected]>
Cc: Chad Versace <[email protected]>
Signed-off-by: Brendan King <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
Cc: "17.0" <[email protected]>
Diffstat (limited to 'src/egl')
-rw-r--r-- | src/egl/drivers/dri2/platform_x11_dri3.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_x11_dri3.c b/src/egl/drivers/dri2/platform_x11_dri3.c index c4747144d1e..c4a54431cce 100644 --- a/src/egl/drivers/dri2/platform_x11_dri3.c +++ b/src/egl/drivers/dri2/platform_x11_dri3.c @@ -419,6 +419,25 @@ dri3_query_buffer_age(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf) return loader_dri3_query_buffer_age(&dri3_surf->loader_drawable); } +static EGLBoolean +dri3_query_surface(_EGLDriver *drv, _EGLDisplay *dpy, + _EGLSurface *surf, EGLint attribute, + EGLint *value) +{ + struct dri3_egl_surface *dri3_surf = dri3_egl_surface(surf); + + switch (attribute) { + case EGL_WIDTH: + case EGL_HEIGHT: + loader_dri3_update_drawable_geometry(&dri3_surf->loader_drawable); + break; + default: + break; + } + + return _eglQuerySurface(drv, dpy, surf, attribute, value); +} + static __DRIdrawable * dri3_get_dri_drawable(_EGLSurface *surf) { @@ -441,6 +460,7 @@ struct dri2_egl_display_vtbl dri3_x11_display_vtbl = { .post_sub_buffer = dri2_fallback_post_sub_buffer, .copy_buffers = dri3_copy_buffers, .query_buffer_age = dri3_query_buffer_age, + .query_surface = dri3_query_surface, .create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image, .get_sync_values = dri3_get_sync_values, .get_dri_drawable = dri3_get_dri_drawable, |