summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/files/0001-meson-disable-SIMD-blake-optimisations-on-x32-host.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/mesa/files/0001-meson-disable-SIMD-blake-optimisations-on-x32-host.patch')
-rw-r--r--meta/recipes-graphics/mesa/files/0001-meson-disable-SIMD-blake-optimisations-on-x32-host.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/files/0001-meson-disable-SIMD-blake-optimisations-on-x32-host.patch b/meta/recipes-graphics/mesa/files/0001-meson-disable-SIMD-blake-optimisations-on-x32-host.patch
new file mode 100644
index 0000000000..bebe30037a
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-meson-disable-SIMD-blake-optimisations-on-x32-host.patch
@@ -0,0 +1,28 @@
1From f3c34b8da2662643089b33be8b93e56a4da8703d Mon Sep 17 00:00:00 2001
2From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
3Date: Wed, 2 Apr 2025 15:30:20 +0300
4Subject: [PATCH] meson: disable SIMD blake optimisations on x32 host
5
6On X.org startup libgallium crashes on x32 hosts inside
7blake3_hash_many_sse41(), most likely because of the different pointer
8size. Disable SIMD blake implementation if x32 is detected.
9
10Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
11Upstream-Status: Pending [will be submitted upstream after internal clearance]
12---
13 src/util/blake3/meson.build | 2 ++
14 1 file changed, 2 insertions(+)
15
16diff --git a/src/util/blake3/meson.build b/src/util/blake3/meson.build
17index 6b53daab6b32..ce6dd85ac1ea 100644
18--- a/src/util/blake3/meson.build
19+++ b/src/util/blake3/meson.build
20@@ -24,6 +24,8 @@ if cpu_family == 'x86_64'
21 else
22 files_blake3 += ['blake3_sse2_x86-64_windows_gnu.S', 'blake3_sse41_x86-64_windows_gnu.S', 'blake3_avx2_x86-64_windows_gnu.S', 'blake3_avx512_x86-64_windows_gnu.S']
23 endif
24+ elif meson.get_compiler('c').sizeof('void *') == 4
25+ blake3_defs += blake3_x86_no_simd_defs
26 else
27 files_blake3 += ['blake3_sse2_x86-64_unix.S', 'blake3_sse41_x86-64_unix.S', 'blake3_avx2_x86-64_unix.S', 'blake3_avx512_x86-64_unix.S']
28 endif