summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/mesa/files')
-rw-r--r--meta/recipes-graphics/mesa/files/0001-Revert-meson-do-not-pull-in-clc-for-clover.patch53
-rw-r--r--meta/recipes-graphics/mesa/files/0001-anv-fix-a-build-race-between-generating-a-header-and.patch31
-rw-r--r--meta/recipes-graphics/mesa/files/0001-drisw-fix-build-without-dri3.patch58
-rw-r--r--meta/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch31
-rw-r--r--meta/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch7
-rw-r--r--meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch21
-rw-r--r--meta/recipes-graphics/mesa/files/0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch42
-rw-r--r--meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch61
8 files changed, 165 insertions, 139 deletions
diff --git a/meta/recipes-graphics/mesa/files/0001-Revert-meson-do-not-pull-in-clc-for-clover.patch b/meta/recipes-graphics/mesa/files/0001-Revert-meson-do-not-pull-in-clc-for-clover.patch
new file mode 100644
index 0000000000..1711e22585
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-Revert-meson-do-not-pull-in-clc-for-clover.patch
@@ -0,0 +1,53 @@
1From 051f41beda540f0ae77b341db01a6de83c9e938a Mon Sep 17 00:00:00 2001
2From: Markus Volk <f_l_k@t-online.de>
3Date: Fri, 8 Mar 2024 15:53:11 +0100
4Subject: [PATCH] Revert "meson: do not pull in clc for clover"
5
6This reverts commit 815a6647eb1383e9dc704ffcc266d85f3b13338a.
7Upstream-Status: Inappropriate [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27783/diffs?commit_id=a976f2c9f0c07f9e06cc9affd9124b45bc60c2bd]
8
9Once the merge request above was added, it will only be possible to provide opencl spir-v with gallium-rusticl=true. This is not yet supported in the mesa recipe.
10For now reverting this commit allows to still use clover with opencl-spirv, which would otherwise be broken starting from mesa 24.0.2.
11
12After it was merged, this patch needs to be removed and rusticl support will be required
13
14Signed-off-by: Markus Volk <f_l_k@t-online.de>
15---
16 meson.build | 3 ++-
17 src/compiler/meson.build | 2 +-
18 2 files changed, 3 insertions(+), 2 deletions(-)
19
20diff --git a/meson.build b/meson.build
21index 2db6185..741b5d1 100644
22--- a/meson.build
23+++ b/meson.build
24@@ -813,6 +813,7 @@ if _opencl != 'disabled'
25 error('The Clover OpenCL state tracker requires rtti')
26 endif
27
28+ with_clc = true
29 with_gallium_opencl = true
30 with_opencl_icd = _opencl == 'icd'
31 else
32@@ -837,7 +838,7 @@ if with_gallium_rusticl
33 endif
34
35 dep_clc = null_dep
36-if with_gallium_opencl or with_clc
37+if with_clc
38 dep_clc = dependency('libclc')
39 endif
40
41diff --git a/src/compiler/meson.build b/src/compiler/meson.build
42index 8d73544..1dae56d 100644
43--- a/src/compiler/meson.build
44+++ b/src/compiler/meson.build
45@@ -79,7 +79,7 @@ subdir('nir')
46
47 subdir('spirv')
48
49-if with_clc
50+if with_opencl_spirv
51 subdir('clc')
52 endif
53 if with_gallium
diff --git a/meta/recipes-graphics/mesa/files/0001-anv-fix-a-build-race-between-generating-a-header-and.patch b/meta/recipes-graphics/mesa/files/0001-anv-fix-a-build-race-between-generating-a-header-and.patch
deleted file mode 100644
index a61e7b2160..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-anv-fix-a-build-race-between-generating-a-header-and.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From f148d4f1b5b13288b254ead07f1d008d997e2342 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Mon, 2 Nov 2020 23:23:53 +0100
4Subject: [PATCH] anv: fix a build race between generating a header and using
5 it
6
7anv_batch_chain.c includes genX_bits.h but doesn't ensure it gets
8generated first. This causes build failures, as observed here:
9https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/1501/steps/8/logs/step2d
10
11Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7412]
12Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13---
14 src/intel/vulkan/meson.build | 1 +
15 1 file changed, 1 insertion(+)
16
17diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build
18index 36e1689314e..b713d8eade3 100644
19--- a/src/intel/vulkan/meson.build
20+++ b/src/intel/vulkan/meson.build
21@@ -131,6 +131,7 @@ libanv_files = files(
22 anv_deps = [
23 dep_libdrm,
24 dep_valgrind,
25+ idep_genxml,
26 idep_nir_headers,
27 idep_vulkan_util_headers,
28 ]
29--
302.29.0
31
diff --git a/meta/recipes-graphics/mesa/files/0001-drisw-fix-build-without-dri3.patch b/meta/recipes-graphics/mesa/files/0001-drisw-fix-build-without-dri3.patch
new file mode 100644
index 0000000000..ab16152090
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-drisw-fix-build-without-dri3.patch
@@ -0,0 +1,58 @@
1From 4bd15a419e892da843489c374c58c5b29c40b5d6 Mon Sep 17 00:00:00 2001
2From: Romain Naour <romain.naour@smile.fr>
3Date: Tue, 6 Feb 2024 09:47:09 +0100
4Subject: [PATCH 1/2] drisw: fix build without dri3
5
6commit 1887368df41 ("glx/sw: check for modifier support in the kopper path")
7added dri3_priv.h header and dri3_check_multibuffer() function in drisw that
8can be build without dri3.
9
10 i686-buildroot-linux-gnu/bin/ld: src/glx/libglx.a.p/drisw_glx.c.o: in function `driswCreateScreenDriver':
11 drisw_glx.c:(.text.driswCreateScreenDriver+0x3a0): undefined reference to `dri3_check_multibuffer'
12 collect2: error: ld returned 1 exit status
13
14Add HAVE_DRI3 guard around dri3_priv.h header and the zink code using
15dri3_check_multibuffer().
16
17Fixes: 1887368df41 ("glx/sw: check for modifier support in the kopper path")
18
19Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27478]
20Signed-off-by: Romain Naour <romain.naour@smile.fr>
21Signed-off-by: Khem Raj <raj.khem@gmail.com>
22---
23 src/glx/drisw_glx.c | 4 ++++
24 1 file changed, 4 insertions(+)
25
26diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
27index 3d3f752..4b19e2d 100644
28--- a/src/glx/drisw_glx.c
29+++ b/src/glx/drisw_glx.c
30@@ -32,7 +32,9 @@
31 #include <dlfcn.h>
32 #include "dri_common.h"
33 #include "drisw_priv.h"
34+#ifdef HAVE_DRI3
35 #include "dri3_priv.h"
36+#endif
37 #include <X11/extensions/shmproto.h>
38 #include <assert.h>
39 #include <vulkan/vulkan_core.h>
40@@ -995,6 +997,7 @@ driswCreateScreenDriver(int screen, struct glx_display *priv,
41 goto handle_error;
42 }
43
44+#ifdef HAVE_DRI3
45 if (pdpyp->zink) {
46 bool err;
47 psc->has_multibuffer = dri3_check_multibuffer(priv->dpy, &err);
48@@ -1005,6 +1008,7 @@ driswCreateScreenDriver(int screen, struct glx_display *priv,
49 goto handle_error;
50 }
51 }
52+#endif
53
54 glx_config_destroy_list(psc->base.configs);
55 psc->base.configs = configs;
56--
572.44.0
58
diff --git a/meta/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch b/meta/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch
deleted file mode 100644
index 8bedbac669..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 8973e297f2f9b17498b9dc0e37a19481d4bb7df9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 16 Oct 2020 11:03:47 -0700
4Subject: [PATCH] futex.h: Define __NR_futex if it does not exist
5
6__NR_futex is not defines by newer architectures e.g. arc, riscv32 as
7they only have 64bit variant of time_t. Glibc defines SYS_futex interface based on
8__NR_futex, since this is used in applications, such applications start
9to fail to build for these newer architectures. This patch defines a
10fallback to alias __NR_futex to __NR_futex_tim64 so SYS_futex keeps
11working
12
13Upstream-Status: Pending
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 src/util/futex.h | 4 ++++
17 1 file changed, 4 insertions(+)
18
19--- a/src/util/futex.h
20+++ b/src/util/futex.h
21@@ -34,6 +34,10 @@
22 #include <sys/syscall.h>
23 #include <sys/time.h>
24
25+#if !defined(SYS_futex) && defined(SYS_futex_time64)
26+# define SYS_futex SYS_futex_time64
27+#endif
28+
29 static inline long sys_futex(void *addr1, int op, int val1, const struct timespec *timeout, void *addr2, int val3)
30 {
31 return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);
diff --git a/meta/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch b/meta/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
index 15485feb71..baa98a0d46 100644
--- a/meta/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
+++ b/meta/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
@@ -1,4 +1,4 @@
1From bb2f0bea553d51d659a9bc46f7ae186885405151 Mon Sep 17 00:00:00 2001 1From 02cc21800fe29f566add525e63f619c0536d6e7b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 13 Jan 2020 15:23:47 -0800 3Date: Mon, 13 Jan 2020 15:23:47 -0800
4Subject: [PATCH] meson misdetects 64bit atomics on mips/clang 4Subject: [PATCH] meson misdetects 64bit atomics on mips/clang
@@ -10,7 +10,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
10 1 file changed, 1 insertion(+), 1 deletion(-) 10 1 file changed, 1 insertion(+), 1 deletion(-)
11 11
12diff --git a/src/util/u_atomic.c b/src/util/u_atomic.c 12diff --git a/src/util/u_atomic.c b/src/util/u_atomic.c
13index e4bffa8..58e1ddd 100644 13index 5a5eab4..e499516 100644
14--- a/src/util/u_atomic.c 14--- a/src/util/u_atomic.c
15+++ b/src/util/u_atomic.c 15+++ b/src/util/u_atomic.c
16@@ -21,7 +21,7 @@ 16@@ -21,7 +21,7 @@
@@ -22,6 +22,3 @@ index e4bffa8..58e1ddd 100644
22 22
23 #include <stdint.h> 23 #include <stdint.h>
24 #include <pthread.h> 24 #include <pthread.h>
25--
262.24.1
27
diff --git a/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
index 085254323c..7be7d81eeb 100644
--- a/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
+++ b/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
@@ -1,4 +1,4 @@
1From 0d9ed002eff176b902da266d89829a9b0cb10946 Mon Sep 17 00:00:00 2001 1From e8ec6b1cc5e401ba719095722d8b317d755ae613 Mon Sep 17 00:00:00 2001
2From: Alistair Francis <alistair@alistair23.me> 2From: Alistair Francis <alistair@alistair23.me>
3Date: Thu, 14 Nov 2019 13:04:49 -0800 3Date: Thu, 14 Nov 2019 13:04:49 -0800
4Subject: [PATCH] meson.build: check for all linux host_os combinations 4Subject: [PATCH] meson.build: check for all linux host_os combinations
@@ -14,30 +14,29 @@ Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
14Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> 14Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
15Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> 15Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
16Signed-off-by: Alistair Francis <alistair@alistair23.me> 16Signed-off-by: Alistair Francis <alistair@alistair23.me>
17
18--- 17---
19 meson.build | 4 ++-- 18 meson.build | 4 ++--
20 1 file changed, 2 insertions(+), 2 deletions(-) 19 1 file changed, 2 insertions(+), 2 deletions(-)
21 20
22diff --git a/meson.build b/meson.build 21diff --git a/meson.build b/meson.build
23index 898d025..09e3759 100644 22index 133fd9a..817861e 100644
24--- a/meson.build 23--- a/meson.build
25+++ b/meson.build 24+++ b/meson.build
26@@ -124,7 +124,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2 25@@ -128,7 +128,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 26 # Only build shared_glapi if at least one OpenGL API is enabled
28 with_shared_glapi = with_shared_glapi and with_any_opengl 27 with_shared_glapi = with_shared_glapi and with_any_opengl
29 28
30-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos'].contains(host_machine.system()) 29-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android', 'managarm'].contains(host_machine.system())
31+system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux') 30+system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android', 'managarm'].contains(host_machine.system()) or host_machine.system().startswith('linux')
32 31
33 dri_drivers = get_option('dri-drivers') 32 gallium_drivers = get_option('gallium-drivers')
34 if dri_drivers.contains('auto') 33 if gallium_drivers.contains('auto')
35@@ -884,7 +884,7 @@ if cc.compiles('__uint128_t foo(void) { return 0; }', 34@@ -997,7 +997,7 @@ if cc.has_function('fmemopen')
36 endif 35 endif
37 36
38 # TODO: this is very incomplete 37 # TODO: this is very incomplete
39-if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd'].contains(host_machine.system()) 38-if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku', 'android', 'managarm'].contains(host_machine.system())
40+if ['cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system()) or host_machine.system().startswith('linux') 39+if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku', 'android', 'managarm'].contains(host_machine.system()) or host_machine.system().startswith('linux')
41 pre_args += '-D_GNU_SOURCE' 40 pre_args += '-D_GNU_SOURCE'
42 elif host_machine.system() == 'sunos' 41 elif host_machine.system() == 'sunos'
43 pre_args += '-D__EXTENSIONS__' 42 pre_args += '-D__EXTENSIONS__'
diff --git a/meta/recipes-graphics/mesa/files/0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch b/meta/recipes-graphics/mesa/files/0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch
new file mode 100644
index 0000000000..036a0b4945
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch
@@ -0,0 +1,42 @@
1From 62495ebb977866c52d5bed8499a547c49f0d9bc1 Mon Sep 17 00:00:00 2001
2From: Romain Naour <romain.naour@smile.fr>
3Date: Tue, 6 Feb 2024 09:47:10 +0100
4Subject: [PATCH 2/2] glxext: don't try zink if not enabled in mesa
5
6Commit 7d9ea77b459 ("glx: add automatic zink fallback loading between hw and sw drivers")
7added an automatic zink fallback even when the zink gallium is not
8enabled at build time.
9
10It leads to unexpected error log while loading drisw driver and
11zink is not installed on the rootfs:
12
13 MESA-LOADER: failed to open zink: /usr/lib/dri/zink_dri.so
14
15Fixes: 7d9ea77b459 ("glx: add automatic zink fallback loading between hw and sw drivers")
16
17Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27478]
18Signed-off-by: Romain Naour <romain.naour@smile.fr>
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20---
21 src/glx/glxext.c | 2 ++
22 1 file changed, 2 insertions(+)
23
24diff --git a/src/glx/glxext.c b/src/glx/glxext.c
25index 05c825a..7a06aa9 100644
26--- a/src/glx/glxext.c
27+++ b/src/glx/glxext.c
28@@ -908,9 +908,11 @@ __glXInitialize(Display * dpy)
29 #endif /* HAVE_DRI3 */
30 if (!debug_get_bool_option("LIBGL_DRI2_DISABLE", false))
31 dpyPriv->dri2Display = dri2CreateDisplay(dpy);
32+#if defined(HAVE_ZINK)
33 if (!dpyPriv->dri3Display && !dpyPriv->dri2Display)
34 try_zink = !debug_get_bool_option("LIBGL_KOPPER_DISABLE", false) &&
35 !getenv("GALLIUM_DRIVER");
36+#endif /* HAVE_ZINK */
37 }
38 #endif /* GLX_USE_DRM */
39 if (glx_direct)
40--
412.44.0
42
diff --git a/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch b/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
deleted file mode 100644
index 89c0d150fa..0000000000
--- a/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
+++ /dev/null
@@ -1,61 +0,0 @@
1From ce57ce220d9c377beabf4914f33c43118f672ffe Mon Sep 17 00:00:00 2001
2From: Alistair Francis <alistair@alistair23.me>
3Date: Thu, 14 Nov 2019 13:08:31 -0800
4Subject: [PATCH] meson.build: make TLS ELF optional
5
6USE_ELF_TLS has replaced GLX_USE_TLS so this patch is the original "make
7TLS GLX optional again" patch updated to the latest mesa.
8
9For details, see:
10https://gitlab.freedesktop.org/mesa/mesa/-/issues/966
11
12This prevents runtime segfault on musl:
13
14Traceback (most recent call last):
15 File "/home/pokybuild/yocto-worker/musl-qemux86/build/meta/lib/oeqa/core/decorator/__init__.py", line 36, in wrapped_f
16 return func(*args, **kwargs)
17 File "/home/pokybuild/yocto-worker/musl-qemux86/build/meta/lib/oeqa/runtime/cases/parselogs.py", line 378, in test_parselogs
18 self.assertEqual(errcount, 0, msg=self.msg)
19AssertionError: 1 != 0 : Log: /home/pokybuild/yocto-worker/musl-qemux86/build/build/tmp/work/qemux86-poky-linux-musl/core-image-sato-sdk/1.0-r0/target_logs/Xorg.0.log
20-----------------------
21Central error: [ 10.477] (EE) Failed to load /usr/lib/xorg/modules/extensions/libglx.so: Error relocating /usr/lib/libGL.so.1: alphasort: initial-exec TLS resolves to dynamic definition in /usr/lib/libGL.so.1
22***********************
23
24Upstream-Status: Inappropriate [configuration]
25Signed-off-by: Alistair Francis <alistair@alistair23.me>
26
27---
28 meson.build | 2 +-
29 meson_options.txt | 6 ++++++
30 2 files changed, 7 insertions(+), 1 deletion(-)
31
32diff --git a/meson.build b/meson.build
33index c5136ea..185270d 100644
34--- a/meson.build
35+++ b/meson.build
36@@ -424,7 +424,7 @@ endif
37
38 # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
39 use_elf_tls = false
40-if not ['windows', 'freebsd', 'openbsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29)
41+if not ['windows', 'freebsd', 'openbsd'].contains(host_machine.system()) and (not with_platform_android or get_option('platform-sdk-version') >= 29) and get_option('elf-tls')
42 pre_args += '-DUSE_ELF_TLS'
43 use_elf_tls = true
44 endif
45diff --git a/meson_options.txt b/meson_options.txt
46index 2d39d13..72006eb 100644
47--- a/meson_options.txt
48+++ b/meson_options.txt
49@@ -368,6 +368,12 @@ option(
50 value : true,
51 description : 'Enable direct rendering in GLX and EGL for DRI',
52 )
53+option(
54+ 'elf-tls',
55+ type : 'boolean',
56+ value : true,
57+ description : 'Enable TLS support in ELF',
58+)
59 option(
60 'prefer-iris',
61 type : 'boolean',