summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRandolph Sapp <rs@ti.com>2024-05-02 14:18:42 -0500
committerRyan Eatmon <reatmon@ti.com>2024-05-02 15:01:10 -0500
commitc4bee16aaa2b387bbbdec0ebe69d4472323ea89e (patch)
treeb0c093c4675e8241879781df4997761cd01aef87
parent817a950947bf8ed2ce97036f121592e5b906bedf (diff)
downloadmeta-ti-c4bee16aaa2b387bbbdec0ebe69d4472323ea89e.tar.gz
mesa-pvr_23.2.1: import mesa patches from oe-core/master
Locally overlay verbatim copies of mesa 22.3.5 patches from oe-core/master, so we get whatever QoL patches from core relevant to the current release. Signed-off-by: Randolph Sapp <rs@ti.com> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-gallium-Fix-build-with-llvm-17.patch40
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch42
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch25
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson.build-check-for-all-linux-host_os-combinations.patch43
4 files changed, 150 insertions, 0 deletions
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-gallium-Fix-build-with-llvm-17.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-gallium-Fix-build-with-llvm-17.patch
new file mode 100644
index 00000000..738ff267
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-gallium-Fix-build-with-llvm-17.patch
@@ -0,0 +1,40 @@
1From 6d07f6aa7f92f40d78a2db645f16f0f3e7d3c2e8 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 23 Jun 2023 01:20:38 -0700
4Subject: [PATCH] gallium: Fix build with llvm 17
5
6These headers are not available for C files in llvm 17+
7and they seem to be not needed to compile after all with llvm 17
8so add conditions to exclude them for llvm >= 17
9
10Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12
13---
14 src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 +++++-
15 1 file changed, 5 insertions(+), 1 deletion(-)
16
17diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
18index cd2108f..b1a4d03 100644
19--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
20+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
21@@ -46,15 +46,19 @@
22 #if GALLIVM_USE_NEW_PASS == 1
23 #include <llvm-c/Transforms/PassBuilder.h>
24 #elif GALLIVM_HAVE_CORO == 1
25+#if LLVM_VERSION_MAJOR < 17
26 #include <llvm-c/Transforms/Scalar.h>
27-#if LLVM_VERSION_MAJOR >= 7
28+#endif
29+#if LLVM_VERSION_MAJOR >= 7 && LLVM_VERSION_MAJOR < 17
30 #include <llvm-c/Transforms/Utils.h>
31 #endif
32 #if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64)
33 #include <llvm-c/Transforms/IPO.h>
34 #endif
35+#if LLVM_VERSION_MAJOR < 17
36 #include <llvm-c/Transforms/Coroutines.h>
37 #endif
38+#endif
39
40 unsigned gallivm_perf = 0;
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch
new file mode 100644
index 00000000..4cded054
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch
@@ -0,0 +1,42 @@
1From 00d41cd5aa3f4b494dc276c9b4ccdc096310c91f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 28 Sep 2023 15:34:22 -0700
4Subject: [PATCH] meson: use llvm-config instead of cmake to fix linking errors with meson 1.2.1
5
6meson dependency auto dependency detection uses cmake and then
7config-tool to process dependencies, in mesa the logic to detect llvm is
8using auto detection which means if it finds cmake then it will try to
9use cmake method. Cmake method works ok except a case when llvm-dev
10package is installed on the build host then it generates its own
11native.meson file and ignores OE supplied meson.native file which has
12correct llvm-config tool specified which is pointing to llvm-config from
13native sysroot. The generated meson.native file points to one found in
14/usr/bin and there onwards detector finds native install of llvm and
15configures that into building native mesa package.
16
17Since cmake detector does not always work, disable it by default and use
18config-tool which works in all cases. This is suggested in below issues
19too
20
21A similar issue is open in meson upstream [1] and mesa [2]
22
23[1] https://github.com/mesonbuild/meson/issues/10483
24[2] https://gitlab.freedesktop.org/mesa/mesa/-/issues/6738
25
26Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25438]
27
28Signed-off-by: Khem Raj <raj.khem@gmail.com>
29---
30 meson.build | 1 +
31 1 file changed, 1 insertion(+)
32
33--- a/meson.build
34+++ b/meson.build
35@@ -1659,6 +1659,7 @@ with_llvm = false
36 if _llvm.allowed()
37 dep_llvm = dependency(
38 'llvm',
39+ method : host_machine.system() == 'windows' ? 'auto' : 'config-tool',
40 version : _llvm_version,
41 modules : llvm_modules,
42 optional_modules : llvm_optional_modules,
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
new file mode 100644
index 00000000..35bd0ea1
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
@@ -0,0 +1,25 @@
1From 3ef37c63f03ad6f2af407de350486fdd25e9132a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 13 Jan 2020 15:23:47 -0800
4Subject: [PATCH] meson misdetects 64bit atomics on mips/clang
5
6Upstream-Status: Pending
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8
9---
10 src/util/u_atomic.c | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/src/util/u_atomic.c b/src/util/u_atomic.c
14index 5a5eab4..e499516 100644
15--- a/src/util/u_atomic.c
16+++ b/src/util/u_atomic.c
17@@ -21,7 +21,7 @@
18 * IN THE SOFTWARE.
19 */
20
21-#if defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD)
22+#if !defined(__clang__) && defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD)
23
24 #include <stdint.h>
25 #include <pthread.h>
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson.build-check-for-all-linux-host_os-combinations.patch
new file mode 100644
index 00000000..e9a6fd3f
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-meson.build-check-for-all-linux-host_os-combinations.patch
@@ -0,0 +1,43 @@
1From b251af67df5a6840d2e9cc06edae2c387f8778f1 Mon Sep 17 00:00:00 2001
2From: Alistair Francis <alistair@alistair23.me>
3Date: Thu, 14 Nov 2019 13:04:49 -0800
4Subject: [PATCH] meson.build: check for all linux host_os combinations
5
6Make sure that we are also looking for our host_os combinations like
7linux-musl etc. when assuming support for DRM/KMS.
8
9Also delete a duplicate line.
10
11Upstream-Status: Pending
12
13Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
14Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
15Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
16Signed-off-by: Alistair Francis <alistair@alistair23.me>
17
18---
19 meson.build | 4 ++--
20 1 file changed, 2 insertions(+), 2 deletions(-)
21
22diff --git a/meson.build b/meson.build
23index 22385d8..15f48a6 100644
24--- a/meson.build
25+++ b/meson.build
26@@ -121,7 +121,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2
27 # Only build shared_glapi if at least one OpenGL API is enabled
28 with_shared_glapi = with_shared_glapi and with_any_opengl
29
30-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android'].contains(host_machine.system())
31+system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android'].contains(host_machine.system()) or host_machine.system().startswith('linux')
32
33 gallium_drivers = get_option('gallium-drivers')
34 if gallium_drivers.contains('auto')
35@@ -909,7 +909,7 @@ if cc.has_function('fmemopen')
36 endif
37
38 # TODO: this is very incomplete
39-if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku', 'android'].contains(host_machine.system())
40+if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku'].contains(host_machine.system()) or host_machine.system().startswith('linux')
41 pre_args += '-D_GNU_SOURCE'
42 elif host_machine.system() == 'sunos'
43 pre_args += '-D__EXTENSIONS__'