[Mesa-dev] [PATCH] wayland/egl: initialize window surface size to window size

Juan A. Suarez Romero jasuarez at igalia.com
Fri Jun 1 11:09:15 UTC 2018

On Fri, 2018-06-01 at 11:23 +0100, Daniel Stone wrote:
> Hi,
> On 1 June 2018 at 09:47, Juan A. Suarez Romero <jasuarez at igalia.com> wrote:
> > My question then: is mandatory to call eglSwapBuffers() to ensure
> > wl_egl_window_get_attached_size() returns the right window size? Because I
> > found nothing related about this. If it is mandatory, then calling
> > eglSwapBuffers() in the test should fix the problem (including the patch
> > I've summited with Daniel's changes).
> In Wayland, surfaces do _not_ have a native size, unlike say GBM
> surfaces or X11 surfaces. Buffers obviously have a size, and buffers
> are 'attached' to a surface inside eglSwapBuffers by calling
> wl_surface_attach(). wl_egl_window_get_attached_size() returns the
> size of the last buffer which was actually attached, which is required
> for things like correct input handling when resizing.

I see. So initialy the wayland window does not have a buffer attached, and hence
why calling wl_egl_window_get_attached_size() returns an invalid value.

Only when wl_surface_attach() is called (that happens when invoking
eglSwapBuffers()) wl_egl_window_get_attached_size() returns the proper value.

In this case, I agree the error is in the dEQP test.

I'm going to get rid of attached_{width,height} in the original patch and push
it. And send a patch to CTS to fix the dEQP test.



More information about the mesa-dev mailing list