[arch-commits] Commit in lib32-mesa/repos/multilib-x86_64 (7 files)

2020-05-22 Thread Laurent Carlier via arch-commits
Date: Friday, May 22, 2020 @ 14:17:33
  Author: lcarlier
Revision: 631580

archrelease: copy trunk to multilib-x86_64

Added:
  
lib32-mesa/repos/multilib-x86_64/0001-meson-Disable-GCC-s-dead-store-elimination-for-memor.patch
(from rev 631579, 
lib32-mesa/trunk/0001-meson-Disable-GCC-s-dead-store-elimination-for-memor.patch)
  lib32-mesa/repos/multilib-x86_64/LICENSE
(from rev 631579, lib32-mesa/trunk/LICENSE)
  lib32-mesa/repos/multilib-x86_64/PKGBUILD
(from rev 631579, lib32-mesa/trunk/PKGBUILD)
  lib32-mesa/repos/multilib-x86_64/crossfile.ini
(from rev 631579, lib32-mesa/trunk/crossfile.ini)
Deleted:
  lib32-mesa/repos/multilib-x86_64/LICENSE
  lib32-mesa/repos/multilib-x86_64/PKGBUILD
  lib32-mesa/repos/multilib-x86_64/crossfile.ini

-+
 0001-meson-Disable-GCC-s-dead-store-elimination-for-memor.patch |   53 +
 LICENSE |  166 ++--
 PKGBUILD|  365 
+-
 crossfile.ini   |4 
 4 files changed, 325 insertions(+), 263 deletions(-)

Copied: 
lib32-mesa/repos/multilib-x86_64/0001-meson-Disable-GCC-s-dead-store-elimination-for-memor.patch
 (from rev 631579, 
lib32-mesa/trunk/0001-meson-Disable-GCC-s-dead-store-elimination-for-memor.patch)
===
--- 0001-meson-Disable-GCC-s-dead-store-elimination-for-memor.patch 
(rev 0)
+++ 0001-meson-Disable-GCC-s-dead-store-elimination-for-memor.patch 
2020-05-22 14:17:33 UTC (rev 631580)
@@ -0,0 +1,53 @@
+From 979ae78318c3e37cc0e0579b8d1f05c46bb76e7d Mon Sep 17 00:00:00 2001
+From: Danylo Piliaiev 
+Date: Tue, 19 May 2020 20:35:49 +0300
+Subject: [PATCH] meson: Disable GCC's dead store elimination for memory
+ zeroing custom new
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Some classes use custom new operator which zeroes memory, however gcc does
+aggressive dead-store elimination which threats all writes to the memory
+before the constructor as "dead stores".
+
+For now we disable this optimization.
+
+The new operators in question are declared via:
+ DECLARE_RZALLOC_CXX_OPERATORS
+ DECLARE_LINEAR_ZALLOC_CXX_OPERATORS
+
+The issue was found with lto builds, however there is no guarantee that
+it didn't happen with ordinary ones.
+
+CC: 
+Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2977
+Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1358
+Signed-off-by: Danylo Piliaiev 
+Reviewed-by: Marek Olšák 
+Part-of: 
+(cherry picked from commit 5500a2b7fc558217bbd4c2a966ab6fcadaed8b3b)
+Signed-off-by: Laurent Carlier 
+---
+ meson.build   | 5 +
+ 1 files changed, 5 insertions(+), 0 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index ba4fdb2a59f..434684c8bcc 100644
+--- a/meson.build
 b/meson.build
+@@ -980,6 +980,11 @@ else
+ '-fno-math-errno',
+ '-fno-trapping-math',
+ '-Qunused-arguments',
++# Some classes use custom new operator which zeroes memory, however
++# gcc does aggressive dead-store elimination which threats all writes
++# to the memory before the constructor as "dead stores".
++# For now we disable this optimization.
++'-flifetime-dse=1',
+   ]
+   # MinGW chokes on format specifiers and I can't get it all working
+   if not (cc.get_id() == 'gcc' and host_machine.system() == 'windows')
+-- 
+2.26.2
+

Deleted: LICENSE
===
--- LICENSE 2020-05-22 14:17:26 UTC (rev 631579)
+++ LICENSE 2020-05-22 14:17:33 UTC (rev 631580)
@@ -1,83 +0,0 @@
-The Mesa 3D Graphics Library
-
-Disclaimer
-
-   Mesa is a 3-D graphics library with an API which is very similar to
-   that of [1]OpenGL.* To the extent that Mesa utilizes the OpenGL command
-   syntax or state machine, it is being used with authorization from
-   [2]Silicon Graphics, Inc.(SGI). However, the author does not possess an
-   OpenGL license from SGI, and makes no claim that Mesa is in any way a
-   compatible replacement for OpenGL or associated with SGI. Those who
-   want a licensed implementation of OpenGL should contact a licensed
-   vendor.
-
-   Please do not refer to the library as MesaGL (for legal reasons). It's
-   just Mesa or The Mesa 3-D graphics library.
-
-   * OpenGL is a trademark of [3]Silicon Graphics Incorporated.
-
-License / Copyright Information
-
-   The Mesa distribution consists of several components. Different
-   copyrights and licenses apply to different components. For example, the
-   GLX client code uses the SGI Free Software License B, and some of the
-   Mesa device drivers are copyrighted by their authors. See below for a
-   list of Mesa's main components and the license for each.
-
-   

[arch-commits] Commit in lib32-mesa/repos/multilib-x86_64 (7 files)

2018-01-12 Thread Evangelos Foutras via arch-commits
Date: Friday, January 12, 2018 @ 18:58:06
  Author: foutrelis
Revision: 281690

archrelease: copy trunk to multilib-x86_64

Added:
  
lib32-mesa/repos/multilib-x86_64/0001-loader-dri3-Avoid-freeing-renderbuffers-in-use.patch
(from rev 281689, 
lib32-mesa/trunk/0001-loader-dri3-Avoid-freeing-renderbuffers-in-use.patch)
  lib32-mesa/repos/multilib-x86_64/0002-glvnd-fix-gl-dot-pc.patch
(from rev 281689, lib32-mesa/trunk/0002-glvnd-fix-gl-dot-pc.patch)
  lib32-mesa/repos/multilib-x86_64/LICENSE
(from rev 281689, lib32-mesa/trunk/LICENSE)
  lib32-mesa/repos/multilib-x86_64/PKGBUILD
(from rev 281689, lib32-mesa/trunk/PKGBUILD)
Deleted:
  lib32-mesa/repos/multilib-x86_64/0002-glvnd-fix-gl-dot-pc.patch
  lib32-mesa/repos/multilib-x86_64/LICENSE
  lib32-mesa/repos/multilib-x86_64/PKGBUILD

---+
 0001-loader-dri3-Avoid-freeing-renderbuffers-in-use.patch |   74 ++
 0002-glvnd-fix-gl-dot-pc.patch|   24 
 LICENSE   |  164 ++---
 PKGBUILD  |  335 ++--
 4 files changed, 338 insertions(+), 259 deletions(-)

Copied: 
lib32-mesa/repos/multilib-x86_64/0001-loader-dri3-Avoid-freeing-renderbuffers-in-use.patch
 (from rev 281689, 
lib32-mesa/trunk/0001-loader-dri3-Avoid-freeing-renderbuffers-in-use.patch)
===
--- 0001-loader-dri3-Avoid-freeing-renderbuffers-in-use.patch   
(rev 0)
+++ 0001-loader-dri3-Avoid-freeing-renderbuffers-in-use.patch   2018-01-12 
18:58:06 UTC (rev 281690)
@@ -0,0 +1,74 @@
+From 897c54d522ab960a879b763a15e489f630c491ee Mon Sep 17 00:00:00 2001
+From: Thomas Hellstrom 
+Date: Thu, 11 Jan 2018 10:19:23 +0100
+Subject: [PATCH] loader/dri3: Avoid freeing renderbuffers in use
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upon reception of an event that lowered the number of active back buffers,
+the code would immediately try to free all back buffers with an id equal to or
+higher than the new number of active back buffers.
+
+However, that could lead to an active or to-be-active back buffer being freed,
+since the old number of back buffers was used when obtaining an idle back
+buffer for use.
+
+This lead to crashes when lowering the number of active back buffers by
+transitioning from page-flipping to non-page-flipping presents.
+
+Fix this by computing the number of active back buffers only when trying to
+obtain a new back buffer.
+
+Fixes: 15e208c4cc ("loader/dri3: Don't accidently free buffer holding new back 
content")
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104214
+Cc: "17.3" 
+Tested-by: Andriy.Khulap 
+Tested-by: Vadym Shovkoplias 
+Reviewed-by: Michel Dänzer 
+Signed-off-by: Thomas Hellstrom 
+---
+ src/loader/loader_dri3_helper.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
+index cc890bc923..8f8efcb646 100644
+--- a/src/loader/loader_dri3_helper.c
 b/src/loader/loader_dri3_helper.c
+@@ -205,7 +205,6 @@ void
+ loader_dri3_set_swap_interval(struct loader_dri3_drawable *draw, int interval)
+ {
+draw->swap_interval = interval;
+-   dri3_update_num_back(draw);
+ }
+ 
+ /** dri3_free_render_buffer
+@@ -377,7 +376,6 @@ dri3_handle_present_event(struct loader_dri3_drawable 
*draw,
+ draw->flipping = false;
+ break;
+  }
+- dri3_update_num_back(draw);
+ 
+  if (draw->vtable->show_fps)
+ draw->vtable->show_fps(draw, ce->ust);
+@@ -402,7 +400,8 @@ dri3_handle_present_event(struct loader_dri3_drawable 
*draw,
+ buf->busy = 0;
+ 
+  if (buf && draw->num_back <= b && b < LOADER_DRI3_MAX_BACK &&
+- draw->cur_blit_source != b) {
++ draw->cur_blit_source != b &&
++ !buf->busy) {
+ dri3_free_render_buffer(draw, buf);
+ draw->buffers[b] = NULL;
+  }
+@@ -537,6 +536,7 @@ dri3_find_back(struct loader_dri3_drawable *draw)
+/* Check whether we need to reuse the current back buffer as new back.
+ * In that case, wait until it's not busy anymore.
+ */
++   dri3_update_num_back(draw);
+num_to_consider = draw->num_back;
+if (!loader_dri3_have_image_blit(draw) && draw->cur_blit_source != -1) {
+   num_to_consider = 1;
+-- 
+2.15.1
+

Deleted: 0002-glvnd-fix-gl-dot-pc.patch
===
--- 0002-glvnd-fix-gl-dot-pc.patch  2018-01-12 18:57:55 UTC (rev 281689)
+++ 0002-glvnd-fix-gl-dot-pc.patch  2018-01-12 18:58:06 UTC (rev 281690)
@@ -1,12 +0,0 @@
-diff -up