summaryrefslogtreecommitdiff
path: root/media-libs/mesa/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-11 07:06:19 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-11 07:06:19 +0000
commitafa7f3d7b9d6af29760049c9711a24821c77c8ec (patch)
tree83e6706682741322caa0d3857ea5b615c1315bf7 /media-libs/mesa/files
parent7ece7f3d3bcd0184dd8dfd6653464da80184963c (diff)
gentoo auto-resync : 11:01:2024 - 07:06:19
Diffstat (limited to 'media-libs/mesa/files')
-rw-r--r--media-libs/mesa/files/23.3.3-big-endian.patch84
-rw-r--r--media-libs/mesa/files/23.3.3-symbols-check-Add-_GLOBAL_OFFSET_TABLE_.patch31
2 files changed, 115 insertions, 0 deletions
diff --git a/media-libs/mesa/files/23.3.3-big-endian.patch b/media-libs/mesa/files/23.3.3-big-endian.patch
new file mode 100644
index 000000000000..6d20fcb77f5c
--- /dev/null
+++ b/media-libs/mesa/files/23.3.3-big-endian.patch
@@ -0,0 +1,84 @@
+From 5997cf7587ce56aedac9114c0db9b250f1b54461 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Tue, 9 Jan 2024 23:45:27 -0500
+Subject: [PATCH 1/2] nir: Fix cast
+
+We were wrongly telling `nir_const_value_as_uint()` that `iter` had
+`bit_size` bits, but in one case it is explicitly i64. This works on
+little endian platforms, but caused the nir_loop_unroll_test.fadd{,_rev}
+tests to fail on big endian platforms.
+
+Bug: https://bugs.gentoo.org/921297
+Fixes: 268ad47c111 ("nir/loop_analyze: Handle bit sizes correctly in calculate_iterations")
+Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
+Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26964>
+---
+ src/compiler/nir/nir_loop_analyze.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/compiler/nir/nir_loop_analyze.c b/src/compiler/nir/nir_loop_analyze.c
+index b55da00b962..2b2ebfdd60f 100644
+--- a/src/compiler/nir/nir_loop_analyze.c
++++ b/src/compiler/nir/nir_loop_analyze.c
+@@ -827,6 +827,7 @@ get_iteration(nir_op cond_op, nir_const_value initial, nir_const_value step,
+ unsigned execution_mode)
+ {
+ nir_const_value span, iter;
++ unsigned iter_bit_size = bit_size;
+
+ switch (invert_comparison_if_needed(cond_op, invert_cond)) {
+ case nir_op_ine:
+@@ -880,13 +881,14 @@ get_iteration(nir_op cond_op, nir_const_value initial, nir_const_value step,
+ iter = eval_const_binop(nir_op_fdiv, bit_size, span,
+ step, execution_mode);
+ iter = eval_const_unop(nir_op_f2i64, bit_size, iter, execution_mode);
++ iter_bit_size = 64;
+ break;
+
+ default:
+ return -1;
+ }
+
+- uint64_t iter_u64 = nir_const_value_as_uint(iter, bit_size);
++ uint64_t iter_u64 = nir_const_value_as_uint(iter, iter_bit_size);
+ return iter_u64 > INT_MAX ? -1 : (int)iter_u64;
+ }
+
+--
+2.41.0
+
+From 4ed0957ce75878f8a2ce769e933c5ea3a1aa2510 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Tue, 9 Jan 2024 23:47:56 -0500
+Subject: [PATCH 2/2] nir/tests: Reenable tests that failed on big-endian
+
+These tests were disabled due to the bug fixed in the previous commit.
+
+Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
+Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26964>
+---
+ src/compiler/nir/tests/loop_unroll_tests.cpp | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/compiler/nir/tests/loop_unroll_tests.cpp b/src/compiler/nir/tests/loop_unroll_tests.cpp
+index f9ffb1f7a1c..af9b8f87549 100644
+--- a/src/compiler/nir/tests/loop_unroll_tests.cpp
++++ b/src/compiler/nir/tests/loop_unroll_tests.cpp
+@@ -144,12 +144,10 @@ UNROLL_TEST_INSERT(iadd, int, 0, 24, 4,
+ ige, iadd, false, TRUE, 6, 0)
+ UNROLL_TEST_INSERT(iadd_rev, int, 0, 24, 4,
+ ilt, iadd, true, TRUE, 7, 0)
+-#ifndef __s390x__
+ UNROLL_TEST_INSERT(fadd, float, 0.0, 24.0, 4.0,
+ fge, fadd, false, TRUE, 6, 0)
+ UNROLL_TEST_INSERT(fadd_rev, float, 0.0, 24.0, 4.0,
+ flt, fadd, true, TRUE, 7, 0)
+-#endif
+ UNROLL_TEST_INSERT(imul, int, 1, 81, 3,
+ ige, imul, false, TRUE, 4, 0)
+ UNROLL_TEST_INSERT(imul_rev, int, 1, 81, 3,
+--
+2.41.0
+
diff --git a/media-libs/mesa/files/23.3.3-symbols-check-Add-_GLOBAL_OFFSET_TABLE_.patch b/media-libs/mesa/files/23.3.3-symbols-check-Add-_GLOBAL_OFFSET_TABLE_.patch
new file mode 100644
index 000000000000..4c57f93f9bd1
--- /dev/null
+++ b/media-libs/mesa/files/23.3.3-symbols-check-Add-_GLOBAL_OFFSET_TABLE_.patch
@@ -0,0 +1,31 @@
+From 0ab7ea56b2558d30400a7462a05014e758c9c9c1 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Wed, 10 Jan 2024 10:56:17 -0500
+Subject: [PATCH] symbols-check: Add _GLOBAL_OFFSET_TABLE_
+
+This is exported on hppa/parisc.
+
+See also: https://gitlab.freedesktop.org/glvnd/libglvnd/-/merge_requests/291
+
+Cc: mesa-stable
+Bug: https://bugs.gentoo.org/908079
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26978>
+---
+ bin/symbols-check.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/bin/symbols-check.py b/bin/symbols-check.py
+index 7daf603c5f9..2e014731728 100644
+--- a/bin/symbols-check.py
++++ b/bin/symbols-check.py
+@@ -7,6 +7,7 @@ import subprocess
+
+ # This list contains symbols that _might_ be exported for some platforms
+ PLATFORM_SYMBOLS = [
++ '_GLOBAL_OFFSET_TABLE_',
+ '__bss_end__',
+ '__bss_start__',
+ '__bss_start',
+--
+2.41.0
+