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

2018-08-06 Thread Juan A. Suarez Romero
On Mon, 2018-08-06 at 16:02 +0100, Daniel Stone wrote: > Hi Juan, > > On Tue, 5 Jun 2018 at 18:23, Juan A. Suarez Romero > wrote: > > On Tue, 2018-06-05 at 12:41 +0100, Daniel Stone wrote: > > > > - In Wayland/Mesa, the surface is not resized at the time the native > > > > window is > > > >

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

2018-08-06 Thread Daniel Stone
Hi Juan, On Tue, 5 Jun 2018 at 18:23, Juan A. Suarez Romero wrote: > On Tue, 2018-06-05 at 12:41 +0100, Daniel Stone wrote: > > > - In Wayland/Mesa, the surface is not resized at the time the native > > > window is > > > resized; this is done in *eglSwapBuffers*, following 3.10.1.1. > > > >

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

2018-06-11 Thread Pekka Paalanen
On Tue, 05 Jun 2018 19:22:47 +0200 "Juan A. Suarez Romero" wrote: > On Tue, 2018-06-05 at 12:41 +0100, Daniel Stone wrote: > > Hi Juan, > > > > On 5 June 2018 at 09:51, Juan A. Suarez Romero wrote: > > > > > On Mon, 2018-06-04 at 13:22 +0100, Daniel Stone wrote: > > > > Yes, that's

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

2018-06-06 Thread Juan A. Suarez Romero
On Tue, 2018-06-05 at 19:36 +0100, Emil Velikov wrote: > Hi everyone, > > Throwing a small suggestion here: > > Once a consensus is reached, do add some beefy comments inline. Mostly > of any parts that are different from the X11/GBM/other backends. > A reference to this thread might also be a

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

2018-06-05 Thread Emil Velikov
Hi everyone, Throwing a small suggestion here: Once a consensus is reached, do add some beefy comments inline. Mostly of any parts that are different from the X11/GBM/other backends. A reference to this thread might also be a good idea. Thanks Emil

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

2018-06-05 Thread Juan A. Suarez Romero
On Tue, 2018-06-05 at 12:41 +0100, Daniel Stone wrote: > Hi Juan, > > On 5 June 2018 at 09:51, Juan A. Suarez Romero wrote: > > On Mon, 2018-06-04 at 13:22 +0100, Daniel Stone wrote: > > > The first query will correctly return (w1,h1). The second query will > > > incorrectly also return (w1,h1),

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

2018-06-05 Thread Daniel Stone
Hi Juan, On 5 June 2018 at 09:51, Juan A. Suarez Romero wrote: > On Mon, 2018-06-04 at 13:22 +0100, Daniel Stone wrote: >> The first query will correctly return (w1,h1). The second query will >> incorrectly also return (w1,h1), even though the surface will never >> have that size. The third

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

2018-06-05 Thread Tapani Pälli
On 05.06.2018 11:51, Juan A. Suarez Romero wrote: On Mon, 2018-06-04 at 13:22 +0100, Daniel Stone wrote: Hi Juan, On 4 June 2018 at 12:43, Juan A. Suarez Romero wrote: On Fri, 2018-06-01 at 16:32 +0100, Daniel Stone wrote: I think you're right, and this needs more rework to be consistent.

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

2018-06-05 Thread Juan A. Suarez Romero
On Mon, 2018-06-04 at 13:22 +0100, Daniel Stone wrote: > Hi Juan, > > On 4 June 2018 at 12:43, Juan A. Suarez Romero wrote: > > On Fri, 2018-06-01 at 16:32 +0100, Daniel Stone wrote: > > > I think you're right, and this needs more rework to be consistent. > > > > > >

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

2018-06-04 Thread Daniel Stone
Hi Juan, On 4 June 2018 at 12:43, Juan A. Suarez Romero wrote: > On Fri, 2018-06-01 at 16:32 +0100, Daniel Stone wrote: >> I think you're right, and this needs more rework to be consistent. >> >> wl_egl_window_get_attached_size() always returns the size of the last >> attached buffer (if there

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

2018-06-04 Thread Juan A. Suarez Romero
On Fri, 2018-06-01 at 16:32 +0100, Daniel Stone wrote: > Hi, > > On 1 June 2018 at 15:35, Brendan King wrote: > > IMG has a similar patch to the one you describe, but without the changes to > > the resize_callback, so just this bit: > > > > @@ -255,6 +257,12 @@

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

2018-06-04 Thread Juan A. Suarez Romero
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

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

2018-06-01 Thread Daniel Stone
Hi, On 1 June 2018 at 15:35, Brendan King wrote: > IMG has a similar patch to the one you describe, but without the changes to > the resize_callback, so just this bit: > > @@ -255,6 +257,12 @@ dri2_wl_create_window_surface(_EGLDriver *drv, > _EGLDisplay *disp, >goto cleanup_surf; > }

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

2018-06-01 Thread Brendan King
On 01/06/18 12:09, Juan A. Suarez Romero wrote: On Fri, 2018-06-01 at 11:23 +0100, Daniel Stone wrote: Hi, On 1 June 2018 at 09:47, Juan A. Suarez Romero wrote: My question then: is mandatory to call eglSwapBuffers() to ensure wl_egl_window_get_attached_size() returns the right window size?

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

2018-06-01 Thread Brendan King
On 01/06/18 12:09, Juan A. Suarez Romero wrote: On Fri, 2018-06-01 at 11:23 +0100, Daniel Stone wrote: Hi, On 1 June 2018 at 09:47, Juan A. Suarez Romero wrote: My question then: is mandatory to call eglSwapBuffers() to ensure wl_egl_window_get_attached_size() returns the right window size?

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

2018-06-01 Thread Juan A. Suarez Romero
On Fri, 2018-06-01 at 11:23 +0100, Daniel Stone wrote: > Hi, > > On 1 June 2018 at 09:47, Juan A. Suarez Romero 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

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

2018-06-01 Thread Daniel Stone
Hi, On 1 June 2018 at 09:47, Juan A. Suarez Romero 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

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

2018-06-01 Thread Brendan King
The IMG patch Eric was referring to was to dEQP. I submitted bug reports to Google and Khronos: https://issuetracker.google.com/issues/64059452 https://gitlab.khronos.org/Tracker/vk-gl-cts/issues/594 I've attached the patch to this email. The problem is that the dEQP *resize.surface_size*

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

2018-06-01 Thread Brendan King
The IMG patch Eric was referring to was to dEQP. I submitted bug reports to both Google and Khronos: https://issuetracker.google.com/issues/64059452 https://gitlab.khronos.org/Tracker/vk-gl-cts/issues/594 I've attached the patch to this email. The problem is that the dEQP 

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

2018-06-01 Thread Juan A. Suarez Romero
On Fri, 2018-06-01 at 09:39 +0100, Brendan King wrote: > The IMG patch Eric was referring to was to dEQP. I submitted bug > reports to Google and Khronos: > > https://issuetracker.google.com/issues/64059452 > > https://gitlab.khronos.org/Tracker/vk-gl-cts/issues/594 > >

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

2018-06-01 Thread Juan A. Suarez Romero
On Thu, 2018-05-31 at 17:24 +0100, Daniel Stone wrote: > Hi Eric, > > On 31 May 2018 at 17:13, Eric Engestrom 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

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

2018-06-01 Thread Juan A. Suarez Romero
On Thu, 2018-05-31 at 16:57 +0100, Daniel Stone wrote: > Hi Juan, > Thanks for picking this up! > > On 31 May 2018 at 16:44, Juan A. Suarez Romero wrote: > > @@ -255,6 +257,12 @@ dri2_wl_create_window_surface(_EGLDriver *drv, > > _EGLDisplay *disp, > >goto cleanup_surf; > > } > > >

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

2018-05-31 Thread Daniel Stone
Hi Eric, On 31 May 2018 at 17:13, Eric Engestrom 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

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

2018-05-31 Thread Eric Engestrom
On Thursday, 2018-05-31 16:57:17 +0100, Daniel Stone wrote: > Hi Juan, > Thanks for picking this up! > > On 31 May 2018 at 16:44, Juan A. Suarez Romero wrote: > > @@ -255,6 +257,12 @@ dri2_wl_create_window_surface(_EGLDriver *drv, > > _EGLDisplay *disp, > >goto cleanup_surf; > > } >

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

2018-05-31 Thread Daniel Stone
Hi Juan, Thanks for picking this up! On 31 May 2018 at 16:44, Juan A. Suarez Romero wrote: > @@ -255,6 +257,12 @@ dri2_wl_create_window_surface(_EGLDriver *drv, > _EGLDisplay *disp, >goto cleanup_surf; > } > > + dri2_surf->base.Width = window->width; > + dri2_surf->base.Height =

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

2018-05-31 Thread Juan A. Suarez Romero
When creating a windows surface with eglCreatesWindowSurface(), the width and height returned by eglQuerySurface(EGL_{WIDTH,HEIGHT}) is invalid until buffers are updated (like calling glClear()). Likewise, on top of above resizing the Wayland window and quering again the surface size, returns the