SHA256
1
0
forked from pool/Mesa

Accepting request 653839 from home:iznogood:branches:X11:XOrg

- Add u_wayland_egl-Ensure-EGL-surface.patch: wayland/egl: Ensure
  EGL surface is resized on DRI update_buffers(). Patch is sent
  upstream already.

OBS-URL: https://build.opensuse.org/request/show/653839
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=789
This commit is contained in:
Stefan Dirsch 2018-12-04 13:24:20 +00:00 committed by Git OBS Bridge
parent b5e3c05065
commit 32ad8fd4af
5 changed files with 83 additions and 4 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Dec 4 11:20:05 UTC 2018 - bjorn.lie@gmail.com
- Add u_wayland_egl-Ensure-EGL-surface.patch: wayland/egl: Ensure
EGL surface is resized on DRI update_buffers(). Patch is sent
upstream already.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Nov 29 13:12:15 UTC 2018 - sndirsch@suse.com Thu Nov 29 13:12:15 UTC 2018 - sndirsch@suse.com

View File

@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
@ -138,6 +138,7 @@ Patch31: archlinux_0001-Fix-linkage-against-shared-glapi.patch
Patch54: n_drirc-disable-rgb10-for-chromium-on-amd.patch Patch54: n_drirc-disable-rgb10-for-chromium-on-amd.patch
Patch55: u_constify-struct-drisw_loader_funcs.patch Patch55: u_constify-struct-drisw_loader_funcs.patch
Patch56: u_drisw-use-separate-drisw_loader_funcs-for-shm.patch Patch56: u_drisw-use-separate-drisw_loader_funcs-for-shm.patch
Patch57: u_wayland_egl-Ensure-EGL-surface.patch
BuildRequires: autoconf >= 2.60 BuildRequires: autoconf >= 2.60
BuildRequires: automake BuildRequires: automake
@ -215,7 +216,7 @@ BuildRequires: pkgconfig(wayland-protocols) >= 1.8
BuildRequires: pkgconfig(wayland-server) >= 1.11 BuildRequires: pkgconfig(wayland-server) >= 1.11
%endif %endif
%if 0%{with_llvm} %if 0%{with_llvm}
BuildRequires: llvm-devel >= 3.9.0 BuildRequires: llvm-devel >= 6.0.0
%endif %endif
%if 0%{with_opencl} %if 0%{with_opencl}
@ -738,6 +739,7 @@ rm -rf docs/README.{VMS,WIN32,OS2}
%patch54 -p1 %patch54 -p1
%patch55 -p1 %patch55 -p1
%patch56 -p1 %patch56 -p1
%patch57 -p1
# Remove requires to libglvnd/libglvnd-devel from baselibs.conf when # Remove requires to libglvnd/libglvnd-devel from baselibs.conf when
# disabling libglvnd build; ugly ... # disabling libglvnd build; ugly ...

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Dec 4 11:20:05 UTC 2018 - bjorn.lie@gmail.com
- Add u_wayland_egl-Ensure-EGL-surface.patch: wayland/egl: Ensure
EGL surface is resized on DRI update_buffers(). Patch is sent
upstream already.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Nov 29 13:12:15 UTC 2018 - sndirsch@suse.com Thu Nov 29 13:12:15 UTC 2018 - sndirsch@suse.com

View File

@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9) # license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative. # published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via https://bugs.opensuse.org/
# #
@ -137,6 +137,7 @@ Patch31: archlinux_0001-Fix-linkage-against-shared-glapi.patch
Patch54: n_drirc-disable-rgb10-for-chromium-on-amd.patch Patch54: n_drirc-disable-rgb10-for-chromium-on-amd.patch
Patch55: u_constify-struct-drisw_loader_funcs.patch Patch55: u_constify-struct-drisw_loader_funcs.patch
Patch56: u_drisw-use-separate-drisw_loader_funcs-for-shm.patch Patch56: u_drisw-use-separate-drisw_loader_funcs-for-shm.patch
Patch57: u_wayland_egl-Ensure-EGL-surface.patch
BuildRequires: autoconf >= 2.60 BuildRequires: autoconf >= 2.60
BuildRequires: automake BuildRequires: automake
@ -214,7 +215,7 @@ BuildRequires: pkgconfig(wayland-protocols) >= 1.8
BuildRequires: pkgconfig(wayland-server) >= 1.11 BuildRequires: pkgconfig(wayland-server) >= 1.11
%endif %endif
%if 0%{with_llvm} %if 0%{with_llvm}
BuildRequires: llvm-devel >= 3.9.0 BuildRequires: llvm-devel >= 6.0.0
%endif %endif
%if 0%{with_opencl} %if 0%{with_opencl}
@ -737,6 +738,7 @@ rm -rf docs/README.{VMS,WIN32,OS2}
%patch54 -p1 %patch54 -p1
%patch55 -p1 %patch55 -p1
%patch56 -p1 %patch56 -p1
%patch57 -p1
# Remove requires to libglvnd/libglvnd-devel from baselibs.conf when # Remove requires to libglvnd/libglvnd-devel from baselibs.conf when
# disabling libglvnd build; ugly ... # disabling libglvnd build; ugly ...

View File

@ -0,0 +1,61 @@
From 15ad1cb4502f00df6cec88e3cc9090449146a347 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Tue, 20 Nov 2018 18:06:38 +0100
Subject: [PATCH] wayland/egl: Ensure EGL surface is resized on DRI
update_buffers()
Fullscreening and unfullscreening a totem window while playing a video
sometimes results in the video subsurface not changing size along. This
is also reproducible with epiphany.
If a surface gets resized while we have an active back buffer for it, the
resized dimensions won't get neither immediately applied on the resize
callback, nor correctly synchronized on update_buffers(), as the
(now stale) surface size and currently attached buffer size still do match.
There's actually 2 things to synchronize here, first the surface query
size might not be updated yet to the wl_egl_window's (i.e. resize_callback
happened while there is a back buffer), and second the wayland buffers
would need dropping if new surface size differs with the currently attached
buffer. These are done in separate steps now.
https://bugzilla.redhat.com/show_bug.cgi?id=1650929
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Tested-by: Bastien Nocera <hadess@hadess.net>
---
src/egl/drivers/dri2/platform_wayland.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
index 8122c81128..d9e484eaed 100644
--- a/src/egl/drivers/dri2/platform_wayland.c
+++ b/src/egl/drivers/dri2/platform_wayland.c
@@ -597,10 +597,8 @@ update_buffers(struct dri2_egl_surface *dri2_surf)
struct dri2_egl_display *dri2_dpy =
dri2_egl_display(dri2_surf->base.Resource.Display);
- if (dri2_surf->base.Width != dri2_surf->wl_win->attached_width ||
- dri2_surf->base.Height != dri2_surf->wl_win->attached_height) {
-
- dri2_wl_release_buffers(dri2_surf);
+ if (dri2_surf->base.Width != dri2_surf->wl_win->width ||
+ dri2_surf->base.Height != dri2_surf->wl_win->height) {
dri2_surf->base.Width = dri2_surf->wl_win->width;
dri2_surf->base.Height = dri2_surf->wl_win->height;
@@ -608,6 +606,11 @@ update_buffers(struct dri2_egl_surface *dri2_surf)
dri2_surf->dy = dri2_surf->wl_win->dy;
}
+ if (dri2_surf->base.Width != dri2_surf->wl_win->attached_width ||
+ dri2_surf->base.Height != dri2_surf->wl_win->attached_height) {
+ dri2_wl_release_buffers(dri2_surf);
+ }
+
if (get_back_bo(dri2_surf) < 0) {
_eglError(EGL_BAD_ALLOC, "failed to allocate color buffer");
return -1;
--
2.19.1