summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2
diff options
context:
space:
mode:
authorJuan A. Suarez Romero <[email protected]>2018-06-04 10:22:49 +0000
committerJuan A. Suarez Romero <[email protected]>2018-08-08 18:28:52 +0200
commit1fe7cbdf05b90034577dac4e4aa6157031d80521 (patch)
treef0de3503a1f780c62512124b3352a011be161555 /src/egl/drivers/dri2
parentf9d0e7d3bcd831d52af6a6c46aac4ed4590a8615 (diff)
wayland/egl: initialize window surface size to window size
When creating a windows surface with eglCreateWindowSurface(), the width and height returned by eglQuerySurface(EGL_{WIDTH,HEIGHT}) is invalid until buffers are updated (like calling glClear()). But according to EGL 1.5 spec, section 3.5.6 ("Surface Attributes"): "Querying EGL_WIDTH and EGL_HEIGHT returns respectively the width and height, in pixels, of the surface. For a window or pixmap surface, these values are initially equal to the width and height of the native window or pixmap with respect to which the surface was created" This fixes dEQP-EGL.functional.color_clears.* CTS tests v2: - Do not modify attached_{width,height} (Daniel) - Do not update size on resizing window (Brendan) CC: Daniel Stone <[email protected]> CC: Brendan King <[email protected]> CC: [email protected] Tested-by: Eric Engestrom <[email protected]> Tested-by: Chad Versace <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r--src/egl/drivers/dri2/platform_wayland.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index dca099500a8..a5d43094cf3 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -258,6 +258,9 @@ dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
goto cleanup_surf;
}
+ dri2_surf->base.Width = window->width;
+ dri2_surf->base.Height = window->height;
+
visual_idx = dri2_wl_visual_idx_from_config(dri2_dpy, config);
assert(visual_idx != -1);