diff options
author | Randolph Sapp <rs@ti.com> | 2024-05-02 14:18:42 -0500 |
---|---|---|
committer | Ryan Eatmon <reatmon@ti.com> | 2024-05-02 15:02:04 -0500 |
commit | dfd32e7e7742cab05dc036f2951876ea1a05169b (patch) | |
tree | 0a353041e6b437d06f22b312fb6bbc4b50fffa86 | |
parent | d89907ec2322f23271917d75f052217dd8a2c27a (diff) | |
download | meta-ti-dfd32e7e7742cab05dc036f2951876ea1a05169b.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>
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 @@ | |||
1 | From 6d07f6aa7f92f40d78a2db645f16f0f3e7d3c2e8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 23 Jun 2023 01:20:38 -0700 | ||
4 | Subject: [PATCH] gallium: Fix build with llvm 17 | ||
5 | |||
6 | These headers are not available for C files in llvm 17+ | ||
7 | and they seem to be not needed to compile after all with llvm 17 | ||
8 | so add conditions to exclude them for llvm >= 17 | ||
9 | |||
10 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827] | ||
11 | Signed-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 | |||
17 | diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c | ||
18 | index 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 @@ | |||
1 | From 00d41cd5aa3f4b494dc276c9b4ccdc096310c91f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 28 Sep 2023 15:34:22 -0700 | ||
4 | Subject: [PATCH] meson: use llvm-config instead of cmake to fix linking errors with meson 1.2.1 | ||
5 | |||
6 | meson dependency auto dependency detection uses cmake and then | ||
7 | config-tool to process dependencies, in mesa the logic to detect llvm is | ||
8 | using auto detection which means if it finds cmake then it will try to | ||
9 | use cmake method. Cmake method works ok except a case when llvm-dev | ||
10 | package is installed on the build host then it generates its own | ||
11 | native.meson file and ignores OE supplied meson.native file which has | ||
12 | correct llvm-config tool specified which is pointing to llvm-config from | ||
13 | native sysroot. The generated meson.native file points to one found in | ||
14 | /usr/bin and there onwards detector finds native install of llvm and | ||
15 | configures that into building native mesa package. | ||
16 | |||
17 | Since cmake detector does not always work, disable it by default and use | ||
18 | config-tool which works in all cases. This is suggested in below issues | ||
19 | too | ||
20 | |||
21 | A 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 | |||
26 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25438] | ||
27 | |||
28 | Signed-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 @@ | |||
1 | From 3ef37c63f03ad6f2af407de350486fdd25e9132a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 13 Jan 2020 15:23:47 -0800 | ||
4 | Subject: [PATCH] meson misdetects 64bit atomics on mips/clang | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-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 | |||
13 | diff --git a/src/util/u_atomic.c b/src/util/u_atomic.c | ||
14 | index 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 @@ | |||
1 | From b251af67df5a6840d2e9cc06edae2c387f8778f1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alistair Francis <alistair@alistair23.me> | ||
3 | Date: Thu, 14 Nov 2019 13:04:49 -0800 | ||
4 | Subject: [PATCH] meson.build: check for all linux host_os combinations | ||
5 | |||
6 | Make sure that we are also looking for our host_os combinations like | ||
7 | linux-musl etc. when assuming support for DRM/KMS. | ||
8 | |||
9 | Also delete a duplicate line. | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | |||
13 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
14 | Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> | ||
15 | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> | ||
16 | Signed-off-by: Alistair Francis <alistair@alistair23.me> | ||
17 | |||
18 | --- | ||
19 | meson.build | 4 ++-- | ||
20 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/meson.build b/meson.build | ||
23 | index 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__' | ||