Call eglSwapBuffers() to ensure wayland surface is attached
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Thu, 7 Jun 2018 10:22:18 +0000 (10:22 +0000)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 26 Jul 2018 07:14:43 +0000 (03:14 -0400)
commit59145955fa5061e79056a5f605da14f3ad7990c9
treeeca423e08198203d9924577eb471eaebb198aba5
parentfb74c54eb8ab5776fc2cd2c6d0eff422a344ec78
Call eglSwapBuffers() to ensure wayland surface is attached

Resize surface tests initially create a window and a surface, ensure
that both has the same size, then perform a window resize, and ensure
that both windows and the surface has the same size.

When using a Wayland target, checking the window size is done calling
wl_egl_window_get_attached_size(). This actually returns the size of the
attached buffer, which is done calling wl_surface_attach().

But wl_surface_attach() is only guaranteed to be done when calling
eglSwapBuffers(); if wl_egl_window_get_attached_size() is invoked
before, it can return 0, as no buffer is attached yet.

To avoid this problem, ensure a buffer is attached before getting the
window size.

Affects:
dEQP-EGL.functional.resize.surface_size.*

Components: OpenGL

VK-GL-CTS issue: 594

Change-Id: I74fb9a10b269ea1e1f7a63457fb0df76f8604547
modules/egl/teglResizeTests.cpp