summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/mesa')
-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
-rw-r--r--meta/recipes-graphics/mesa/libglu_9.0.3.bb (renamed from meta/recipes-graphics/mesa/libglu_9.0.1.bb)13
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch377
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch43
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch99
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch71
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch44
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch62
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb59
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos_8.5.0.bb43
-rw-r--r--meta/recipes-graphics/mesa/mesa-gl_20.3.4.bb15
-rw-r--r--meta/recipes-graphics/mesa/mesa-gl_24.0.3.bb15
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc302
-rw-r--r--meta/recipes-graphics/mesa/mesa_24.0.3.bb (renamed from meta/recipes-graphics/mesa/mesa_20.3.4.bb)0
21 files changed, 411 insertions, 1036 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',
diff --git a/meta/recipes-graphics/mesa/libglu_9.0.1.bb b/meta/recipes-graphics/mesa/libglu_9.0.3.bb
index 703f131f79..8151727c52 100644
--- a/meta/recipes-graphics/mesa/libglu_9.0.1.bb
+++ b/meta/recipes-graphics/mesa/libglu_9.0.3.bb
@@ -10,21 +10,22 @@ LIC_FILES_CHKSUM = "file://include/GL/glu.h;endline=29;md5=6b79c570f644363b35645
10 10
11# Epoch as this used to be part of mesa 11# Epoch as this used to be part of mesa
12PE = "2" 12PE = "2"
13PR = "0"
14 13
15SRC_URI = "https://mesa.freedesktop.org/archive/glu/glu-${PV}.tar.gz" 14SRC_URI = "https://mesa.freedesktop.org/archive/glu/glu-${PV}.tar.xz \
15 "
16 16
17SRC_URI[md5sum] = "5599a0e0a97335e10239d9165aced60d" 17SRC_URI[sha256sum] = "bd43fe12f374b1192eb15fe20e45ff456b9bc26ab57f0eee919f96ca0f8a330f"
18SRC_URI[sha256sum] = "f6f484cfcd51e489afe88031afdea1e173aa652697e4c19ddbcb8260579a10f7"
19 18
20S = "${WORKDIR}/glu-${PV}" 19S = "${WORKDIR}/glu-${PV}"
21 20
22DEPENDS = "virtual/libgl" 21DEPENDS = "virtual/libgl"
23 22
24inherit autotools pkgconfig features_check 23inherit meson pkgconfig features_check
24
25EXTRA_OEMESON = "-Dgl_provider=gl"
25 26
26# Requires libGL.so which is provided by mesa when x11 in DISTRO_FEATURES 27# Requires libGL.so which is provided by mesa when x11 in DISTRO_FEATURES
27REQUIRED_DISTRO_FEATURES = "x11 opengl" 28REQUIRED_DISTRO_FEATURES = "x11 opengl"
28 29
29# Remove the mesa-glu dependency in mesa-glu-dev, as mesa-glu is empty 30# Remove the mesa-glu dependency in mesa-glu-dev, as mesa-glu is empty
30RDEPENDS_${PN}-dev = "" 31DEV_PKG_DEPENDENCY = ""
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch b/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch
deleted file mode 100644
index f6b59a11fe..0000000000
--- a/meta/recipes-graphics/mesa/mesa-demos/0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch
+++ /dev/null
@@ -1,377 +0,0 @@
1From 779438770bedf3d53e6ad8f7cd6889b7f50daf3b Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Wed, 9 Jul 2014 14:23:41 +0200
4Subject: [PATCH] configure: Allow to disable demos which require GLEW or GLU
5
6* in some systems without X11 support we don't have GLEW, but
7 mesa-demos are still useful
8
9Upstream-Status: Pending
10
11Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
12
13Port to 8.3.0
14Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
15---
16 configure.ac | 49 ++++++++++++++++++++---------
17 src/Makefile.am | 18 ++++++++---
18 src/demos/Makefile.am | 73 ++++++++++++++++++++++++-------------------
19 src/egl/Makefile.am | 8 +++--
20 src/egl/opengles1/Makefile.am | 10 ++++--
21 src/egl/opengles2/Makefile.am | 29 ++++++++---------
22 6 files changed, 117 insertions(+), 70 deletions(-)
23
24diff --git a/configure.ac b/configure.ac
25index 0525b09..28834cd 100644
26--- a/configure.ac
27+++ b/configure.ac
28@@ -93,25 +93,44 @@ AC_EGREP_HEADER([glutInitContextProfile],
29 [AC_DEFINE(HAVE_FREEGLUT)],
30 [])
31
32-dnl Check for GLEW
33-PKG_CHECK_MODULES(GLEW, [glew >= 1.5.4])
34-DEMO_CFLAGS="$DEMO_CFLAGS $GLEW_CFLAGS"
35-DEMO_LIBS="$DEMO_LIBS $GLEW_LIBS"
36+AC_ARG_ENABLE([glew],
37+ [AS_HELP_STRING([--enable-glew],
38+ [build demos which require glew @<:@default=yes@:>@])],
39+ [enable_glew="$enableval"],
40+ [enable_glew=yes]
41+)
42+
43+if test "x$enable_glew" = xyes; then
44+ dnl Check for GLEW
45+ PKG_CHECK_MODULES(GLEW, [glew >= 1.5.4], [glew_enabled=yes], [glew_enabled=no])
46+ DEMO_CFLAGS="$DEMO_CFLAGS $GLEW_CFLAGS"
47+ DEMO_LIBS="$DEMO_LIBS $GLEW_LIBS"
48+fi
49
50 # LIBS was set by AC_CHECK_LIB above
51 LIBS=""
52
53-PKG_CHECK_MODULES(GLU, [glu], [],
54- [AC_CHECK_HEADER([GL/glu.h],
55- [],
56- AC_MSG_ERROR([GLU not found]))
57- AC_CHECK_LIB([GLU],
58- [gluBeginCurve],
59- [GLU_LIBS=-lGLU],
60- AC_MSG_ERROR([GLU required])) ])
61+AC_ARG_ENABLE([glu],
62+ [AS_HELP_STRING([--enable-glu],
63+ [build demos which require glu @<:@default=yes@:>@])],
64+ [enable_glu="$enableval"],
65+ [enable_glu=yes]
66+)
67
68-DEMO_CFLAGS="$DEMO_CFLAGS $GLU_CFLAGS"
69-DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
70+if test "x$enable_glu" = xyes; then
71+ PKG_CHECK_MODULES(GLU, [glu], [glu_enabled=yes],
72+ [AC_CHECK_HEADER([GL/glu.h],
73+ [],
74+ AC_MSG_ERROR([GLU not found]))
75+ AC_CHECK_LIB([GLU],
76+ [gluBeginCurve],
77+ [GLU_LIBS=-lGLU
78+ glu_enabled=yes],
79+ AC_MSG_ERROR([GLU required])) ])
80+
81+ DEMO_CFLAGS="$DEMO_CFLAGS $GLU_CFLAGS"
82+ DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
83+fi
84
85 AC_ARG_ENABLE([egl],
86 [AS_HELP_STRING([--enable-egl],
87@@ -304,6 +323,8 @@ AC_SUBST([WAYLAND_CFLAGS])
88 AC_SUBST([WAYLAND_LIBS])
89
90
91+AM_CONDITIONAL(HAVE_GLU, test "x$glu_enabled" = "xyes")
92+AM_CONDITIONAL(HAVE_GLEW, test "x$glew_enabled" = "xyes")
93 AM_CONDITIONAL(HAVE_EGL, test "x$egl_enabled" = "xyes")
94 AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes")
95 AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes")
96diff --git a/src/Makefile.am b/src/Makefile.am
97index 1647d64..8b89dee 100644
98--- a/src/Makefile.am
99+++ b/src/Makefile.am
100@@ -22,15 +22,19 @@
101 # Authors:
102 # Eric Anholt <eric@anholt.net>
103
104+if HAVE_GLEW
105+UTIL = util
106+endif
107+
108 SUBDIRS = \
109- util \
110+ $(UTIL) \
111 data \
112 demos \
113 egl \
114 fp \
115 fpglsl \
116 glsl \
117- gs \
118+ gs \
119 objviewer \
120 osdemos \
121 perf \
122@@ -40,8 +44,12 @@ SUBDIRS = \
123 slang \
124 tests \
125 tools \
126- trivial \
127- vp \
128- vpglsl \
129 wgl \
130 xdemos
131+
132+if HAVE_GLEW
133+SUBDIRS += \
134+ vp \
135+ vpglsl \
136+ trivial
137+endif
138diff --git a/src/demos/Makefile.am b/src/demos/Makefile.am
139index 41603fa..ab1e3ab 100644
140--- a/src/demos/Makefile.am
141+++ b/src/demos/Makefile.am
142@@ -30,91 +30,100 @@ AM_LDFLAGS = \
143 $(DEMO_LIBS) \
144 $(GLUT_LIBS)
145
146+bin_PROGRAMS =
147+
148 if HAVE_GLUT
149-bin_PROGRAMS = \
150+if HAVE_GLEW
151+bin_PROGRAMS += \
152 arbfplight \
153 arbfslight \
154 arbocclude \
155 arbocclude2 \
156- bounce \
157- clearspd \
158 copypix \
159 cubemap \
160 cuberender \
161 dinoshade \
162- dissolve \
163- drawpix \
164 engine \
165 fbo_firecube \
166 fbotexture \
167- fire \
168 fogcoord \
169 fplight \
170 fslight \
171+ gloss \
172+ isosurf \
173+ multiarb \
174+ paltex \
175+ pointblast \
176+ projtex \
177+ shadowtex \
178+ spriteblast \
179+ stex3d \
180+ textures \
181+ vao_demo \
182+ winpos
183+
184+copypix_LDADD = ../util/libutil.la
185+cubemap_LDADD = ../util/libutil.la
186+cuberender_LDADD = ../util/libutil.la
187+engine_LDADD = ../util/libutil.la
188+fbo_firecube_LDADD = ../util/libutil.la
189+gloss_LDADD = ../util/libutil.la
190+isosurf_LDADD = ../util/libutil.la
191+multiarb_LDADD = ../util/libutil.la
192+projtex_LDADD = ../util/libutil.la
193+textures_LDADD = ../util/libutil.la
194+winpos_LDADD = ../util/libutil.la
195+endif
196+
197+if HAVE_GLU
198+bin_PROGRAMS += \
199+ bounce \
200+ clearspd \
201+ dissolve \
202+ drawpix \
203+ fire \
204 gamma \
205 gearbox \
206 gears \
207 geartrain \
208 glinfo \
209- gloss \
210 gltestperf \
211 ipers \
212- isosurf \
213 lodbias \
214 morph3d \
215- multiarb \
216- paltex \
217 pixeltest \
218- pointblast \
219- projtex \
220 ray \
221 readpix \
222 reflect \
223 renormal \
224- shadowtex \
225 singlebuffer \
226 spectex \
227- spriteblast \
228- stex3d \
229 teapot \
230 terrain \
231 tessdemo \
232 texcyl \
233 texenv \
234- textures \
235 trispd \
236 tunnel2 \
237- tunnel \
238- vao_demo \
239- winpos
240-endif
241+ tunnel
242
243 tunnel_SOURCES = \
244 tunnel.c \
245 tunneldat.h
246
247-copypix_LDADD = ../util/libutil.la
248-cubemap_LDADD = ../util/libutil.la
249-cuberender_LDADD = ../util/libutil.la
250-drawpix_LDADD = ../util/libutil.la
251 dissolve_LDADD = ../util/libutil.la
252-engine_LDADD = ../util/libutil.la
253-fbo_firecube_LDADD = ../util/libutil.la
254+drawpix_LDADD = ../util/libutil.la
255 fire_LDADD = ../util/libutil.la
256-gloss_LDADD = ../util/libutil.la
257 ipers_LDADD = ../util/libutil.la
258-isosurf_LDADD = ../util/libutil.la
259 lodbias_LDADD = ../util/libutil.la
260-multiarb_LDADD = ../util/libutil.la
261-projtex_LDADD = ../util/libutil.la
262 readpix_LDADD = ../util/libutil.la
263 reflect_LDADD = ../util/libutil.la
264 teapot_LDADD = ../util/libutil.la
265 texcyl_LDADD = ../util/libutil.la
266-textures_LDADD = ../util/libutil.la
267 tunnel_LDADD = ../util/libutil.la
268 tunnel2_LDADD = ../util/libutil.la
269-winpos_LDADD = ../util/libutil.la
270+endif
271+endif
272
273 EXTRA_DIST = \
274 README
275diff --git a/src/egl/Makefile.am b/src/egl/Makefile.am
276index d64a49e..4fe1ca8 100644
277--- a/src/egl/Makefile.am
278+++ b/src/egl/Makefile.am
279@@ -24,8 +24,12 @@
280
281 SUBDIRS = \
282 eglut \
283- opengl \
284- openvg \
285 opengles1 \
286 opengles2 \
287 oes_vg
288+
289+if HAVE_GLU
290+SUBDIRS += \
291+ opengl \
292+ openvg
293+endif
294diff --git a/src/egl/opengles1/Makefile.am b/src/egl/opengles1/Makefile.am
295index fa397c2..21853e8 100644
296--- a/src/egl/opengles1/Makefile.am
297+++ b/src/egl/opengles1/Makefile.am
298@@ -36,9 +36,12 @@ AM_LDFLAGS = \
299 $(EGL_LIBS) \
300 -lm
301
302+noinst_PROGRAMS =
303+
304 if HAVE_EGL
305 if HAVE_GLESV1
306-noinst_PROGRAMS = \
307+if HAVE_X11
308+bin_PROGRAMS = \
309 bindtex \
310 clear \
311 drawtex_x11 \
312@@ -52,8 +55,6 @@ noinst_PROGRAMS = \
313 torus_x11 \
314 tri_x11 \
315 two_win
316-endif
317-endif
318
319 bindtex_LDADD = $(X11_LIBS)
320 es1_info_LDADD = $(X11_LIBS)
321@@ -76,3 +77,6 @@ drawtex_x11_LDADD = ../eglut/libeglut_x11.la
322 gears_x11_LDADD = ../eglut/libeglut_x11.la
323 torus_x11_LDADD = ../eglut/libeglut_x11.la
324 tri_x11_LDADD = ../eglut/libeglut_x11.la
325+endif
326+endif
327+endif
328diff --git a/src/egl/opengles2/Makefile.am b/src/egl/opengles2/Makefile.am
329index b80ba50..17f8d49 100644
330--- a/src/egl/opengles2/Makefile.am
331+++ b/src/egl/opengles2/Makefile.am
332@@ -33,27 +33,28 @@ AM_LDFLAGS = \
333 $(EGL_LIBS) \
334 -lm
335
336+bin_PROGRAMS =
337+
338 if HAVE_EGL
339 if HAVE_GLESV2
340-bin_PROGRAMS =
341-if HAVE_X11
342-bin_PROGRAMS += \
343- es2_info \
344- es2gears_x11 \
345- es2tri
346-endif
347 if HAVE_WAYLAND
348 bin_PROGRAMS += es2gears_wayland
349-endif
350-endif
351+
352+es2gears_wayland_SOURCES = es2gears.c
353+es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la
354 endif
355
356-es2_info_LDADD = $(X11_LIBS)
357-es2tri_LDADD = $(X11_LIBS)
358+if HAVE_X11
359+bin_PROGRAMS += \
360+ es2tri \
361+ es2_info \
362+ es2gears_x11
363
364+es2_info_LDADD = $(X11_LIBS)
365 es2gears_x11_SOURCES = es2gears.c
366-
367 es2gears_x11_LDADD = ../eglut/libeglut_x11.la
368+es2tri_LDADD = $(X11_LIBS)
369+endif
370+endif
371+endif
372
373-es2gears_wayland_SOURCES = es2gears.c
374-es2gears_wayland_LDADD = ../eglut/libeglut_wayland.la
375--
3762.1.4
377
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch b/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch
deleted file mode 100644
index b27d9eafa5..0000000000
--- a/meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From 2e0367a941445a862ab99c54ec85d1357d0f73c0 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Thu, 10 Jul 2014 14:30:52 +0200
4Subject: [PATCH] Install few more test programs
5
6Upstream-Status: Pending
7
8Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
9
10Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
11
12---
13 src/egl/opengl/Makefile.am | 3 +--
14 src/egl/openvg/Makefile.am | 2 +-
15 2 files changed, 2 insertions(+), 3 deletions(-)
16
17diff --git a/src/egl/opengl/Makefile.am b/src/egl/opengl/Makefile.am
18index 6d184ff6..ab09d028 100644
19--- a/src/egl/opengl/Makefile.am
20+++ b/src/egl/opengl/Makefile.am
21@@ -57,8 +57,7 @@ endif
22
23 if HAVE_EGL
24 bin_PROGRAMS = \
25- eglinfo
26-noinst_PROGRAMS = \
27+ eglinfo \
28 peglgears \
29 $(EGL_DRM_DEMOS) \
30 $(EGL_X11_DEMOS) \
31diff --git a/src/egl/openvg/Makefile.am b/src/egl/openvg/Makefile.am
32index b0f1212f..5fd1cf83 100644
33--- a/src/egl/openvg/Makefile.am
34+++ b/src/egl/openvg/Makefile.am
35@@ -49,7 +49,7 @@ endif
36
37 if HAVE_EGL
38 if HAVE_VG
39-noinst_PROGRAMS = \
40+bin_PROGRAMS = \
41 $(EGL_X11_DEMOS)
42 endif
43 endif
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch b/meta/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch
deleted file mode 100644
index a6d168175f..0000000000
--- a/meta/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch
+++ /dev/null
@@ -1,99 +0,0 @@
1From 894add34c2b5e6b4ccc78996bf681d7ec7bc9e36 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Thu, 10 Jul 2014 14:29:27 +0200
4Subject: [PATCH] glsl, perf: Add few missing .glsl, .vert, .frag files to
5 EXTRA_DATA
6
7Upstream-Status: Pending
8
9Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
10
11---
12 src/fpglsl/Makefile.am | 2 ++
13 src/glsl/Makefile.am | 10 ++++++++--
14 src/perf/Makefile.am | 6 ++++++
15 src/vpglsl/Makefile.am | 1 +
16 4 files changed, 17 insertions(+), 2 deletions(-)
17
18diff --git a/src/fpglsl/Makefile.am b/src/fpglsl/Makefile.am
19index 47c1039f..fd43c919 100644
20--- a/src/fpglsl/Makefile.am
21+++ b/src/fpglsl/Makefile.am
22@@ -39,10 +39,12 @@ noinst_PROGRAMS = \
23 endif
24
25 EXTRA_DIST = \
26+ depth-read.glsl \
27 dowhile2.glsl \
28 dowhile.glsl \
29 forbreak.glsl \
30 for.glsl \
31+ infinite-loop.glsl \
32 mov.glsl \
33 mov-imm.glsl \
34 simpleif.glsl \
35diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
36index 4faa8dbf..079a29d8 100644
37--- a/src/glsl/Makefile.am
38+++ b/src/glsl/Makefile.am
39@@ -37,7 +37,7 @@ AM_LDFLAGS = \
40 if HAVE_GLUT
41 bin_PROGRAMS = \
42 array \
43- bezier \
44+ bezier \
45 bitmap \
46 brick \
47 bump \
48@@ -123,12 +123,16 @@ EXTRA_DIST = \
49 CH06-brick.vert \
50 CH11-bumpmap.frag \
51 CH11-bumpmap.vert \
52+ CH11-bumpmaptex.frag \
53 CH11-toyball.frag \
54 CH11-toyball.vert \
55 CH18-mandel.frag \
56 CH18-mandel.vert \
57- bezier.geom \
58+ bezier.geom \
59 brick.shtest \
60+ blinking-teapot.frag \
61+ blinking-teapot.vert \
62+ convolution.frag \
63 convolution.vert \
64 cubemap.frag \
65 mandelbrot.shtest \
66@@ -138,5 +142,7 @@ EXTRA_DIST = \
67 reflect.vert \
68 shadowtex.frag \
69 simple.vert \
70+ simplex-noise.glsl \
71 skinning.frag \
72+ skinning.vert \
73 toyball.shtest
74diff --git a/src/perf/Makefile.am b/src/perf/Makefile.am
75index f0031fea..60069396 100644
76--- a/src/perf/Makefile.am
77+++ b/src/perf/Makefile.am
78@@ -59,3 +59,9 @@ endif
79
80 glslstateschange_LDADD = libperf.la ../util/libutil.la
81 glsl_compile_time_LDADD = ../util/libutil.la
82+
83+EXTRA_DIST = \
84+ glslstateschange1.frag \
85+ glslstateschange1.vert \
86+ glslstateschange2.frag \
87+ glslstateschange2.vert
88diff --git a/src/vpglsl/Makefile.am b/src/vpglsl/Makefile.am
89index 4a85ed40..48b08f48 100644
90--- a/src/vpglsl/Makefile.am
91+++ b/src/vpglsl/Makefile.am
92@@ -44,6 +44,7 @@ EXTRA_DIST = \
93 func2.glsl \
94 ifelse.glsl \
95 if.glsl \
96+ infinite-loop.glsl \
97 mov.glsl \
98 nestedifs.glsl \
99 nestedswizzle.glsl \
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch b/meta/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch
deleted file mode 100644
index 8a98ba60d1..0000000000
--- a/meta/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch
+++ /dev/null
@@ -1,71 +0,0 @@
1From 477ab6d90a17d8e4d3935be6ce8b8e154db0e3e5 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Thu, 10 Jul 2014 14:48:12 +0200
4Subject: [PATCH] glsl, perf: Install .glsl, .vert, .frag files
5
6Upstream-Status: Pending
7Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
8
9---
10 src/fpglsl/Makefile.am | 3 ++-
11 src/glsl/Makefile.am | 3 ++-
12 src/perf/Makefile.am | 3 ++-
13 src/vpglsl/Makefile.am | 3 ++-
14 4 files changed, 8 insertions(+), 4 deletions(-)
15
16diff --git a/src/fpglsl/Makefile.am b/src/fpglsl/Makefile.am
17index fd43c919..2bf51de4 100644
18--- a/src/fpglsl/Makefile.am
19+++ b/src/fpglsl/Makefile.am
20@@ -38,7 +38,8 @@ noinst_PROGRAMS = \
21 fp-tri
22 endif
23
24-EXTRA_DIST = \
25+demosdatadir=$(datadir)/$(PACKAGE)/
26+dist_demosdata_DATA= \
27 depth-read.glsl \
28 dowhile2.glsl \
29 dowhile.glsl \
30diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
31index 079a29d8..f66ec299 100644
32--- a/src/glsl/Makefile.am
33+++ b/src/glsl/Makefile.am
34@@ -118,7 +118,8 @@ vert_or_frag_only_LDADD = ../util/libutil.la
35 vert_tex_LDADD = ../util/libutil.la
36 vsraytrace_LDADD = ../util/libutil.la
37
38-EXTRA_DIST = \
39+demosdatadir=$(datadir)/$(PACKAGE)/
40+dist_demosdata_DATA= \
41 CH06-brick.frag \
42 CH06-brick.vert \
43 CH11-bumpmap.frag \
44diff --git a/src/perf/Makefile.am b/src/perf/Makefile.am
45index 60069396..469bdf45 100644
46--- a/src/perf/Makefile.am
47+++ b/src/perf/Makefile.am
48@@ -60,7 +60,8 @@ endif
49 glslstateschange_LDADD = libperf.la ../util/libutil.la
50 glsl_compile_time_LDADD = ../util/libutil.la
51
52-EXTRA_DIST = \
53+demosdatadir=$(datadir)/$(PACKAGE)/
54+dist_demosdata_DATA= \
55 glslstateschange1.frag \
56 glslstateschange1.vert \
57 glslstateschange2.frag \
58diff --git a/src/vpglsl/Makefile.am b/src/vpglsl/Makefile.am
59index 48b08f48..55268675 100644
60--- a/src/vpglsl/Makefile.am
61+++ b/src/vpglsl/Makefile.am
62@@ -38,7 +38,8 @@ noinst_PROGRAMS = \
63 vp-tris
64 endif
65
66-EXTRA_DIST = \
67+demosdatadir=$(datadir)/$(PACKAGE)/
68+dist_demosdata_DATA= \
69 for.glsl \
70 func.glsl \
71 func2.glsl \
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch b/meta/recipes-graphics/mesa/mesa-demos/0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch
deleted file mode 100644
index c687647407..0000000000
--- a/meta/recipes-graphics/mesa/mesa-demos/0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From 3aa84c47e88a4c38446ce1323abf6f2c77389104 Mon Sep 17 00:00:00 2001
2From: Prabhu <prabhu.sundararaj@freescale.com>
3Date: Mon, 16 Nov 2015 17:09:32 -0600
4Subject: [PATCH] mesa-demos: OpenVG demos with single frame need eglSwapBuffer
5
6sp and text demos rendering single frame. to display the
7single frame rendered needed a eglSwapBuffer to diplay to window.
8Hence added eglutPostRedisplay to display the frame
9
10Upstream-Status: Pending
11
12Signed-off-by: Prabhu <prabhu.sundararaj@freescale.com>
13---
14 src/egl/openvg/sp.c | 1 +
15 src/egl/openvg/text.c | 1 +
16 2 files changed, 2 insertions(+)
17
18diff --git a/src/egl/openvg/sp.c b/src/egl/openvg/sp.c
19index a20c0a3..468e91e 100644
20--- a/src/egl/openvg/sp.c
21+++ b/src/egl/openvg/sp.c
22@@ -500,6 +500,7 @@ draw(void)
23 }
24
25 vgFlush();
26+ eglutPostRedisplay();
27 }
28
29
30diff --git a/src/egl/openvg/text.c b/src/egl/openvg/text.c
31index f5c6de8..492581c 100644
32--- a/src/egl/openvg/text.c
33+++ b/src/egl/openvg/text.c
34@@ -360,6 +360,7 @@ display(void)
35 {
36 vgClear(0, 0, width, height);
37 glyph_string_draw(10.0, 10.0);
38+ eglutPostRedisplay();
39 }
40
41
42--
432.5.1
44
diff --git a/meta/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch b/meta/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch
deleted file mode 100644
index e7be4dfbe1..0000000000
--- a/meta/recipes-graphics/mesa/mesa-demos/0013-only-build-GLX-demos-if-needed.patch
+++ /dev/null
@@ -1,62 +0,0 @@
1From 322af294390a7f4e1524c5a79312be6cbebce988 Mon Sep 17 00:00:00 2001
2From: Awais Belal <awais_belal@mentor.com>
3Date: Wed, 11 Nov 2015 17:22:12 +0500
4Subject: [PATCH] only build GLX demos if needed
5
6There are platforms that default to EGL only configurations
7in which case the GLX applications are not required
8at all. Allow the user to control generation of these
9demos as needed through a configure switch.
10
11Signed-off-by: Awais Belal <awais_belal@mentor.com>
12Upstream-Status: Pending
13---
14 configure.ac | 9 +++++++++
15 src/Makefile.am | 6 +++++-
16 2 files changed, 14 insertions(+), 1 deletion(-)
17
18diff --git a/configure.ac b/configure.ac
19index f8ec7e3..1a4d96d 100644
20--- a/configure.ac
21+++ b/configure.ac
22@@ -132,6 +132,11 @@ if test "x$enable_glu" = xyes; then
23 DEMO_LIBS="$DEMO_LIBS $GLU_LIBS"
24 fi
25
26+AC_ARG_ENABLE([glx-demos],
27+ [AS_HELP_STRING([--enable-glx-demos],
28+ [enable GLX demos @<:@default=auto@:>@])],
29+ [glx_demos_enabled="$enableval"],
30+ [glx_demos_enabled=yes])
31 AC_ARG_ENABLE([egl],
32 [AS_HELP_STRING([--enable-egl],
33 [enable EGL library @<:@default=auto@:>@])],
34@@ -325,6 +333,7 @@ AC_SUBST([WAYLAND_LIBS])
35
36 AM_CONDITIONAL(HAVE_GLU, test "x$glu_enabled" = "xyes")
37 AM_CONDITIONAL(HAVE_GLEW, test "x$glew_enabled" = "xyes")
38+AM_CONDITIONAL(HAVE_GLX, test "x$glx_demos_enabled" = "xyes")
39 AM_CONDITIONAL(HAVE_EGL, test "x$egl_enabled" = "xyes")
40 AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes")
41 AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes")
42diff --git a/src/Makefile.am b/src/Makefile.am
43index 8b89dee..a4d7e8f 100644
44--- a/src/Makefile.am
45+++ b/src/Makefile.am
46@@ -44,8 +44,12 @@ SUBDIRS = \
47 slang \
48 tests \
49 tools \
50- wgl \
51+ wgl
52+
53+if HAVE_GLX
54+SUBDIRS += \
55 xdemos
56+endif
57
58 if HAVE_GLEW
59 SUBDIRS += \
60--
611.9.1
62
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb b/meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb
deleted file mode 100644
index 38bdbded29..0000000000
--- a/meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb
+++ /dev/null
@@ -1,59 +0,0 @@
1SUMMARY = "Mesa demo applications"
2DESCRIPTION = "This package includes the demonstration application, such as glxgears. \
3These applications can be used for Mesa validation and benchmarking."
4HOMEPAGE = "http://mesa3d.org"
5BUGTRACKER = "https://bugs.freedesktop.org"
6SECTION = "x11"
7
8LICENSE = "MIT & PD"
9LIC_FILES_CHKSUM = "file://src/xdemos/glxgears.c;beginline=1;endline=20;md5=914225785450eff644a86c871d3ae00e \
10 file://src/xdemos/glxdemo.c;beginline=1;endline=8;md5=b01d5ab1aee94d35b7efaa2ef48e1a06"
11
12SRC_URI = "https://mesa.freedesktop.org/archive/demos/${BPN}-${PV}.tar.bz2 \
13 file://0001-mesa-demos-Add-missing-data-files.patch \
14 file://0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch \
15 file://0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch \
16 file://0007-Install-few-more-test-programs.patch \
17 file://0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch \
18 file://0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch \
19 file://0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch \
20 file://0013-only-build-GLX-demos-if-needed.patch \
21 "
22SRC_URI[md5sum] = "6b65a02622765522176d00f553086fa3"
23SRC_URI[sha256sum] = "01e99c94a0184e63e796728af89bfac559795fb2a0d6f506fa900455ca5fff7d"
24
25inherit autotools pkgconfig features_check
26# depends on virtual/egl, virtual/libgl ...
27REQUIRED_DISTRO_FEATURES = "opengl x11"
28
29PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \
30 x11 glew glu glx"
31
32# The Wayland code doesn't work with Wayland 1.0, so disable it for now
33#${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)}"
34
35EXTRA_OECONF = "--with-system-data-files"
36
37PACKAGECONFIG[drm] = "--enable-libdrm,--disable-libdrm,libdrm"
38PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl"
39PACKAGECONFIG[freetype2] = "--enable-freetype2,--disable-freetype2,freetype"
40PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgl"
41PACKAGECONFIG[gles1] = "--enable-gles1,--disable-gles1,virtual/libgles1"
42PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2"
43PACKAGECONFIG[glut] = "--with-glut=${STAGING_EXECPREFIXDIR},--without-glut,freeglut"
44PACKAGECONFIG[osmesa] = "--enable-osmesa,--disable-osmesa,"
45PACKAGECONFIG[vg] = "--enable-vg,--disable-vg,virtual/libopenvg"
46PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,virtual/libgl wayland"
47PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11"
48PACKAGECONFIG[glew] = "--enable-glew,--disable-glew,glew"
49PACKAGECONFIG[glu] = "--enable-glu,--disable-glu,virtual/libgl"
50PACKAGECONFIG[glx] = "--enable-glx-demos,--disable-glx-demos"
51
52do_install_append() {
53 # it can be completely empty when all PACKAGECONFIG options are disabled
54 rmdir --ignore-fail-on-non-empty ${D}${bindir}
55
56 if [ -f ${D}${bindir}/clear ]; then
57 mv ${D}${bindir}/clear ${D}${bindir}/clear.mesa-demos
58 fi
59}
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.5.0.bb b/meta/recipes-graphics/mesa/mesa-demos_8.5.0.bb
new file mode 100644
index 0000000000..12f41d75a5
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.5.0.bb
@@ -0,0 +1,43 @@
1SUMMARY = "Mesa demo applications"
2DESCRIPTION = "This package includes the demonstration application, such as glxgears. \
3These applications can be used for Mesa validation and benchmarking."
4HOMEPAGE = "http://mesa3d.org"
5BUGTRACKER = "https://bugs.freedesktop.org"
6SECTION = "x11"
7
8LICENSE = "MIT & PD"
9LIC_FILES_CHKSUM = "file://src/xdemos/glxgears.c;beginline=1;endline=20;md5=914225785450eff644a86c871d3ae00e \
10 file://src/xdemos/glxdemo.c;beginline=1;endline=8;md5=b01d5ab1aee94d35b7efaa2ef48e1a06"
11
12SRC_URI = "https://mesa.freedesktop.org/archive/demos/${PV}/${BPN}-${PV}.tar.bz2 \
13 file://0001-mesa-demos-Add-missing-data-files.patch \
14 file://0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch \
15 "
16SRC_URI[sha256sum] = "cea2df0a80f09a30f635c4eb1a672bf90c5ddee0b8e77f4d70041668ef71aac1"
17
18inherit meson pkgconfig features_check
19# depends on virtual/egl, virtual/libgl ...
20REQUIRED_DISTRO_FEATURES = "opengl x11"
21
22EXTRA_OEMESON = "-Dwith-system-data-files=true"
23
24PACKAGECONFIG ?= "drm egl gles1 gles2 \
25 ${@bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d)}"
26
27PACKAGECONFIG[drm] = "-Dlibdrm=enabled,-Dlibdrm=disabled,libdrm"
28PACKAGECONFIG[egl] = "-Degl=enabled,-Degl=disabled,virtual/egl"
29PACKAGECONFIG[gles1] = "-Dgles1=enabled,-Dgles1=disabled,virtual/libgles1"
30PACKAGECONFIG[gles2] = "-Dgles2=enabled,-Dgles2=disabled,virtual/libgles2"
31PACKAGECONFIG[glut] = "-Dwith-glut=${STAGING_EXECPREFIXDIR},,freeglut"
32PACKAGECONFIG[osmesa] = "-Dosmesa=enabled,-Dosmesa=disabled,"
33PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,virtual/libgl wayland wayland-native wayland-protocols"
34PACKAGECONFIG[x11] = "-Dx11=enabled,-Dx11=disabled,virtual/libx11 libglu"
35
36do_install:append() {
37 # it can be completely empty when all PACKAGECONFIG options are disabled
38 rmdir --ignore-fail-on-non-empty ${D}${bindir}
39
40 if [ -f ${D}${bindir}/clear ]; then
41 mv ${D}${bindir}/clear ${D}${bindir}/clear.mesa-demos
42 fi
43}
diff --git a/meta/recipes-graphics/mesa/mesa-gl_20.3.4.bb b/meta/recipes-graphics/mesa/mesa-gl_20.3.4.bb
deleted file mode 100644
index e50782be1c..0000000000
--- a/meta/recipes-graphics/mesa/mesa-gl_20.3.4.bb
+++ /dev/null
@@ -1,15 +0,0 @@
1require mesa.inc
2
3SUMMARY += " (OpenGL only, no EGL/GLES)"
4
5PROVIDES = "virtual/libgl virtual/mesa"
6
7S = "${WORKDIR}/mesa-${PV}"
8
9# At least one DRI rendering engine is required to build mesa.
10# When no X11 is available, use osmesa for the rendering engine.
11PACKAGECONFIG ??= "opengl dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa', d)}"
12PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa', d)}"
13
14# When NOT using X11, we need to make sure we have swrast available.
15DRIDRIVERS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', ',swrast', d)}"
diff --git a/meta/recipes-graphics/mesa/mesa-gl_24.0.3.bb b/meta/recipes-graphics/mesa/mesa-gl_24.0.3.bb
new file mode 100644
index 0000000000..ca160f1bfc
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-gl_24.0.3.bb
@@ -0,0 +1,15 @@
1require mesa.inc
2
3SUMMARY += " (OpenGL only, no EGL/GLES)"
4
5PROVIDES = "virtual/libgl virtual/mesa"
6
7S = "${WORKDIR}/mesa-${PV}"
8
9TARGET_CFLAGS = "-I${STAGING_INCDIR}/drm"
10
11# At least one DRI rendering engine is required to build mesa.
12# When no X11 is available, use osmesa for the rendering engine.
13PACKAGECONFIG ??= "opengl gallium ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa', d)}"
14PACKAGECONFIG:class-target = "opengl gallium ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa', d)}"
15
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 9f8ec112cf..1c9fa66c72 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -10,35 +10,39 @@ HOMEPAGE = "http://mesa3d.org"
10BUGTRACKER = "https://bugs.freedesktop.org" 10BUGTRACKER = "https://bugs.freedesktop.org"
11SECTION = "x11" 11SECTION = "x11"
12LICENSE = "MIT" 12LICENSE = "MIT"
13LIC_FILES_CHKSUM = "file://docs/license.rst;md5=9aa1bc48c9826ad9fdb16661f6930496" 13LIC_FILES_CHKSUM = "file://docs/license.rst;md5=63779ec98d78d823a9dc533a0735ef10"
14 14
15PE = "2" 15PE = "2"
16 16
17SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ 17SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
18 file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ 18 file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
19 file://0002-meson.build-make-TLS-ELF-optional.patch \
20 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ 19 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
21 file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \ 20 file://0001-drisw-fix-build-without-dri3.patch \
22 file://0001-anv-fix-a-build-race-between-generating-a-header-and.patch \ 21 file://0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch \
23 " 22 file://0001-Revert-meson-do-not-pull-in-clc-for-clover.patch \
23"
24 24
25SRC_URI[sha256sum] = "dc21a987ec1ff45b278fe4b1419b1719f1968debbb80221480e44180849b4084" 25SRC_URI[sha256sum] = "77aec9a2a37b7d3596ea1640b3cc53d0b5d9b3b52abed89de07e3717e91bfdbe"
26 26
27UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)" 27UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
28 28
29#because we cannot rely on the fact that all apps will use pkgconfig, 29#because we cannot rely on the fact that all apps will use pkgconfig,
30#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER 30#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
31do_install_append() { 31do_install:append() {
32 if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then 32 # sed can't find EGL/eglplatform.h as it doesn't get installed when glvnd enabled.
33 sed -i -e 's/^#elif defined(__unix__) && defined(EGL_NO_X11)$/#elif defined(__unix__) \&\& defined(EGL_NO_X11) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h 33 # So, check if EGL/eglplatform.h exists before running sed.
34 fi 34 if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)} && [ -f ${D}${includedir}/EGL/eglplatform.h ]; then
35 sed -i -e 's/^#elif defined(__unix__) && defined(EGL_NO_X11)$/#elif defined(__unix__) \&\& defined(EGL_NO_X11) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
36 fi
35} 37}
36 38
37DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native" 39DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native"
40DEPENDS:append:class-target = " ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'mesa-native', '', d)}"
38EXTRANATIVEPATH += "chrpath-native" 41EXTRANATIVEPATH += "chrpath-native"
39PROVIDES = " \ 42PROVIDES = " \
40 ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \ 43 ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \
41 ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2', '', d)} \ 44 ${@bb.utils.contains('PACKAGECONFIG', 'glvnd', 'virtual/libglx', '', d)} \
45 ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2 virtual/libgles3', '', d)} \
42 ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \ 46 ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \
43 ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \ 47 ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \
44 virtual/mesa \ 48 virtual/mesa \
@@ -48,17 +52,10 @@ inherit meson pkgconfig python3native gettext features_check
48 52
49BBCLASSEXTEND = "native nativesdk" 53BBCLASSEXTEND = "native nativesdk"
50 54
51ANY_OF_DISTRO_FEATURES_class-target = "opengl vulkan" 55ANY_OF_DISTRO_FEATURES = "opengl vulkan"
52 56
53PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)}" 57PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)}"
54 58
55export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config"
56export YOCTO_ALTERNATE_MULTILIB_NAME = "${base_libdir}"
57export LLVM_CONFIG = "${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE}"
58export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}"
59
60MESA_LLVM_RELEASE ?= "${LLVMVERSION}"
61
62# set the MESA_BUILD_TYPE to either 'release' (default) or 'debug' 59# set the MESA_BUILD_TYPE to either 'release' (default) or 'debug'
63# by default the upstream mesa sources build a debug release 60# by default the upstream mesa sources build a debug release
64# here we assume the user will want a release build by default 61# here we assume the user will want a release build by default
@@ -74,145 +71,199 @@ MESON_BUILDTYPE = "${@check_buildtype(d)}"
74 71
75EXTRA_OEMESON = " \ 72EXTRA_OEMESON = " \
76 -Dshared-glapi=enabled \ 73 -Dshared-glapi=enabled \
77 -Dgallium-opencl=disabled \
78 -Dglx-read-only-text=true \ 74 -Dglx-read-only-text=true \
79 -Dplatforms='${@",".join("${PLATFORMS}".split())}' \ 75 -Dplatforms='${@",".join("${PLATFORMS}".split())}' \
80" 76"
81 77
78EXTRA_OEMESON:append:class-target = " ${@bb.utils.contains('PACKAGECONFIG', 'opencl', '-Dintel-clc=system', '', d)}"
79EXTRA_OEMESON:append:class-native = " ${@bb.utils.contains('PACKAGECONFIG', 'opencl', '-Dintel-clc=enabled', '', d)}"
80
82def strip_comma(s): 81def strip_comma(s):
83 return s.strip(',') 82 return s.strip(',')
84 83
85PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \ 84PACKAGECONFIG = " \
86 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri gallium virgl', '', d)} \ 85 gallium \
87 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \ 86 video-codecs \
88 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \ 87 ${@bb.utils.filter('DISTRO_FEATURES', 'x11 vulkan wayland', d)} \
89 elf-tls \ 88 ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm virgl', '', d)} \
90 " 89 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'dri3', '', d)} \
91PACKAGECONFIG_class-native ?= "gbm dri egl opengl elf-tls x11" 90 ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
92PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl elf-tls x11" 91 ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', 'zink', '', d)} \
92"
93 93
94PACKAGECONFIG_remove_libc-musl = "elf-tls" 94PACKAGECONFIG:append:class-native = "gallium-llvm r600"
95 95
96# "gbm" requires "dri", "opengl" 96# "gbm" requires "opengl"
97PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled" 97PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled"
98 98
99X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr" 99X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr"
100# "x11" requires "opengl" 100# "x11" requires "opengl"
101PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}" 101PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}"
102PACKAGECONFIG[elf-tls] = "-Delf-tls=true, -Delf-tls=false"
103PACKAGECONFIG[xvmc] = "-Dgallium-xvmc=enabled,-Dgallium-xvmc=disabled,libxvmc"
104PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" 102PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
105 103
106DRIDRIVERS_class-native = "swrast"
107DRIDRIVERS_class-nativesdk = "swrast"
108DRIDRIVERS_append_x86_class-target = ",r100,r200,nouveau,i965,i915"
109DRIDRIVERS_append_x86-64_class-target = ",r100,r200,nouveau,i965,i915"
110# "dri" requires "opengl"
111PACKAGECONFIG[dri] = "-Ddri-drivers=${@strip_comma('${DRIDRIVERS}')}, -Ddri-drivers='', xorgproto libdrm"
112PACKAGECONFIG[dri3] = "-Ddri3=enabled, -Ddri3=disabled, xorgproto libxshmfence" 104PACKAGECONFIG[dri3] = "-Ddri3=enabled, -Ddri3=disabled, xorgproto libxshmfence"
113 105
114# Vulkan drivers need dri3 enabled 106# Vulkan drivers need dri3 enabled
115# amd could be enabled as well but requires gallium-llvm with llvm >= 3.9 107# amd could be enabled as well but requires gallium-llvm with llvm >= 3.9
116VULKAN_DRIVERS = "" 108VULKAN_DRIVERS = ""
117VULKAN_DRIVERS_append_x86_class-target = ",intel" 109VULKAN_DRIVERS:append:x86 = ",intel,amd"
118VULKAN_DRIVERS_append_x86-64_class-target = ",intel" 110VULKAN_DRIVERS:append:x86-64 = ",intel,amd"
119VULKAN_DRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" 111# i686 is a 32 bit override for mesa-native
120PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers=''," 112VULKAN_DRIVERS:append:i686 = ",intel,amd"
113VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
114VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}"
115VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',swrast', '', d)}"
116VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'imagination', ',imagination-experimental', '', d)}"
117PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers"
118
119# mesa development and testing tools support, per driver
120TOOLS = ""
121TOOLS_DEPS = ""
122TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
123TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
124TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
125TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
126TOOLS:append = "${@bb.utils.contains('PACKAGECONFIG', 'imagination', ',imagination', '', d)}"
127
128# dependencies for tools.
129TOOLS_DEPS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ' ncurses libxml2 ', '', d)}"
130
131# the fdperf tool requires libconfig (a part of meta-oe) so it needs special
132# treatment in addition to the usual 'freedreno tools'.
133PACKAGECONFIG[freedreno-fdperf] = ",,libconfig"
134
135PACKAGECONFIG[tools] = "-Dtools=${@strip_comma('${TOOLS}')}, -Dtools='', ${TOOLS_DEPS}"
121 136
122PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false" 137PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
138PACKAGECONFIG[glvnd] = "-Dglvnd=true, -Dglvnd=false, libglvnd"
123 139
124# "gles" requires "opengl" 140# "gles" requires "opengl"
125PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2=disabled" 141PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2=disabled"
126 142
127# "egl" requires "dri", "opengl" 143# "egl" requires "opengl"
128PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled" 144PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
129 145
146# "opencl" requires libclc from meta-clang and spirv-tools from OE-Core
147OPENCL_NATIVE = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', '-Dopencl-native=true', '', d)}"
148PACKAGECONFIG[opencl] = "-Dgallium-opencl=icd -Dopencl-spirv=true ${OPENCL_NATIVE},-Dgallium-opencl=disabled -Dopencl-spirv=false,libclc spirv-tools python3-ply-native"
149
150PACKAGECONFIG[broadcom] = ""
130PACKAGECONFIG[etnaviv] = "" 151PACKAGECONFIG[etnaviv] = ""
131PACKAGECONFIG[freedreno] = "" 152PACKAGECONFIG[freedreno] = ""
132PACKAGECONFIG[kmsro] = "" 153PACKAGECONFIG[kmsro] = ""
133PACKAGECONFIG[vc4] = "" 154PACKAGECONFIG[vc4] = ""
134PACKAGECONFIG[v3d] = "" 155PACKAGECONFIG[v3d] = ""
156PACKAGECONFIG[zink] = ""
135 157
136GALLIUMDRIVERS = "swrast" 158GALLIUMDRIVERS = "swrast"
137# gallium swrast was found to crash Xorg on startup in x32 qemu 159# gallium swrast was found to crash Xorg on startup in x32 qemu
138GALLIUMDRIVERS_x86-x32 = "" 160GALLIUMDRIVERS:x86-x32 = ""
139 161GALLIUMDRIVERS:append:x86 = ",i915,iris,crocus"
140GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}" 162GALLIUMDRIVERS:append:x86-64 = ",i915,iris,crocus"
141GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" 163# i686 is a 32 bit override for mesa-native
142GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'kmsro', ',kmsro', '', d)}" 164GALLIUMDRIVERS:append:i686 = ",i915,iris,crocus"
143GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'vc4', ',vc4', '', d)}" 165
144GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}" 166GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
167GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
168GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'kmsro', ',kmsro', '', d)}"
169GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'vc4', ',vc4', '', d)}"
170GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}"
171GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '', d)}"
145 172
146# radeonsi requires LLVM 173# radeonsi requires LLVM
147GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}" 174GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}"
148GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${GALLIUMDRIVERS_RADEONSI}" 175GALLIUMDRIVERS_LLVM = ",r300,nouveau${GALLIUMDRIVERS_RADEONSI}"
176GALLIUMDRIVERS_LLVM:append:x86 = ",svga"
177GALLIUMDRIVERS_LLVM:append:x86-64 = ",svga"
178# i686 is a 32 bit override for mesa-native
179GALLIUMDRIVERS_LLVM:append:i686 = ",svga"
149 180
150PACKAGECONFIG[r600] = "" 181PACKAGECONFIG[r600] = ""
151PACKAGECONFIG[virgl] = "" 182PACKAGECONFIG[virgl] = ""
152 183
153GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}" 184GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${GALLIUMDRIVERS_LLVM}', '', d)}"
154GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}" 185GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}"
155GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', ',virgl', '', d)}" 186GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', ',virgl', '', d)}"
156 187
157PACKAGECONFIG[gallium] = "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, -Dgallium-drivers=''" 188PACKAGECONFIG[gallium] = "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, -Dgallium-drivers='', libdrm"
158PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, -Dllvm=disabled, llvm${MESA_LLVM_RELEASE} llvm-native \ 189PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, -Dllvm=disabled, llvm llvm-native elfutils"
159 elfutils"
160PACKAGECONFIG[xa] = "-Dgallium-xa=enabled, -Dgallium-xa=disabled" 190PACKAGECONFIG[xa] = "-Dgallium-xa=enabled, -Dgallium-xa=disabled"
161PACKAGECONFIG[va] = "-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial" 191PACKAGECONFIG[va] = "-Dgallium-va=enabled,-Dgallium-va=disabled,libva-initial"
162
163PACKAGECONFIG[vdpau] = "-Dgallium-vdpau=enabled,-Dgallium-vdpau=disabled,libvdpau" 192PACKAGECONFIG[vdpau] = "-Dgallium-vdpau=enabled,-Dgallium-vdpau=disabled,libvdpau"
164 193
194PACKAGECONFIG[imagination] = "-Dimagination-srv=true,-Dimagination-srv=false"
195
165PACKAGECONFIG[lima] = "" 196PACKAGECONFIG[lima] = ""
166GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}" 197GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
167 198
168PACKAGECONFIG[panfrost] = "" 199PACKAGECONFIG[panfrost] = ""
169GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}" 200GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
170 201
171OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium', 'classic', d)}" 202PACKAGECONFIG[vulkan-beta] = "-Dvulkan-beta=true,-Dvulkan-beta=false"
172PACKAGECONFIG[osmesa] = "-Dosmesa=${OSMESA},-Dosmesa=none" 203
204PACKAGECONFIG[osmesa] = "-Dosmesa=true,-Dosmesa=false"
205
206PACKAGECONFIG[perfetto] = "-Dperfetto=true,-Dperfetto=false,libperfetto"
173 207
174PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" 208PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
175 209
210PACKAGECONFIG[lmsensors] = "-Dlmsensors=enabled,-Dlmsensors=disabled,lmsensors"
211
212VIDEO_CODECS ?= "${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'all', 'all_free', d)}"
213PACKAGECONFIG[video-codecs] = "-Dvideo-codecs=${VIDEO_CODECS}, -Dvideo-codecs=''"
214
176# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2) 215# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
177FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer" 216FULL_OPTIMIZATION:append = " -fno-omit-frame-pointer"
178 217
179CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS" 218CFLAGS:append:armv5 = " -DMISSING_64BIT_ATOMICS"
180CFLAGS_append_armv6 = " -DMISSING_64BIT_ATOMICS" 219CFLAGS:append:armv6 = " -DMISSING_64BIT_ATOMICS"
181 220
182# Remove the mesa dependency on mesa-dev, as mesa is empty 221# Remove the mesa dependency on mesa-dev, as mesa is empty
183RDEPENDS_${PN}-dev = "" 222DEV_PKG_DEPENDENCY = ""
223
224# Khronos documentation says that include/GLES2/gl2ext.h can be used for
225# OpenGL ES 3 specification as well as for OpenGL ES 2.
226# There can be applications including GLES2/gl2ext.h instead of GLES3/gl3ext.h
227# meaning we should probably bring in GLES2/gl2ext.h if someone asks for
228# development package of libgles3.
229RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev"
184 230
185# Add dependency so that GLES3 header don't need to be added manually 231RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools', '', d)}"
186RDEPENDS_libgles2-mesa-dev += "libgles3-mesa-dev"
187 232
188PACKAGES =+ "libegl-mesa libegl-mesa-dev \ 233PACKAGES =+ "libegl-mesa libegl-mesa-dev \
189 libosmesa libosmesa-dev \ 234 libosmesa libosmesa-dev \
190 libgl-mesa libgl-mesa-dev \ 235 libgl-mesa libgl-mesa-dev \
236 libglx-mesa libglx-mesa-dev \
191 libglapi libglapi-dev \ 237 libglapi libglapi-dev \
192 libgbm libgbm-dev \ 238 libgbm libgbm-dev \
193 libgles1-mesa libgles1-mesa-dev \ 239 libgles1-mesa libgles1-mesa-dev \
194 libgles2-mesa libgles2-mesa-dev \ 240 libgles2-mesa libgles2-mesa-dev \
195 libgles3-mesa libgles3-mesa-dev \ 241 libgles3-mesa libgles3-mesa-dev \
242 libopencl-mesa libopencl-mesa-dev \
196 libxatracker libxatracker-dev \ 243 libxatracker libxatracker-dev \
197 mesa-megadriver mesa-vulkan-drivers \ 244 mesa-megadriver mesa-vulkan-drivers \
198 mesa-vdpau-drivers \ 245 mesa-vdpau-drivers mesa-tools \
199 " 246 "
200 247
201do_install_append () { 248do_install:append () {
202 # Drivers never need libtool .la files 249 # Drivers never need libtool .la files
203 rm -f ${D}${libdir}/dri/*.la 250 rm -f ${D}${libdir}/dri/*.la
204 rm -f ${D}${libdir}/egl/*.la 251 rm -f ${D}${libdir}/egl/*.la
205 rm -f ${D}${libdir}/gallium-pipe/*.la 252 rm -f ${D}${libdir}/gallium-pipe/*.la
206 rm -f ${D}${libdir}/gbm/*.la 253 rm -f ${D}${libdir}/gbm/*.la
207 254
208 # it was packaged in libdricore9.1.3-1 and preventing upgrades when debian.bbclass was used
209 chrpath --delete ${D}${libdir}/dri/*_dri.so || true
210
211 # libwayland-egl has been moved to wayland 1.15+ 255 # libwayland-egl has been moved to wayland 1.15+
212 rm -f ${D}${libdir}/libwayland-egl* 256 rm -f ${D}${libdir}/libwayland-egl*
213 rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc 257 rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc
214} 258}
215 259
260do_install:append:class-native () {
261 if ${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'true', 'false', d)}; then
262 install -d ${D}${bindir}
263 install -m0755 ${B}/src/intel/compiler/intel_clc ${D}${bindir}
264 fi
265}
266
216# For the packages that make up the OpenGL interfaces, inject variables so that 267# For the packages that make up the OpenGL interfaces, inject variables so that
217# they don't get Debian-renamed (which would remove the -mesa suffix), and 268# they don't get Debian-renamed (which would remove the -mesa suffix), and
218# RPROVIDEs/RCONFLICTs on the generic libgl name. 269# RPROVIDEs/RCONFLICTs on the generic libgl name.
@@ -222,87 +273,96 @@ python __anonymous() {
222 if "-native" in d.getVar("PN"): 273 if "-native" in d.getVar("PN"):
223 suffix = "-native" 274 suffix = "-native"
224 for p in (("egl", "libegl", "libegl1"), 275 for p in (("egl", "libegl", "libegl1"),
225 ("dri", "libgl", "libgl1"), 276 ("opengl", "libgl", "libgl1"),
277 ("glvnd", "libglx",),
226 ("gles", "libgles1", "libglesv1-cm1"), 278 ("gles", "libgles1", "libglesv1-cm1"),
227 ("gles", "libgles2", "libglesv2-2"), 279 ("gles", "libgles2", "libglesv2-2"),
228 ("gles", "libgles3",)): 280 ("gles", "libgles3",),
281 ("opencl", "libopencl",)):
229 if not p[0] in pkgconfig: 282 if not p[0] in pkgconfig:
230 continue 283 continue
231 mlprefix = d.getVar("MLPREFIX") 284 mlprefix = d.getVar("MLPREFIX")
232 fullp = mlprefix + p[1] + "-mesa" + suffix 285 fullp = mlprefix + p[1] + "-mesa" + suffix
233 mlprefix = d.getVar("MLPREFIX") 286 mlprefix = d.getVar("MLPREFIX")
234 pkgs = " ".join(mlprefix + x + suffix for x in p[1:]) 287 pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:])
235 d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1") 288 d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
236 d.appendVar("RREPLACES_" + fullp, pkgs) 289 d.appendVar("RREPLACES:" + fullp, pkgs)
237 d.appendVar("RPROVIDES_" + fullp, pkgs) 290 d.appendVar("RPROVIDES:" + fullp, pkgs)
238 d.appendVar("RCONFLICTS_" + fullp, pkgs) 291 d.appendVar("RCONFLICTS:" + fullp, pkgs)
239 292
240 d.appendVar("RRECOMMENDS_" + fullp, " ${MLPREFIX}mesa-megadriver" + suffix) 293 d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}mesa-megadriver" + suffix)
241 294
242 # For -dev, the first element is both the Debian and original name 295 # For -dev, the first element is both the Debian and original name
243 fullp = mlprefix + p[1] + "-mesa-dev" + suffix 296 fullp = mlprefix + p[1] + "-mesa-dev" + suffix
244 pkgs = mlprefix + p[1] + "-dev" + suffix 297 pkgs = " " + mlprefix + p[1] + "-dev" + suffix
245 d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1") 298 d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
246 d.appendVar("RREPLACES_" + fullp, pkgs) 299 d.appendVar("RREPLACES:" + fullp, pkgs)
247 d.appendVar("RPROVIDES_" + fullp, pkgs) 300 d.appendVar("RPROVIDES:" + fullp, pkgs)
248 d.appendVar("RCONFLICTS_" + fullp, pkgs) 301 d.appendVar("RCONFLICTS:" + fullp, pkgs)
249} 302}
250 303
251python mesa_populate_packages() { 304python mesa_populate_packages() {
252 pkgs = ['mesa', 'mesa-dev', 'mesa-dbg'] 305 pkgs = ['mesa', 'mesa-dev', 'mesa-dbg']
253 for pkg in pkgs: 306 for pkg in pkgs:
254 d.setVar("RPROVIDES_%s" % pkg, pkg.replace("mesa", "mesa-dri", 1)) 307 d.setVar("RPROVIDES:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
255 d.setVar("RCONFLICTS_%s" % pkg, pkg.replace("mesa", "mesa-dri", 1)) 308 d.setVar("RCONFLICTS:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
256 d.setVar("RREPLACES_%s" % pkg, pkg.replace("mesa", "mesa-dri", 1)) 309 d.setVar("RREPLACES:%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
257 310
258 import re 311 import re
259 dri_drivers_root = oe.path.join(d.getVar('PKGD'), d.getVar('libdir'), "dri") 312 dri_drivers_root = oe.path.join(d.getVar('PKGD'), d.getVar('libdir'), "dri")
260 if os.path.isdir(dri_drivers_root): 313 if os.path.isdir(dri_drivers_root):
261 dri_pkgs = os.listdir(dri_drivers_root) 314 dri_pkgs = sorted(os.listdir(dri_drivers_root))
262 lib_name = d.expand("${MLPREFIX}mesa-megadriver") 315 lib_name = d.expand("${MLPREFIX}mesa-megadriver")
263 for p in dri_pkgs: 316 for p in dri_pkgs:
264 m = re.match(r'^(.*)_dri\.so$', p) 317 m = re.match(r'^(.*)_dri\.so$', p)
265 if m: 318 if m:
266 pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1)) 319 pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1))
267 d.appendVar("RPROVIDES_%s" % lib_name, pkg_name) 320 d.appendVar("RPROVIDES:%s" % lib_name, pkg_name)
268 d.appendVar("RCONFLICTS_%s" % lib_name, pkg_name) 321 d.appendVar("RCONFLICTS:%s" % lib_name, pkg_name)
269 d.appendVar("RREPLACES_%s" % lib_name, pkg_name) 322 d.appendVar("RREPLACES:%s" % lib_name, pkg_name)
270 323
271 pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe") 324 pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe")
272 do_split_packages(d, pipe_drivers_root, r'^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='') 325 do_split_packages(d, pipe_drivers_root, r'^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='')
273} 326}
274 327
275PACKAGESPLITFUNCS_prepend = "mesa_populate_packages " 328PACKAGESPLITFUNCS =+ "mesa_populate_packages"
276 329
277PACKAGES_DYNAMIC += "^mesa-driver-.*" 330PACKAGES_DYNAMIC += "^mesa-driver-.*"
278PACKAGES_DYNAMIC_class-native = "^mesa-driver-.*-native" 331PACKAGES_DYNAMIC:class-native = "^mesa-driver-.*-native"
279 332
280FILES_mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d/00-mesa-defaults.conf" 333FILES:mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d"
281FILES_mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${datadir}/vulkan" 334FILES:mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${libdir}/libpowervr_rogue.so ${datadir}/vulkan"
282FILES_${PN}-vdpau-drivers = "${libdir}/vdpau/*.so.*" 335FILES:${PN}-vdpau-drivers = "${libdir}/vdpau/*.so.*"
283FILES_libegl-mesa = "${libdir}/libEGL.so.*" 336FILES:libegl-mesa = "${libdir}/libEGL*.so.* ${datadir}/glvnd/egl_vendor.d"
284FILES_libgbm = "${libdir}/libgbm.so.*" 337FILES:libgbm = "${libdir}/libgbm.so.*"
285FILES_libgles1-mesa = "${libdir}/libGLESv1*.so.*" 338FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*"
286FILES_libgles2-mesa = "${libdir}/libGLESv2.so.*" 339FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*"
287FILES_libgl-mesa = "${libdir}/libGL.so.*" 340FILES:libgl-mesa = "${libdir}/libGL.so.*"
288FILES_libglapi = "${libdir}/libglapi.so.*" 341FILES:libglx-mesa = "${libdir}/libGLX*.so.*"
289FILES_libosmesa = "${libdir}/libOSMesa.so.*" 342FILES:libopencl-mesa = "${libdir}/libMesaOpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/mesa.icd"
290FILES_libxatracker = "${libdir}/libxatracker.so.*" 343FILES:libglapi = "${libdir}/libglapi.so.*"
291 344FILES:libosmesa = "${libdir}/libOSMesa.so.*"
292FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan ${libdir}/vdpau/*.so" 345FILES:libxatracker = "${libdir}/libxatracker.so.*"
293FILES_libegl-mesa-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc" 346
294FILES_libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h" 347FILES:${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan ${libdir}/vdpau/*.so"
295FILES_libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc" 348FILES:libegl-mesa-dev = "${libdir}/libEGL*.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
296FILES_libglapi-dev = "${libdir}/libglapi.*" 349FILES:libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h"
297FILES_libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc" 350FILES:libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc"
298FILES_libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc" 351FILES:libglx-mesa-dev = "${libdir}/libGLX*.*"
299FILES_libgles3-mesa-dev = "${includedir}/GLES3" 352FILES:libglapi-dev = "${libdir}/libglapi.*"
300FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc" 353FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
301FILES_libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \ 354FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc"
355FILES:libgles3-mesa-dev = "${includedir}/GLES3"
356FILES:libopencl-mesa-dev = "${libdir}/libMesaOpenCL.so"
357FILES:libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
358FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
302 ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \ 359 ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
303 ${libdir}/pkgconfig/xatracker.pc" 360 ${libdir}/pkgconfig/xatracker.pc"
361# catch all to get all the tools and data
362FILES:${PN}-tools = "${bindir} ${datadir}"
363ALLOW_EMPTY:${PN}-tools = "1"
304 364
305# Fix upgrade path from mesa to mesa-megadriver 365# Fix upgrade path from mesa to mesa-megadriver
306RREPLACES_mesa-megadriver = "mesa" 366RREPLACES:mesa-megadriver = "mesa"
307RCONFLICTS_mesa-megadriver = "mesa" 367RCONFLICTS:mesa-megadriver = "mesa"
308RPROVIDES_mesa-megadriver = "mesa" 368RPROVIDES:mesa-megadriver = "mesa"
diff --git a/meta/recipes-graphics/mesa/mesa_20.3.4.bb b/meta/recipes-graphics/mesa/mesa_24.0.3.bb
index 96e8aa38d6..96e8aa38d6 100644
--- a/meta/recipes-graphics/mesa/mesa_20.3.4.bb
+++ b/meta/recipes-graphics/mesa/mesa_24.0.3.bb