Re: [Mesa-dev] [PATCH v3 1/2] wayland/egl: initialize window surface size to window size
This patch is still unreviewed, and fixes quite a bunch of CTS tests when using Wayland. Any chance to get a review? Thanks in advance J.A. On Wed, 2018-06-06 at 12:40 +0200, Juan A. Suarez Romero wrote: > 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 EGL_HEIGHT returns respectively the width and >height, in pixels, of the surface. For a window or pixmap surface, >these values are initially equal to the width and height of the >native window or pixmap with respect to which the surface was >created" > > This fixes dEQP-EGL.functional.color_clears.* CTS tests > > v2: > - Do not modify attached_{width,height} (Daniel) > - Do not update size on resizing window (Brendan) > > CC: Daniel Stone > CC: Brendan King > --- > src/egl/drivers/dri2/platform_wayland.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/egl/drivers/dri2/platform_wayland.c > b/src/egl/drivers/dri2/platform_wayland.c > index 63da21cdf55..f62cbbc5c02 100644 > --- a/src/egl/drivers/dri2/platform_wayland.c > +++ b/src/egl/drivers/dri2/platform_wayland.c > @@ -255,6 +255,9 @@ dri2_wl_create_window_surface(_EGLDriver *drv, > _EGLDisplay *disp, >goto cleanup_surf; > } > > + dri2_surf->base.Width = window->width; > + dri2_surf->base.Height = window->height; > + > visual_idx = dri2_wl_visual_idx_from_config(dri2_dpy, config); > assert(visual_idx != -1); > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v3 1/2] wayland/egl: initialize window surface size to window size
On Wednesday, 2018-06-06 10:41:31 +, Juan A. Suarez Romero wrote: > 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 EGL_HEIGHT returns respectively the width and >height, in pixels, of the surface. For a window or pixmap surface, >these values are initially equal to the width and height of the >native window or pixmap with respect to which the surface was >created" > > This fixes dEQP-EGL.functional.color_clears.* CTS tests For what it's worth, it does fix all of the color_clears.* tests, as well as all the *.window.* and probably many more tests. Tested-by: Eric Engestrom Cc: mesa-sta...@lists.freedesktop.org (Still seeing 1297/3779 failures in dEQP-EGL on wayland though, but I'm planning on looking at those soon) > > v2: > - Do not modify attached_{width,height} (Daniel) > - Do not update size on resizing window (Brendan) > > CC: Daniel Stone > CC: Brendan King > --- > src/egl/drivers/dri2/platform_wayland.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/egl/drivers/dri2/platform_wayland.c > b/src/egl/drivers/dri2/platform_wayland.c > index 63da21cdf55..f62cbbc5c02 100644 > --- a/src/egl/drivers/dri2/platform_wayland.c > +++ b/src/egl/drivers/dri2/platform_wayland.c > @@ -255,6 +255,9 @@ dri2_wl_create_window_surface(_EGLDriver *drv, > _EGLDisplay *disp, >goto cleanup_surf; > } > > + dri2_surf->base.Width = window->width; > + dri2_surf->base.Height = window->height; > + > visual_idx = dri2_wl_visual_idx_from_config(dri2_dpy, config); > assert(visual_idx != -1); > > -- > 2.17.1 > > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v3 1/2] wayland/egl: initialize window surface size to window size
Gently ping to get a review O:) J.A. On Wed, 2018-06-06 at 12:40 +0200, Juan A. Suarez Romero wrote: > 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 EGL_HEIGHT returns respectively the width and >height, in pixels, of the surface. For a window or pixmap surface, >these values are initially equal to the width and height of the >native window or pixmap with respect to which the surface was >created" > > This fixes dEQP-EGL.functional.color_clears.* CTS tests > > v2: > - Do not modify attached_{width,height} (Daniel) > - Do not update size on resizing window (Brendan) > > CC: Daniel Stone > CC: Brendan King > --- > src/egl/drivers/dri2/platform_wayland.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/egl/drivers/dri2/platform_wayland.c > b/src/egl/drivers/dri2/platform_wayland.c > index 63da21cdf55..f62cbbc5c02 100644 > --- a/src/egl/drivers/dri2/platform_wayland.c > +++ b/src/egl/drivers/dri2/platform_wayland.c > @@ -255,6 +255,9 @@ dri2_wl_create_window_surface(_EGLDriver *drv, > _EGLDisplay *disp, >goto cleanup_surf; > } > > + dri2_surf->base.Width = window->width; > + dri2_surf->base.Height = window->height; > + > visual_idx = dri2_wl_visual_idx_from_config(dri2_dpy, config); > assert(visual_idx != -1); > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH v3 1/2] wayland/egl: initialize window surface size to window size
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 EGL_HEIGHT returns respectively the width and height, in pixels, of the surface. For a window or pixmap surface, these values are initially equal to the width and height of the native window or pixmap with respect to which the surface was created" This fixes dEQP-EGL.functional.color_clears.* CTS tests v2: - Do not modify attached_{width,height} (Daniel) - Do not update size on resizing window (Brendan) CC: Daniel Stone CC: Brendan King --- src/egl/drivers/dri2/platform_wayland.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index 63da21cdf55..f62cbbc5c02 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -255,6 +255,9 @@ dri2_wl_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp, goto cleanup_surf; } + dri2_surf->base.Width = window->width; + dri2_surf->base.Height = window->height; + visual_idx = dri2_wl_visual_idx_from_config(dri2_dpy, config); assert(visual_idx != -1); -- 2.17.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev