<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 01/06/18 12:09, Juan A. Suarez
Romero wrote:<br>
</div>
<blockquote type="cite"
cite="mid:55ab429cf1c8348008c12f140e384fe003a760a1.camel@igalia.com">
<pre wrap="">On Fri, 2018-06-01 at 11:23 +0100, Daniel Stone wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
On 1 June 2018 at 09:47, Juan A. Suarez Romero <a class="moz-txt-link-rfc2396E" href="mailto:jasuarez@igalia.com"><jasuarez@igalia.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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).
</pre>
</blockquote>
<pre wrap="">
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.
</pre>
</blockquote>
<pre wrap="">
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.
Thanks!
J.A.
</pre>
</blockquote>
<br>
<p>IMG has a similar patch to the modified one you describe, but
without the changes to resize_callback, so just this bit:</p>
<p><font size="2"><span style="font-size:10pt;">@@ -255,6 +257,12 @@
dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay
*disp,<br>
goto cleanup_surf;<br>
}<br>
<br>
+ dri2_surf->base.Width = window->width;<br>
+ dri2_surf->base.Height = window->height;<br>
+</span></font></p>
<p>Brendan.</p>
</body>
</html>