From 9d660a4ab1f530f6f05a982dedb04a1cb00e9efad45073652099ad80de4a2580 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Wed, 2 Nov 2016 12:53:31 +0000 Subject: [PATCH] Accepting request 438290 from home:Zaitor:branches:GNOME:Next Resub with bug refs OBS-URL: https://build.opensuse.org/request/show/438290 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=548 --- Mesa.changes | 9 +++- Mesa.spec | 2 - u_Mesa_i965-import-prime-buffers.patch | 63 -------------------------- 3 files changed, 8 insertions(+), 66 deletions(-) delete mode 100644 u_Mesa_i965-import-prime-buffers.patch diff --git a/Mesa.changes b/Mesa.changes index f9f4c56..459ad2f 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,5 +1,12 @@ ------------------------------------------------------------------- -Tue Nov 18:14:28 UTC 2016 - mimi.vx@gmail.com +Wed Nov 2 11:44:47 UTC 2016 - zaitor@opensuse.org + +- Drop u_Mesa_i965-import-prime-buffers.patch: Upstream fixed the + bug in a different way, and we should not keep the now obsolete + patch (boo#991638, fdo#71759). + +------------------------------------------------------------------- +Tue Nov 1 18:14:28 UTC 2016 - mimi.vx@gmail.com - update to 13.0.0 - openGL 4.5 with i965 driver on intel bbroadwell and newer hw diff --git a/Mesa.spec b/Mesa.spec index 4dc78e1..61562bc 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -66,7 +66,6 @@ Source7: Mesa.keyring Patch0: n_Fixed-build-against-wayland-1.2.1.patch # to be upstreamed Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch -Patch12: u_Mesa_i965-import-prime-buffers.patch # Patch from Fedora, fix 16bpp in llvmpipe Patch13: u_mesa-8.0.1-fix-16bpp.patch # Patch from Fedora, use shmget when available, under llvmpipe @@ -602,7 +601,6 @@ rm -rf docs/README.{VMS,WIN32,OS2} #%patch11 -p1 #%patch15 -p1 #%patch13 -p1 -%patch12 -p1 %patch18 -p1 %patch21 -p1 diff --git a/u_Mesa_i965-import-prime-buffers.patch b/u_Mesa_i965-import-prime-buffers.patch deleted file mode 100644 index 779b6a1..0000000 --- a/u_Mesa_i965-import-prime-buffers.patch +++ /dev/null @@ -1,63 +0,0 @@ -From e180e9e3c830d3611a6cf7d32e988b4c28d20942 Mon Sep 17 00:00:00 2001 -From: Martin Peres -Date: Wed, 3 Aug 2016 12:58:23 +0300 -Subject: [PATCH] i965: import prime buffers in the current context, not screen - -This mirrors the codepath taken by DRI2 in IntelSetTexBuffer2() and -fixes many applications when using DRI3: - - Totem with libva on hw-accelerated decoding - - obs-studio, using Window Capture (Xcomposite) as a Source - - gstreamer with VAAPI - -Cc: mesa-stable@lists.freedesktop.org -Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71759 -Signed-off-by: Martin Peres ---- - src/mesa/drivers/dri/i965/intel_screen.c | 25 +++++++++++++++++++++++-- - 1 file changed, 23 insertions(+), 2 deletions(-) - -Index: mesa-13.0.0-rc2/src/mesa/drivers/dri/i965/intel_screen.c -=================================================================== ---- mesa-13.0.0-rc2.orig/src/mesa/drivers/dri/i965/intel_screen.c -+++ mesa-13.0.0-rc2/src/mesa/drivers/dri/i965/intel_screen.c -@@ -701,8 +701,11 @@ intel_create_image_from_fds(__DRIscreen - int *fds, int num_fds, int *strides, int *offsets, - void *loaderPrivate) - { -+ GET_CURRENT_CONTEXT(ctx); - struct intel_screen *screen = dri_screen->driverPrivate; -+ struct brw_context *brw = brw_context(ctx); - struct intel_image_format *f; -+ dri_bufmgr *bufmgr; - __DRIimage *image; - int i, index; - -@@ -743,8 +746,26 @@ intel_create_image_from_fds(__DRIscreen - size = end; - } - -- image->bo = drm_intel_bo_gem_create_from_prime(screen->bufmgr, -- fds[0], size); -+ /* Let's import the buffer into the current context instead of the current -+ * screen as some applications like gstreamer, totem, or obs create multiple -+ * X connections which end up creating multiple screens and thus multiple -+ * buffer managers. They then proceed to use a different X connection than -+ * the one used by the currently-bound context to call GLXBindTexImageExt() -+ * which should then import the buffer in the current bound context and not -+ * the current screen. This is done properly upstairs for texture management -+ * so we need to mirror this behaviour if we don't want the kernel rejecting -+ * our pushbuffers as the buffer would not have been imported by the same -+ * buffer manager that sent the pushbuffer referencing it. -+ * -+ * If there is no context currently bound, then revert to using the screen's -+ * buffer manager and hope for the best... -+ */ -+ if (brw) -+ bufmgr = brw->bufmgr; -+ else -+ bufmgr = screen->bufmgr; -+ -+ image->bo = drm_intel_bo_gem_create_from_prime(bufmgr, fds[0], size); - if (image->bo == NULL) { - free(image); - return NULL;