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

Juan A. Suarez Romero jasuarez at igalia.com
Fri Jun 1 08:36:20 UTC 2018


On Thu, 2018-05-31 at 17:24 +0100, Daniel Stone wrote:
> Hi Eric,
> 
> On 31 May 2018 at 17:13, Eric Engestrom <eric.engestrom at intel.com> wrote:
> > On Thursday, 2018-05-31 16:57:17 +0100, Daniel Stone wrote:
> > > Not initialising attached_{width,height} should not cause any problems
> > > with these checks. By definition there cannot have been any buffers
> > > allocated or attached between creation and the first draw call, so
> > > there are no old buffers to release.
> > > 
> > > So with that initialisation removed, this is (assuming dEQP still passes):
> > 
> > IMG has a similar patch locally (Cc'ed Frank), because (IIRC) dEQP
> > creates a window, and before attaching any surface to it, it reads back
> > the size and asserts out of most tests because it's 0 or -1 or something
> > like that, and I think this attached_width/height hack was needed
> > because of that.
> 
> That's odd. As I understand it, eglQuerySurface(EGL_{WIDTH,HEIGHT})
> should be returning the base surface values. attached_{width,height}
> should only be returned to the user when calling
> wl_egl_window_get_attached_size(). I'm happy to fix the former for
> consistency with other platforms, but anyone calling the latter
> without ever having attached anything deserves whatever they get, to
> be honest.

What dEQP-EGL.functional.resize.surface_size.* is doing:

- Initialize:
  - Create a wayland window with specific size (128x128)
  - Create the surface with eglQuerySurface()
- Perform the proper test
  - Check if current surface size is the same as window size
  - Resize the window
  - Swap buffers
  - Check again if the current surface size is the same as the window size

The first check is the one that it is failing.

I'm not sure if the test should swap buffers before the first check, as I didn't
 find any specification or documentation stating it. But without such call,
seems to work in other platforms.


	J.A.



> 
> Cheers,
> Daniel
> 


More information about the mesa-dev mailing list