On 29 August 2017 at 15:40, Eric Engestrom <eric.engest...@imgtec.com> wrote: > On Sunday, 2017-08-27 11:20:33 +0100, Emil Velikov wrote: >> From: Emil Velikov <emil.veli...@collabora.com> >> >> The dimensions are already set [to 0 or the value provided by the >> attributes list] by the _eglInitSurface() call further up. >> >> The values are updated, as the DRI driver calls the DRI2/IMAGE_LOADER' >> get_buffers, shortly before making use of the values. >> >> Signed-off-by: Emil Velikov <emil.veli...@collabora.com> >> --- >> src/egl/drivers/dri2/platform_wayland.c | 3 --- >> 1 file changed, 3 deletions(-) >> >> diff --git a/src/egl/drivers/dri2/platform_wayland.c >> b/src/egl/drivers/dri2/platform_wayland.c >> index f9554fccde9..89e94e11f4f 100644 >> --- a/src/egl/drivers/dri2/platform_wayland.c >> +++ b/src/egl/drivers/dri2/platform_wayland.c >> @@ -198,9 +198,6 @@ dri2_wl_create_window_surface(_EGLDriver *drv, >> _EGLDisplay *disp, >> dri2_surf->wl_win->private = dri2_surf; >> dri2_surf->wl_win->destroy_window_callback = destroy_window_callback; >> >> - dri2_surf->base.Width = -1; >> - dri2_surf->base.Height = -1; >> - > > We actually have a local patch here that replaces this `-1` > initialisation with the dimensions of the wayland `window`: > > ----8<---- > diff --git a/src/egl/drivers/dri2/platform_wayland.c > b/src/egl/drivers/dri2/platform_wayland.c > index 85a11f4..7719407 100644 > --- a/src/egl/drivers/dri2/platform_wayland.c > +++ b/src/egl/drivers/dri2/platform_wayland.c > @@ -183,8 +183,8 @@ dri2_wl_create_window_surface(_EGLDriver *drv, > _EGLDisplay *disp, > dri2_surf->wl_win->private = dri2_surf; > dri2_surf->wl_win->destroy_window_callback = destroy_window_callback; > > - dri2_surf->base.Width = -1; > - dri2_surf->base.Height = -1; > + dri2_surf->base.Width = window->width; > + dri2_surf->base.Height = window->height; > > config = dri2_get_dri_config(dri2_conf, EGL_WINDOW_BIT, > dri2_surf->base.GLColorspace); > ---->8---- > > This apparently fixes dEQP crashes caused by an assert: > deRandom.hpp:93: Unknown function: Assertion `min <= max' failed. > > No dEQP test is mentioned on our patch, but I think this happened on > dEQP-EGL.functional.resize.surface_size.* > Having another look, we seems to be rather inconsistent when we set them - see below. At the same time, I doubt any !X11 dEQP resize tests work: - iirc there's no wayland/drm/surfaceless support - none of the three has a .query_surface hook
-Emil X11/dri2 - create_*_surface, all but !pbuffer - query_surface via xcb_get_geometry X11/dri3: - create_*_surface, all - query_surface via xcb_get_geometry drm - create_*_surface, all (window only) - query_surface - no hook surfaceless - create_*_surface, none (pbuffer only) - query_surface - no hook wayland - create_*_surface, none (window only) - query_surface - no hook _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev