summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-12-02 20:06:02 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-12-08 20:22:11 +0000
commitb86ab6c03dca62fa32c30e7a2a9efda4179a3b48 (patch)
treefb30141e073dcd22075e3e8ea70ccffb43f920e7 /meta/recipes-graphics/mesa
parent5cfc6ef28decae29e3866ea30bf7298182eb26de (diff)
downloadpoky-b86ab6c03dca62fa32c30e7a2a9efda4179a3b48.tar.gz
mesa: Fix build on ARM systems without Neon
See [1] [1] https://github.com/YoeDistro/yoe-distro/issues/626 (From OE-Core rev: 48c898ae4e885d9f3af894d77946e5eb3a498112) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/mesa')
-rw-r--r--meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch49
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc1
2 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch b/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
new file mode 100644
index 0000000000..80b9af08e8
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
@@ -0,0 +1,49 @@
1From 4febda271c6bb0dc69ebf573446c6922a1ec35fb Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 2 Dec 2021 19:57:42 -0800
4Subject: [PATCH] util/format: Check for NEON before using it
5
6This fixes build on rpi0-w and any other machine which does not have
7neon unit and is not used as FPU unit
8
9Fixes errors e.g.
10
11In file included from ../mesa-21.3.0/src/util/format/u_format_unpack_neon.c:35:
12/mnt/b/yoe/master/build/tmp/work/arm1176jzfshf-vfp-yoe-linux-gnueabi/mesa/2_21.3.0-r0/recipe-sysroot-native/usr/lib/clang/13.0.1/include/arm_neon.h:32:2: error: "NEON support not enabled"
13
14Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14032]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 src/util/format/u_format.c | 2 +-
18 src/util/format/u_format_unpack_neon.c | 2 +-
19 2 files changed, 2 insertions(+), 2 deletions(-)
20
21diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c
22index 36c5e52008e..f0a00971691 100644
23--- a/src/util/format/u_format.c
24+++ b/src/util/format/u_format.c
25@@ -1138,7 +1138,7 @@ static void
26 util_format_unpack_table_init(void)
27 {
28 for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) {
29-#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
30+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
31 const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format);
32 if (unpack) {
33 util_format_unpack_table[format] = unpack;
34diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_unpack_neon.c
35index a4a5cb1f723..1e4f794a295 100644
36--- a/src/util/format/u_format_unpack_neon.c
37+++ b/src/util/format/u_format_unpack_neon.c
38@@ -23,7 +23,7 @@
39
40 #include <u_format.h>
41
42-#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
43+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
44
45 /* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics
46 * unless you tell it "no really".
47--
482.34.1
49
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index ed60d98250..30b9e93f63 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -19,6 +19,7 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
19 file://0002-meson.build-make-TLS-ELF-optional.patch \ 19 file://0002-meson.build-make-TLS-ELF-optional.patch \
20 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ 20 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
21 file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \ 21 file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \
22 file://0001-util-format-Check-for-NEON-before-using-it.patch \
22 " 23 "
23 24
24SRC_URI[sha256sum] = "a2753c09deef0ba14d35ae8a2ceff3fe5cd13698928c7bb62c2ec8736eb09ce1" 25SRC_URI[sha256sum] = "a2753c09deef0ba14d35ae8a2ceff3fe5cd13698928c7bb62c2ec8736eb09ce1"