From 0bb34dd94f79506bdd69ff169622976a944444b5343f33c82b6272f6c82aee5f Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Wed, 10 Jul 2019 10:53:21 +0000 Subject: [PATCH 1/2] Accepting request 714276 from home:iznogood:branches:X11:XOrg New stable release OBS-URL: https://build.opensuse.org/request/show/714276 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=847 --- Mesa-drivers.changes | 12 ++++++++++++ Mesa-drivers.spec | 12 ++++-------- Mesa.changes | 12 ++++++++++++ Mesa.spec | 12 ++++-------- mesa-19.1.1.tar.xz | 3 --- mesa-19.1.1.tar.xz.sig | Bin 566 -> 0 bytes mesa-19.1.2.tar.xz | 3 +++ mesa-19.1.2.tar.xz.sig | Bin 0 -> 566 bytes 8 files changed, 35 insertions(+), 19 deletions(-) delete mode 100644 mesa-19.1.1.tar.xz delete mode 100644 mesa-19.1.1.tar.xz.sig create mode 100644 mesa-19.1.2.tar.xz create mode 100644 mesa-19.1.2.tar.xz.sig diff --git a/Mesa-drivers.changes b/Mesa-drivers.changes index 057d1ed..bcca4f8 100644 --- a/Mesa-drivers.changes +++ b/Mesa-drivers.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Jul 9 16:20:07 UTC 2019 - Bjørn Lie + +- Update to version 19.1.2: + * Different fixes for the Intel and AMD Vulkan drivers, + Freedreno, the Meson build system, and some other fixes for + other parts and/or drivers. + * Worth to mention a fix for a crash in Wolfenstein II with the + RADV driver, and another fix relevant for DXVK on Intel gen7 + drivers. +- Update Source urls from ftp to https. + ------------------------------------------------------------------- Thu Jun 27 20:18:07 UTC 2019 - Bjørn Lie diff --git a/Mesa-drivers.spec b/Mesa-drivers.spec index d14c3f2..af48576 100644 --- a/Mesa-drivers.spec +++ b/Mesa-drivers.spec @@ -42,7 +42,7 @@ %define glamor 1 %define _name_archive mesa -%define _version 19.1.1 +%define _version 19.1.2 %define with_opencl 0 %define with_vulkan 0 %define with_llvm 0 @@ -110,19 +110,15 @@ %endif Name: Mesa-drivers -Version: 19.1.1 +Version: 19.1.2 Release: 0 Summary: System for rendering 3-D graphics License: MIT Group: System/Libraries URL: http://www.mesa3d.org #Git-Clone: git://anongit.freedesktop.org/mesa/mesa -# For now directory structure of Mesa's ftp changed -# Source: ftp://ftp.freedesktop.org/pub/mesa/%%{version}/%%{_name_archive}-%%{_version}.tar.xz -Source: ftp://ftp.freedesktop.org/pub/mesa/%{_name_archive}-%{_version}.tar.xz -# Source1: ftp://ftp.freedesktop.org/pub/mesa/%%{version}/%%{_name_archive}-%%{_version}.tar.xz.sig -Source1: ftp://ftp.freedesktop.org/pub/mesa/%{_name_archive}-%{_version}.tar.xz.sig -# Source1: %%{_name_archive}-%%{_version}.tar.xz.sha1sum +Source: https://mesa.freedesktop.org/archive/%{_name_archive}-%{_version}.tar.xz +Source1: https://mesa.freedesktop.org/archive/%{_name_archive}-%{_version}.tar.xz.sig Source2: baselibs.conf Source3: README.updates Source4: manual-pages.tar.bz2 diff --git a/Mesa.changes b/Mesa.changes index 057d1ed..bcca4f8 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Jul 9 16:20:07 UTC 2019 - Bjørn Lie + +- Update to version 19.1.2: + * Different fixes for the Intel and AMD Vulkan drivers, + Freedreno, the Meson build system, and some other fixes for + other parts and/or drivers. + * Worth to mention a fix for a crash in Wolfenstein II with the + RADV driver, and another fix relevant for DXVK on Intel gen7 + drivers. +- Update Source urls from ftp to https. + ------------------------------------------------------------------- Thu Jun 27 20:18:07 UTC 2019 - Bjørn Lie diff --git a/Mesa.spec b/Mesa.spec index 0412544..b1e82ab 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -41,7 +41,7 @@ %define glamor 1 %define _name_archive mesa -%define _version 19.1.1 +%define _version 19.1.2 %define with_opencl 0 %define with_vulkan 0 %define with_llvm 0 @@ -109,19 +109,15 @@ %endif Name: Mesa -Version: 19.1.1 +Version: 19.1.2 Release: 0 Summary: System for rendering 3-D graphics License: MIT Group: System/Libraries URL: http://www.mesa3d.org #Git-Clone: git://anongit.freedesktop.org/mesa/mesa -# For now directory structure of Mesa's ftp changed -# Source: ftp://ftp.freedesktop.org/pub/mesa/%%{version}/%%{_name_archive}-%%{_version}.tar.xz -Source: ftp://ftp.freedesktop.org/pub/mesa/%{_name_archive}-%{_version}.tar.xz -# Source1: ftp://ftp.freedesktop.org/pub/mesa/%%{version}/%%{_name_archive}-%%{_version}.tar.xz.sig -Source1: ftp://ftp.freedesktop.org/pub/mesa/%{_name_archive}-%{_version}.tar.xz.sig -# Source1: %%{_name_archive}-%%{_version}.tar.xz.sha1sum +Source: https://mesa.freedesktop.org/archive/%{_name_archive}-%{_version}.tar.xz +Source1: https://mesa.freedesktop.org/archive/%{_name_archive}-%{_version}.tar.xz.sig Source2: baselibs.conf Source3: README.updates Source4: manual-pages.tar.bz2 diff --git a/mesa-19.1.1.tar.xz b/mesa-19.1.1.tar.xz deleted file mode 100644 index 4a8f5c4..0000000 --- a/mesa-19.1.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:72114b16b4a84373b2acda060fe2bb1d45ea2598efab3ef2d44bdeda74f15581 -size 10927620 diff --git a/mesa-19.1.1.tar.xz.sig b/mesa-19.1.1.tar.xz.sig deleted file mode 100644 index 35f1e7f3cc50ce2fa2cd8d76455ad24446fc4962b109b4e0c1bec5610807e50e..0000000000000000000000000000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 566 zcmV-60?GY}0y6{v0SW*e79j*j))=QS5UXZd zsqQB}bA%nKx@l!JC-;>Hp`h`jbm?gn*N zWBxzH+IQZ<6Cru*_D0@oSk|~(|Lb+#^ow9t=HRQQ(J!K}WNErqY*0tMeNVodIBbPL z%9fK+21805LuNE*xwtd@)qzS%@^VJXzgXnezmuf!uA(bb{wbLcp%F(c*$Itu)bZ>cV`EI$=PNPK>0s2AVOIf{s5mf~SFezzo0NrE zHtQ!-vNwR#uy<#eF-jB7*HK;Wh!lnNIwW1RyQEx36rsR<+PU(376t#UBM{U~*E!jW zK^_0eKA$P#FVt)s$#W@UFlYJ0<$nB{BQtq5j*>b}>wnp-6U5DPF?*UXr24=+_FBt8 z>o71-`sKrKwnL+(tuW#iJA#>#VZE{)?*iPLYz$T$&V^@T_$LG!D*FQOx=va< zoF}5Q=gcd8I*fZ-tUkwod)(XGjSX!pvvxr8_KoOjN5xd{hu6Hofl%1;S5YL8Y?Z6U zZ74cGsIW>z1n3s{Gnx&Y=U-L-Gb$oX{F4E3tC1VgPRW8Or E5ftMUrvLx| diff --git a/mesa-19.1.2.tar.xz b/mesa-19.1.2.tar.xz new file mode 100644 index 0000000..b7211d4 --- /dev/null +++ b/mesa-19.1.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:813a144ea8ebefb7b48b6733f3f603855b0f61268d86cc1cc26a6b4be908fcfd +size 10930748 diff --git a/mesa-19.1.2.tar.xz.sig b/mesa-19.1.2.tar.xz.sig new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..e24e4ee8dfe7f5259dcbd3f81c4dbf863eef4a503b292ed6141aa2187c6f4918 GIT binary patch literal 566 zcmV-60?GY}0y6{v0SW*e79j*j))$HJl!+VcLVRaTYGt(nM7@f`Y+2Q;^9nDx8+w)_$d z{gt)+h59|vb9k)f-kgJkzqsGfs8u@(bx_1#Avgj?tARmuobN;O0}6aL4lML()HEj? zraCgGlft^GVzF~ss0NIKD-)!0YvLdPHTEP!L_cI~{m9{JQ#8~(I{iJ>H>8emR}FG} zT2d~VWY8wygg}m1SU%RDUCRdRJ%i=9g;s%OWs;fbkQxPb;tp@+*EgM#n&*`h>D-JAXvg4GpB?Pg!Q}Glh{PC_%R&mz4uXv=>P+?761SM literal 0 HcmV?d00001 From efd5979f70005daf0014c8494d64dfb568202fc6a2b6df63d20ebdd445ff10f4 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Thu, 11 Jul 2019 15:26:20 +0000 Subject: [PATCH 2/2] - U_llvmpipe-Don-t-use-u_ringbuffer-for-lp_scene_queue.patch * may fix crashes in llvmpipe on SMP systems with LTO enabled builds (boo#1133265) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=848 --- Mesa-drivers.changes | 7 + Mesa-drivers.spec | 2 + Mesa.changes | 7 + Mesa.spec | 2 + ...-use-u_ringbuffer-for-lp_scene_queue.patch | 186 ++++++++++++++++++ 5 files changed, 204 insertions(+) create mode 100644 U_llvmpipe-Don-t-use-u_ringbuffer-for-lp_scene_queue.patch diff --git a/Mesa-drivers.changes b/Mesa-drivers.changes index bcca4f8..df38061 100644 --- a/Mesa-drivers.changes +++ b/Mesa-drivers.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jul 11 15:02:37 UTC 2019 - Stefan Dirsch + +- U_llvmpipe-Don-t-use-u_ringbuffer-for-lp_scene_queue.patch + * may fix crashes in llvmpipe on SMP systems with LTO enabled + builds (boo#1133265) + ------------------------------------------------------------------- Tue Jul 9 16:20:07 UTC 2019 - Bjørn Lie diff --git a/Mesa-drivers.spec b/Mesa-drivers.spec index af48576..97eb8e1 100644 --- a/Mesa-drivers.spec +++ b/Mesa-drivers.spec @@ -124,6 +124,7 @@ Source3: README.updates Source4: manual-pages.tar.bz2 Source6: %{name}-rpmlintrc Source7: Mesa.keyring +Patch0: U_llvmpipe-Don-t-use-u_ringbuffer-for-lp_scene_queue.patch # never to be upstreamed Patch54: n_drirc-disable-rgb10-for-chromium-on-amd.patch Patch58: u_dep_xcb.patch @@ -725,6 +726,7 @@ programs against the XA state tracker. # remove some docs rm -rf docs/README.{VMS,WIN32,OS2} +%patch0 -p1 %patch54 -p1 %patch58 -p1 %patch60 -p1 diff --git a/Mesa.changes b/Mesa.changes index bcca4f8..df38061 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jul 11 15:02:37 UTC 2019 - Stefan Dirsch + +- U_llvmpipe-Don-t-use-u_ringbuffer-for-lp_scene_queue.patch + * may fix crashes in llvmpipe on SMP systems with LTO enabled + builds (boo#1133265) + ------------------------------------------------------------------- Tue Jul 9 16:20:07 UTC 2019 - Bjørn Lie diff --git a/Mesa.spec b/Mesa.spec index b1e82ab..3086821 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -123,6 +123,7 @@ Source3: README.updates Source4: manual-pages.tar.bz2 Source6: %{name}-rpmlintrc Source7: Mesa.keyring +Patch0: U_llvmpipe-Don-t-use-u_ringbuffer-for-lp_scene_queue.patch # never to be upstreamed Patch54: n_drirc-disable-rgb10-for-chromium-on-amd.patch Patch58: u_dep_xcb.patch @@ -724,6 +725,7 @@ programs against the XA state tracker. # remove some docs rm -rf docs/README.{VMS,WIN32,OS2} +%patch0 -p1 %patch54 -p1 %patch58 -p1 %patch60 -p1 diff --git a/U_llvmpipe-Don-t-use-u_ringbuffer-for-lp_scene_queue.patch b/U_llvmpipe-Don-t-use-u_ringbuffer-for-lp_scene_queue.patch new file mode 100644 index 0000000..c4a799f --- /dev/null +++ b/U_llvmpipe-Don-t-use-u_ringbuffer-for-lp_scene_queue.patch @@ -0,0 +1,186 @@ +From 397d1a18ef78ddf46efda44d6783105f9fd87f7e Mon Sep 17 00:00:00 2001 +From: Caio Marcelo de Oliveira Filho +Date: Wed, 12 Jun 2019 15:32:30 -0700 +Subject: [PATCH] llvmpipe: Don't use u_ringbuffer for lp_scene_queue + +Inline the ring buffer and signal logic into lp_scene_queue instead of +using a u_ringbuffer. The code ends up simpler since there's no need +to handle serializing data from / to packets. + +This fixes a crash when compiling Mesa with LTO, that happened because +of util_ringbuffer_dequeue() was writing data after the "header +packet", as shown below + + struct scene_packet { + struct util_packet header; + struct lp_scene *scene; + }; + + /* Snippet of old lp_scene_deque(). */ + packet.scene = NULL; + ret = util_ringbuffer_dequeue(queue->ring, + &packet.header, + sizeof packet / 4, + return packet.scene; + +but due to the way aliasing analysis work the compiler didn't +considered the "&packet->header" to alias with "packet->scene". With +the aggressive inlining done by LTO, this would end up always +returning NULL instead of the content read by +util_ringbuffer_dequeue(). + +Issue found by Marco Simental and iThiago Macieira. + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110884 +Reviewed-by: Roland Scheidegger +--- + src/gallium/drivers/llvmpipe/lp_scene_queue.c | 84 +++++++++++++++------------ + 1 file changed, 48 insertions(+), 36 deletions(-) + +diff --git a/src/gallium/drivers/llvmpipe/lp_scene_queue.c b/src/gallium/drivers/llvmpipe/lp_scene_queue.c +index debc7a6fe18..5f267d04ca4 100644 +--- a/src/gallium/drivers/llvmpipe/lp_scene_queue.c ++++ b/src/gallium/drivers/llvmpipe/lp_scene_queue.c +@@ -32,25 +32,33 @@ + * which are produced by the "rast" code when it finishes rendering a scene. + */ + +-#include "util/u_ringbuffer.h" ++#include "os/os_thread.h" + #include "util/u_memory.h" + #include "lp_scene_queue.h" ++#include "util/u_math.h" + + + +-#define MAX_SCENE_QUEUE 4 ++#define SCENE_QUEUE_SIZE 4 ++ + +-struct scene_packet { +- struct util_packet header; +- struct lp_scene *scene; +-}; + + /** + * A queue of scenes + */ + struct lp_scene_queue + { +- struct util_ringbuffer *ring; ++ struct lp_scene *scenes[SCENE_QUEUE_SIZE]; ++ ++ mtx_t mutex; ++ cnd_t change; ++ ++ /* These values wrap around, so that head == tail means empty. When used ++ * to index the array, we use them modulo the queue size. This scheme ++ * works because the queue size is a power of two. ++ */ ++ unsigned head; ++ unsigned tail; + }; + + +@@ -59,20 +67,19 @@ struct lp_scene_queue + struct lp_scene_queue * + lp_scene_queue_create(void) + { ++ /* Circular queue behavior depends on size being a power of two. */ ++ STATIC_ASSERT(SCENE_QUEUE_SIZE > 0); ++ STATIC_ASSERT((SCENE_QUEUE_SIZE & (SCENE_QUEUE_SIZE - 1)) == 0); ++ + struct lp_scene_queue *queue = CALLOC_STRUCT(lp_scene_queue); ++ + if (!queue) + return NULL; + +- queue->ring = util_ringbuffer_create( MAX_SCENE_QUEUE * +- sizeof( struct scene_packet ) / 4); +- if (queue->ring == NULL) +- goto fail; ++ (void) mtx_init(&queue->mutex, mtx_plain); ++ cnd_init(&queue->change); + + return queue; +- +-fail: +- FREE(queue); +- return NULL; + } + + +@@ -80,7 +87,8 @@ fail: + void + lp_scene_queue_destroy(struct lp_scene_queue *queue) + { +- util_ringbuffer_destroy(queue->ring); ++ cnd_destroy(&queue->change); ++ mtx_destroy(&queue->mutex); + FREE(queue); + } + +@@ -89,19 +97,25 @@ lp_scene_queue_destroy(struct lp_scene_queue *queue) + struct lp_scene * + lp_scene_dequeue(struct lp_scene_queue *queue, boolean wait) + { +- struct scene_packet packet; +- enum pipe_error ret; ++ mtx_lock(&queue->mutex); + +- packet.scene = NULL; ++ if (wait) { ++ /* Wait for queue to be not empty. */ ++ while (queue->head == queue->tail) ++ cnd_wait(&queue->change, &queue->mutex); ++ } else { ++ if (queue->head == queue->tail) { ++ mtx_unlock(&queue->mutex); ++ return NULL; ++ } ++ } + +- ret = util_ringbuffer_dequeue(queue->ring, +- &packet.header, +- sizeof packet / 4, +- wait ); +- if (ret != PIPE_OK) +- return NULL; ++ struct lp_scene *scene = queue->scenes[queue->head++ % SCENE_QUEUE_SIZE]; ++ ++ cnd_signal(&queue->change); ++ mtx_unlock(&queue->mutex); + +- return packet.scene; ++ return scene; + } + + +@@ -109,16 +123,14 @@ lp_scene_dequeue(struct lp_scene_queue *queue, boolean wait) + void + lp_scene_enqueue(struct lp_scene_queue *queue, struct lp_scene *scene) + { +- struct scene_packet packet; +- +- packet.header.dwords = sizeof packet / 4; +- packet.header.data24 = 0; +- packet.scene = scene; +- +- util_ringbuffer_enqueue(queue->ring, &packet.header); +-} +- +- ++ mtx_lock(&queue->mutex); + ++ /* Wait for free space. */ ++ while (queue->tail - queue->head >= SCENE_QUEUE_SIZE) ++ cnd_wait(&queue->change, &queue->mutex); + ++ queue->scenes[queue->tail++ % SCENE_QUEUE_SIZE] = scene; + ++ cnd_signal(&queue->change); ++ mtx_unlock(&queue->mutex); ++} +-- +2.16.4 +