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-meson.build-check-for-all-linux-host_os-combinations.patch43
-rw-r--r--meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch46
-rw-r--r--meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch46
-rw-r--r--meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch147
-rw-r--r--meta/recipes-graphics/mesa/files/clang-compile-PR89599.patch116
-rw-r--r--meta/recipes-graphics/mesa/files/disable-asm-on-non-gcc.patch29
-rw-r--r--meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch17
-rw-r--r--meta/recipes-graphics/mesa/libglu_9.0.1.bb (renamed from meta/recipes-graphics/mesa/libglu_9.0.0.bb)10
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0007-Install-few-more-test-programs.patch26
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0008-glsl-perf-Add-few-missing-.glsl-.vert-.frag-files-to.patch20
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos/0009-glsl-perf-Install-.glsl-.vert-.frag-files.patch20
-rw-r--r--meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb (renamed from meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb)12
-rw-r--r--meta/recipes-graphics/mesa/mesa-gl_12.0.1.bb13
-rw-r--r--meta/recipes-graphics/mesa/mesa-gl_19.2.4.bb10
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc213
-rw-r--r--meta/recipes-graphics/mesa/mesa_12.0.1.bb18
-rw-r--r--meta/recipes-graphics/mesa/mesa_19.2.4.bb21
-rw-r--r--meta/recipes-graphics/mesa/mesa_git.bb22
18 files changed, 506 insertions, 323 deletions
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
new file mode 100644
index 0000000000..1869e11059
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
@@ -0,0 +1,43 @@
+From b6d9bc97cb0e8c540a45dba5440b036fb940ff95 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@wdc.com>
+Date: Mon, 11 Nov 2019 09:38:15 -0800
+Subject: [PATCH] meson.build: check for all linux host_os combinations
+
+Make sure that we are also looking for our host_os combinations like
+linux-musl etc. when assuming support for DRM/KMS.
+
+Also delete a duplicate line.
+
+Upstream-Status: Pending
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
+
+---
+ meson.build | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index d584152..a1f098c 100644
+--- a/meson.build
++++ b/meson.build
+@@ -117,7 +117,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2
+ # Only build shared_glapi if at least one OpenGL API is enabled
+ with_shared_glapi = get_option('shared-glapi') and with_any_opengl
+
+-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos'].contains(host_machine.system())
++system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux')
+
+ dri_drivers = get_option('dri-drivers')
+ if dri_drivers.contains('auto')
+@@ -856,7 +856,7 @@ if cc.compiles('__uint128_t foo(void) { return 0; }',
+ endif
+
+ # TODO: this is very incomplete
+-if ['linux', 'cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system())
++if ['cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system()) or host_machine.system().startswith('linux')
+ pre_args += '-D_GNU_SOURCE'
+ elif host_machine.system() == 'sunos'
+ pre_args += '-D__EXTENSIONS__'
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
new file mode 100644
index 0000000000..199ed572d5
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
@@ -0,0 +1,46 @@
+From af6923544de02ded648a736e07b9bd8b7c52dba9 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair.francis@wdc.com>
+Date: Wed, 23 Oct 2019 09:46:28 -0700
+Subject: [PATCH] meson.build: make TLS ELF optional
+
+USE_ELF_TLS has replaced GLX_USE_TLS so this patch is the original "make
+TLS GLX optional again" patch updated to the latest mesa.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
+
+---
+ meson.build | 2 +-
+ meson_options.txt | 6 ++++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index a1f098c..1e31eb4 100644
+--- a/meson.build
++++ b/meson.build
+@@ -378,7 +378,7 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat
+ endif
+
+ # Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS.
+-if not with_platform_android or get_option('platform-sdk-version') >= 29
++if (not with_platform_android or get_option('platform-sdk-version') >= 29) and get_option('elf-tls')
+ pre_args += '-DUSE_ELF_TLS'
+ endif
+
+diff --git a/meson_options.txt b/meson_options.txt
+index b768c15..76cef24 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -333,6 +333,12 @@ option(
+ value : true,
+ description : 'Enable direct rendering in GLX and EGL for DRI',
+ )
++option(
++ 'elf-tls',
++ type : 'boolean',
++ value : true,
++ description : 'Enable TLS support in ELF',
++)
+ option(
+ 'I-love-half-baked-turnips',
+ type : 'boolean',
diff --git a/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch b/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch
new file mode 100644
index 0000000000..c20a1f7c52
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch
@@ -0,0 +1,46 @@
+From 5ad6515238bc042cccf9959abad44fdee9aeb07f Mon Sep 17 00:00:00 2001
+From: Fabio Berton <fabio.berton@ossystems.com.br>
+Date: Wed, 12 Jun 2019 14:18:31 -0300
+Subject: [PATCH] Allow enable DRI without DRI drivers
+
+Upstream-Status: Pending
+
+Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
+Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+
+---
+ meson.build | 2 +-
+ meson_options.txt | 6 ++++++
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 1e31eb4..512eec6 100644
+--- a/meson.build
++++ b/meson.build
+@@ -147,7 +147,7 @@ with_dri_r200 = dri_drivers.contains('r200')
+ with_dri_nouveau = dri_drivers.contains('nouveau')
+ with_dri_swrast = dri_drivers.contains('swrast')
+
+-with_dri = dri_drivers.length() != 0 and dri_drivers != ['']
++with_dri = get_option('dri') or (dri_drivers.length() != 0 and dri_drivers != [''])
+
+ gallium_drivers = get_option('gallium-drivers')
+ if gallium_drivers.contains('auto')
+diff --git a/meson_options.txt b/meson_options.txt
+index 76cef24..a8abd04 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -34,6 +34,12 @@ option(
+ choices : ['auto', 'true', 'false'],
+ description : 'enable support for dri3'
+ )
++option(
++ 'dri',
++ type : 'boolean',
++ value : false,
++ description : 'enable support for dri'
++)
+ option(
+ 'dri-drivers',
+ type : 'array',
diff --git a/meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch b/meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch
new file mode 100644
index 0000000000..b5658d0c9d
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch
@@ -0,0 +1,147 @@
+From 1b1cb6e5ea25eaa98573328b9565728a08245997 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair@alistair23.me>
+Date: Thu, 14 Nov 2019 09:06:02 -0800
+Subject: [PATCH] Revert "mesa: Enable asm unconditionally, now that
+ gen_matypes is gone."
+
+This reverts commit 20294dceebc23236e33b22578245f7e6f41b6997.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Alistair Francis <alistair@alistair23.me>
+
+---
+ meson.build | 94 ++++++++++++++++++++++++++++++-----------------
+ meson_options.txt | 6 +++
+ 2 files changed, 67 insertions(+), 33 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 512eec6..a2bcc3a 100644
+--- a/meson.build
++++ b/meson.build
+@@ -49,6 +49,7 @@ with_vulkan_icd_dir = get_option('vulkan-icd-dir')
+ with_tests = get_option('build-tests')
+ with_valgrind = get_option('valgrind')
+ with_libunwind = get_option('libunwind')
++with_asm = get_option('asm')
+ with_glx_read_only_text = get_option('glx-read-only-text')
+ with_glx_direct = get_option('glx-direct')
+ with_osmesa = get_option('osmesa')
+@@ -985,41 +986,68 @@ endif
+
+ # TODO: shared/static? Is this even worth doing?
+
++# When cross compiling we generally need to turn off the use of assembly,
++# because mesa's assembly relies on building an executable for the host system,
++# and running it to get information about struct sizes. There is at least one
++# case of cross compiling where we can use asm, and that's x86_64 -> x86 when
++# host OS == build OS, since in that case the build machine can run the host's
++# binaries.
++if with_asm and meson.is_cross_build()
++ if build_machine.system() != host_machine.system()
++ # TODO: It may be possible to do this with an exe_wrapper (like wine).
++ message('Cross compiling from one OS to another, disabling assembly.')
++ with_asm = false
++ elif not (build_machine.cpu_family().startswith('x86') and host_machine.cpu_family() == 'x86')
++ # FIXME: Gentoo always sets -m32 for x86_64 -> x86 builds, resulting in an
++ # x86 -> x86 cross compile. We use startswith rather than == to handle this
++ # case.
++ # TODO: There may be other cases where the 64 bit version of the
++ # architecture can run 32 bit binaries (aarch64 and armv7 for example)
++ message('''
++ Cross compiling to different architectures, and the host cannot run
++ the build machine's binaries. Disabling assembly.
++ ''')
++ with_asm = false
++ endif
++endif
++
+ with_asm_arch = ''
+-if host_machine.cpu_family() == 'x86'
+- if system_has_kms_drm or host_machine.system() == 'gnu'
+- with_asm_arch = 'x86'
+- pre_args += ['-DUSE_X86_ASM', '-DUSE_MMX_ASM', '-DUSE_3DNOW_ASM',
+- '-DUSE_SSE_ASM']
+-
+- if with_glx_read_only_text
+- pre_args += ['-DGLX_X86_READONLY_TEXT']
++if with_asm
++ if host_machine.cpu_family() == 'x86'
++ if system_has_kms_drm or host_machine.system() == 'gnu'
++ with_asm_arch = 'x86'
++ pre_args += ['-DUSE_X86_ASM', '-DUSE_MMX_ASM', '-DUSE_3DNOW_ASM',
++ '-DUSE_SSE_ASM']
++
++ if with_glx_read_only_text
++ pre_args += ['-DGLX_X86_READONLY_TEXT']
++ endif
++ endif
++ elif host_machine.cpu_family() == 'x86_64'
++ if system_has_kms_drm
++ with_asm_arch = 'x86_64'
++ pre_args += ['-DUSE_X86_64_ASM']
++ endif
++ elif host_machine.cpu_family() == 'arm'
++ if system_has_kms_drm
++ with_asm_arch = 'arm'
++ pre_args += ['-DUSE_ARM_ASM']
++ endif
++ elif host_machine.cpu_family() == 'aarch64'
++ if system_has_kms_drm
++ with_asm_arch = 'aarch64'
++ pre_args += ['-DUSE_AARCH64_ASM']
++ endif
++ elif host_machine.cpu_family() == 'sparc64'
++ if system_has_kms_drm
++ with_asm_arch = 'sparc'
++ pre_args += ['-DUSE_SPARC_ASM']
++ endif
++ elif host_machine.cpu_family().startswith('ppc64') and host_machine.endian() == 'little'
++ if system_has_kms_drm
++ with_asm_arch = 'ppc64le'
++ pre_args += ['-DUSE_PPC64LE_ASM']
+ endif
+- endif
+-elif host_machine.cpu_family() == 'x86_64'
+- if system_has_kms_drm
+- with_asm_arch = 'x86_64'
+- pre_args += ['-DUSE_X86_64_ASM']
+- endif
+-elif host_machine.cpu_family() == 'arm'
+- if system_has_kms_drm
+- with_asm_arch = 'arm'
+- pre_args += ['-DUSE_ARM_ASM']
+- endif
+-elif host_machine.cpu_family() == 'aarch64'
+- if system_has_kms_drm
+- with_asm_arch = 'aarch64'
+- pre_args += ['-DUSE_AARCH64_ASM']
+- endif
+-elif host_machine.cpu_family() == 'sparc64'
+- if system_has_kms_drm
+- with_asm_arch = 'sparc'
+- pre_args += ['-DUSE_SPARC_ASM']
+- endif
+-elif host_machine.cpu_family().startswith('ppc64') and host_machine.endian() == 'little'
+- if system_has_kms_drm
+- with_asm_arch = 'ppc64le'
+- pre_args += ['-DUSE_PPC64LE_ASM']
+ endif
+ endif
+
+diff --git a/meson_options.txt b/meson_options.txt
+index a8abd04..0f4bd80 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -233,6 +233,12 @@ option(
+ value : false,
+ description : 'Enable GLVND support.'
+ )
++option(
++ 'asm',
++ type : 'boolean',
++ value : true,
++ description : 'Build assembly code if possible'
++)
+ option(
+ 'glx-read-only-text',
+ type : 'boolean',
diff --git a/meta/recipes-graphics/mesa/files/clang-compile-PR89599.patch b/meta/recipes-graphics/mesa/files/clang-compile-PR89599.patch
deleted file mode 100644
index 48bd32567c..0000000000
--- a/meta/recipes-graphics/mesa/files/clang-compile-PR89599.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 5ec140c17b54c25920091501b665b9aa809cc5e8 Mon Sep 17 00:00:00 2001
-From: Matt Turner <mattst88@gmail.com>
-Date: Mon, 11 Jul 2016 10:44:25 -0700
-Subject: mapi: Massage code to allow clang to compile.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-According to https://llvm.org/bugs/show_bug.cgi?id=19778#c3 this code
-was violating the spec, resulting in it failing to compile.
-
-Cc: mesa-stable@lists.freedesktop.org
-Co-authored-by: Tomasz Paweł Gajc <tpgxyz@gmail.com>
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89599
-Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-diff --git a/configure.ac b/configure.ac
-index 3799d8d..1ca8359 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -226,6 +226,7 @@ AX_GCC_FUNC_ATTRIBUTE([packed])
- AX_GCC_FUNC_ATTRIBUTE([pure])
- AX_GCC_FUNC_ATTRIBUTE([returns_nonnull])
- AX_GCC_FUNC_ATTRIBUTE([unused])
-+AX_GCC_FUNC_ATTRIBUTE([visibility])
- AX_GCC_FUNC_ATTRIBUTE([warn_unused_result])
- AX_GCC_FUNC_ATTRIBUTE([weak])
-
-diff --git a/src/mapi/entry_x86-64_tls.h b/src/mapi/entry_x86-64_tls.h
-index 38faccc..c5262a1 100644
---- a/src/mapi/entry_x86-64_tls.h
-+++ b/src/mapi/entry_x86-64_tls.h
-@@ -25,6 +25,11 @@
- * Chia-I Wu <olv@lunarg.com>
- */
-
-+#ifdef HAVE_FUNC_ATTRIBUTE_VISIBIITY
-+#define HIDDEN __attribute__((visibility("hidden")))
-+#else
-+#define HIDDEN
-+#endif
-
- __asm__(".text\n"
- ".balign 32\n"
-@@ -54,8 +59,8 @@ entry_patch_public(void)
- {
- }
-
--static char
--x86_64_entry_start[];
-+extern char
-+x86_64_entry_start[] HIDDEN;
-
- mapi_func
- entry_get_public(int slot)
-diff --git a/src/mapi/entry_x86_tls.h b/src/mapi/entry_x86_tls.h
-index 46d2ece..231b409 100644
---- a/src/mapi/entry_x86_tls.h
-+++ b/src/mapi/entry_x86_tls.h
-@@ -27,6 +27,12 @@
-
- #include <string.h>
-
-+#ifdef HAVE_FUNC_ATTRIBUTE_VISIBIITY
-+#define HIDDEN __attribute__((visibility("hidden")))
-+#else
-+#define HIDDEN
-+#endif
-+
- __asm__(".text");
-
- __asm__("x86_current_tls:\n\t"
-@@ -71,8 +77,8 @@ __asm__(".text");
- extern unsigned long
- x86_current_tls();
-
--static char x86_entry_start[];
--static char x86_entry_end[];
-+extern char x86_entry_start[] HIDDEN;
-+extern char x86_entry_end[] HIDDEN;
-
- void
- entry_patch_public(void)
-diff --git a/src/mapi/entry_x86_tsd.h b/src/mapi/entry_x86_tsd.h
-index ea7bacb..03d9735 100644
---- a/src/mapi/entry_x86_tsd.h
-+++ b/src/mapi/entry_x86_tsd.h
-@@ -25,6 +25,11 @@
- * Chia-I Wu <olv@lunarg.com>
- */
-
-+#ifdef HAVE_FUNC_ATTRIBUTE_VISIBIITY
-+#define HIDDEN __attribute__((visibility("hidden")))
-+#else
-+#define HIDDEN
-+#endif
-
- #define X86_ENTRY_SIZE 32
-
-@@ -58,8 +63,8 @@ __asm__(".balign 32\n"
- #include <string.h>
- #include "u_execmem.h"
-
--static const char x86_entry_start[];
--static const char x86_entry_end[];
-+extern const char x86_entry_start[] HIDDEN;
-+extern const char x86_entry_end[] HIDDEN;
-
- void
- entry_patch_public(void)
---
-cgit v0.10.2
-
diff --git a/meta/recipes-graphics/mesa/files/disable-asm-on-non-gcc.patch b/meta/recipes-graphics/mesa/files/disable-asm-on-non-gcc.patch
deleted file mode 100644
index d2d67558b6..0000000000
--- a/meta/recipes-graphics/mesa/files/disable-asm-on-non-gcc.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Configure checks for compiler to be gcc and then it enables asm_offsets
-generation. see
-
-https://cgit.freedesktop.org/mesa/mesa/commit/?id=73c9b4b0e05fc66629ba250846948dc55c0e7a0d
-
-However, we missed the check when enabling this on cross compilation
-when architecture for both host and target is x86
-
-Fixes errors like
-./gen_matypes > matypes.h
-/bin/bash: ./gen_matypes: No such file or directory
-
--Khem
-
-Upstream-Status: Submitted
-
-Index: mesa-12.0.1/configure.ac
-===================================================================
---- mesa-12.0.1.orig/configure.ac
-+++ mesa-12.0.1/configure.ac
-@@ -732,7 +732,7 @@ test "x$enable_asm" = xno && AC_MSG_RESU
- if test "x$enable_asm" = xyes -a "x$cross_compiling" = xyes; then
- case "$host_cpu" in
- i?86 | x86_64 | amd64)
-- if test "x$host_cpu" != "x$target_cpu"; then
-+ if test "x$host_cpu" != "x$target_cpu" -o "x$acv_mesa_CLANG" = xyes; then
- enable_asm=no
- AC_MSG_RESULT([no, cross compiling])
- fi
diff --git a/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch b/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch
deleted file mode 100644
index e4461ef177..0000000000
--- a/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-endianness check is OS wide and not specific to libc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: mesa-11.1.1/src/gallium/include/pipe/p_config.h
-===================================================================
---- mesa-11.1.1.orig/src/gallium/include/pipe/p_config.h
-+++ mesa-11.1.1/src/gallium/include/pipe/p_config.h
-@@ -130,7 +130,7 @@
- * Endian detection.
- */
-
--#ifdef __GLIBC__
-+#if defined(__linux__)
- #include <endian.h>
-
- #if __BYTE_ORDER == __LITTLE_ENDIAN
diff --git a/meta/recipes-graphics/mesa/libglu_9.0.0.bb b/meta/recipes-graphics/mesa/libglu_9.0.1.bb
index 010998d926..703f131f79 100644
--- a/meta/recipes-graphics/mesa/libglu_9.0.0.bb
+++ b/meta/recipes-graphics/mesa/libglu_9.0.1.bb
@@ -12,19 +12,19 @@ LIC_FILES_CHKSUM = "file://include/GL/glu.h;endline=29;md5=6b79c570f644363b35645
PE = "2"
PR = "0"
-SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/glu/glu-${PV}.tar.bz2"
+SRC_URI = "https://mesa.freedesktop.org/archive/glu/glu-${PV}.tar.gz"
-SRC_URI[md5sum] = "be9249132ff49275461cf92039083030"
-SRC_URI[sha256sum] = "1f7ad0d379a722fcbd303aa5650c6d7d5544fde83196b42a73d1193568a4df12"
+SRC_URI[md5sum] = "5599a0e0a97335e10239d9165aced60d"
+SRC_URI[sha256sum] = "f6f484cfcd51e489afe88031afdea1e173aa652697e4c19ddbcb8260579a10f7"
S = "${WORKDIR}/glu-${PV}"
DEPENDS = "virtual/libgl"
-inherit autotools pkgconfig distro_features_check
+inherit autotools pkgconfig features_check
# Requires libGL.so which is provided by mesa when x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
+REQUIRED_DISTRO_FEATURES = "x11 opengl"
# Remove the mesa-glu dependency in mesa-glu-dev, as mesa-glu is empty
RDEPENDS_${PN}-dev = ""
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
index 6b676cdd20..b27d9eafa5 100644
--- 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
@@ -1,4 +1,4 @@
-From c59e286fa4e818ca015dd40e4725636309970ea8 Mon Sep 17 00:00:00 2001
+From 2e0367a941445a862ab99c54ec85d1357d0f73c0 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Thu, 10 Jul 2014 14:30:52 +0200
Subject: [PATCH] Install few more test programs
@@ -8,27 +8,28 @@ Upstream-Status: Pending
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
---
- src/egl/opengl/Makefile.am | 2 +-
- src/egl/opengles1/Makefile.am | 10 ++++------
- src/egl/openvg/Makefile.am | 2 +-
- 3 files changed, 6 insertions(+), 8 deletions(-)
+ src/egl/opengl/Makefile.am | 3 +--
+ src/egl/openvg/Makefile.am | 2 +-
+ 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/egl/opengl/Makefile.am b/src/egl/opengl/Makefile.am
-index fe7faa9..3e48141 100644
+index 6d184ff6..ab09d028 100644
--- a/src/egl/opengl/Makefile.am
+++ b/src/egl/opengl/Makefile.am
-@@ -50,7 +50,7 @@ endif
- endif
+@@ -57,8 +57,7 @@ endif
if HAVE_EGL
+ bin_PROGRAMS = \
+- eglinfo
-noinst_PROGRAMS = \
-+bin_PROGRAMS = \
- eglinfo \
++ eglinfo \
peglgears \
$(EGL_DRM_DEMOS) \
+ $(EGL_X11_DEMOS) \
diff --git a/src/egl/openvg/Makefile.am b/src/egl/openvg/Makefile.am
-index b0f1212..5fd1cf8 100644
+index b0f1212f..5fd1cf83 100644
--- a/src/egl/openvg/Makefile.am
+++ b/src/egl/openvg/Makefile.am
@@ -49,7 +49,7 @@ endif
@@ -40,6 +41,3 @@ index b0f1212..5fd1cf8 100644
$(EGL_X11_DEMOS)
endif
endif
---
-2.1.4
-
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
index a6085754d2..a6d168175f 100644
--- 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
@@ -1,12 +1,13 @@
-From 0b6f95f9b8ece22e9856c150e4be29fd86eaf546 Mon Sep 17 00:00:00 2001
+From 894add34c2b5e6b4ccc78996bf681d7ec7bc9e36 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Thu, 10 Jul 2014 14:29:27 +0200
-Subject: [PATCH 8/9] glsl, perf: Add few missing .glsl, .vert, .frag files to
+Subject: [PATCH] glsl, perf: Add few missing .glsl, .vert, .frag files to
EXTRA_DATA
Upstream-Status: Pending
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
---
src/fpglsl/Makefile.am | 2 ++
src/glsl/Makefile.am | 10 ++++++++--
@@ -15,7 +16,7 @@ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/fpglsl/Makefile.am b/src/fpglsl/Makefile.am
-index 47c1039..fd43c91 100644
+index 47c1039f..fd43c919 100644
--- a/src/fpglsl/Makefile.am
+++ b/src/fpglsl/Makefile.am
@@ -39,10 +39,12 @@ noinst_PROGRAMS = \
@@ -32,7 +33,7 @@ index 47c1039..fd43c91 100644
mov-imm.glsl \
simpleif.glsl \
diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
-index 4faa8db..079a29d 100644
+index 4faa8dbf..079a29d8 100644
--- a/src/glsl/Makefile.am
+++ b/src/glsl/Makefile.am
@@ -37,7 +37,7 @@ AM_LDFLAGS = \
@@ -71,13 +72,13 @@ index 4faa8db..079a29d 100644
+ skinning.vert \
toyball.shtest
diff --git a/src/perf/Makefile.am b/src/perf/Makefile.am
-index 5363c58..c5cca8d 100644
+index f0031fea..60069396 100644
--- a/src/perf/Makefile.am
+++ b/src/perf/Makefile.am
-@@ -57,3 +57,9 @@ bin_PROGRAMS = \
- endif
+@@ -59,3 +59,9 @@ endif
glslstateschange_LDADD = libperf.la ../util/libutil.la
+ glsl_compile_time_LDADD = ../util/libutil.la
+
+EXTRA_DIST = \
+ glslstateschange1.frag \
@@ -85,7 +86,7 @@ index 5363c58..c5cca8d 100644
+ glslstateschange2.frag \
+ glslstateschange2.vert
diff --git a/src/vpglsl/Makefile.am b/src/vpglsl/Makefile.am
-index 4a85ed4..48b08f4 100644
+index 4a85ed40..48b08f48 100644
--- a/src/vpglsl/Makefile.am
+++ b/src/vpglsl/Makefile.am
@@ -44,6 +44,7 @@ EXTRA_DIST = \
@@ -96,6 +97,3 @@ index 4a85ed4..48b08f4 100644
mov.glsl \
nestedifs.glsl \
nestedswizzle.glsl \
---
-2.0.0
-
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
index 1262dee237..8a98ba60d1 100644
--- 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
@@ -1,10 +1,11 @@
-From c8c3de5417d6b6c7d7579c528c0cab718f4bfdb6 Mon Sep 17 00:00:00 2001
+From 477ab6d90a17d8e4d3935be6ce8b8e154db0e3e5 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Thu, 10 Jul 2014 14:48:12 +0200
-Subject: [PATCH 9/9] glsl, perf: Install .glsl, .vert, .frag files
+Subject: [PATCH] glsl, perf: Install .glsl, .vert, .frag files
Upstream-Status: Pending
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
---
src/fpglsl/Makefile.am | 3 ++-
src/glsl/Makefile.am | 3 ++-
@@ -13,7 +14,7 @@ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/fpglsl/Makefile.am b/src/fpglsl/Makefile.am
-index fd43c91..2bf51de 100644
+index fd43c919..2bf51de4 100644
--- a/src/fpglsl/Makefile.am
+++ b/src/fpglsl/Makefile.am
@@ -38,7 +38,8 @@ noinst_PROGRAMS = \
@@ -27,7 +28,7 @@ index fd43c91..2bf51de 100644
dowhile2.glsl \
dowhile.glsl \
diff --git a/src/glsl/Makefile.am b/src/glsl/Makefile.am
-index 079a29d..f66ec29 100644
+index 079a29d8..f66ec299 100644
--- a/src/glsl/Makefile.am
+++ b/src/glsl/Makefile.am
@@ -118,7 +118,8 @@ vert_or_frag_only_LDADD = ../util/libutil.la
@@ -41,12 +42,12 @@ index 079a29d..f66ec29 100644
CH06-brick.vert \
CH11-bumpmap.frag \
diff --git a/src/perf/Makefile.am b/src/perf/Makefile.am
-index c5cca8d..140256d 100644
+index 60069396..469bdf45 100644
--- a/src/perf/Makefile.am
+++ b/src/perf/Makefile.am
-@@ -58,7 +58,8 @@ endif
-
+@@ -60,7 +60,8 @@ endif
glslstateschange_LDADD = libperf.la ../util/libutil.la
+ glsl_compile_time_LDADD = ../util/libutil.la
-EXTRA_DIST = \
+demosdatadir=$(datadir)/$(PACKAGE)/
@@ -55,7 +56,7 @@ index c5cca8d..140256d 100644
glslstateschange1.vert \
glslstateschange2.frag \
diff --git a/src/vpglsl/Makefile.am b/src/vpglsl/Makefile.am
-index 48b08f4..5526867 100644
+index 48b08f48..55268675 100644
--- a/src/vpglsl/Makefile.am
+++ b/src/vpglsl/Makefile.am
@@ -38,7 +38,8 @@ noinst_PROGRAMS = \
@@ -68,6 +69,3 @@ index 48b08f4..5526867 100644
for.glsl \
func.glsl \
func2.glsl \
---
-2.0.0
-
diff --git a/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb b/meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb
index fab0bdb2ee..38bdbded29 100644
--- a/meta/recipes-graphics/mesa/mesa-demos_8.3.0.bb
+++ b/meta/recipes-graphics/mesa/mesa-demos_8.4.0.bb
@@ -9,7 +9,7 @@ LICENSE = "MIT & PD"
LIC_FILES_CHKSUM = "file://src/xdemos/glxgears.c;beginline=1;endline=20;md5=914225785450eff644a86c871d3ae00e \
file://src/xdemos/glxdemo.c;beginline=1;endline=8;md5=b01d5ab1aee94d35b7efaa2ef48e1a06"
-SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
+SRC_URI = "https://mesa.freedesktop.org/archive/demos/${BPN}-${PV}.tar.bz2 \
file://0001-mesa-demos-Add-missing-data-files.patch \
file://0003-configure-Allow-to-disable-demos-which-require-GLEW-.patch \
file://0004-Use-DEMOS_DATA_DIR-to-locate-data-files.patch \
@@ -19,10 +19,10 @@ SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/demos/${PV}/${BPN}-${PV}.tar.bz2 \
file://0012-mesa-demos-OpenVG-demos-with-single-frame-need-eglSw.patch \
file://0013-only-build-GLX-demos-if-needed.patch \
"
-SRC_URI[md5sum] = "628e75c23c17394f11a316c36f8e4164"
-SRC_URI[sha256sum] = "c173154bbd0d5fb53d732471984def42fb1b14ac85fcb834138fb9518b3e0bef"
+SRC_URI[md5sum] = "6b65a02622765522176d00f553086fa3"
+SRC_URI[sha256sum] = "01e99c94a0184e63e796728af89bfac559795fb2a0d6f506fa900455ca5fff7d"
-inherit autotools pkgconfig distro_features_check
+inherit autotools pkgconfig features_check
# depends on virtual/egl, virtual/libgl ...
REQUIRED_DISTRO_FEATURES = "opengl x11"
@@ -30,7 +30,7 @@ PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \
x11 glew glu glx"
# The Wayland code doesn't work with Wayland 1.0, so disable it for now
-#${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
+#${@bb.utils.filter('DISTRO_FEATURES', 'wayland', d)}"
EXTRA_OECONF = "--with-system-data-files"
@@ -40,7 +40,7 @@ PACKAGECONFIG[freetype2] = "--enable-freetype2,--disable-freetype2,freetype"
PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgl"
PACKAGECONFIG[gles1] = "--enable-gles1,--disable-gles1,virtual/libgles1"
PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2"
-PACKAGECONFIG[glut] = "--with-glut=${STAGING_EXECPREFIXDIR},--without-glut,"
+PACKAGECONFIG[glut] = "--with-glut=${STAGING_EXECPREFIXDIR},--without-glut,freeglut"
PACKAGECONFIG[osmesa] = "--enable-osmesa,--disable-osmesa,"
PACKAGECONFIG[vg] = "--enable-vg,--disable-vg,virtual/libopenvg"
PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,virtual/libgl wayland"
diff --git a/meta/recipes-graphics/mesa/mesa-gl_12.0.1.bb b/meta/recipes-graphics/mesa/mesa-gl_12.0.1.bb
deleted file mode 100644
index f06a3e9b58..0000000000
--- a/meta/recipes-graphics/mesa/mesa-gl_12.0.1.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require mesa_${PV}.bb
-
-SUMMARY += " (OpenGL only, no EGL/GLES)"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/mesa:"
-
-PROVIDES = "virtual/libgl virtual/mesa"
-
-S = "${WORKDIR}/mesa-${PV}"
-
-PACKAGECONFIG ??= "dri ${MESA_CRYPTO} ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-
-EXCLUDE_FROM_WORLD = "1"
diff --git a/meta/recipes-graphics/mesa/mesa-gl_19.2.4.bb b/meta/recipes-graphics/mesa/mesa-gl_19.2.4.bb
new file mode 100644
index 0000000000..d4b1c1c454
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa-gl_19.2.4.bb
@@ -0,0 +1,10 @@
+require mesa_${PV}.bb
+
+SUMMARY += " (OpenGL only, no EGL/GLES)"
+
+PROVIDES = "virtual/libgl virtual/mesa"
+
+S = "${WORKDIR}/mesa-${PV}"
+
+PACKAGECONFIG ??= "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
+PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index e4880ffedd..9ad9f2e370 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -10,75 +10,163 @@ HOMEPAGE = "http://mesa3d.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "x11"
LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://docs/license.html;md5=899fbe7e42d494c7c8c159c7001693d5"
+LIC_FILES_CHKSUM = "file://docs/license.html;md5=3a4999caf82cc503ac8b9e37c235782e"
PE = "2"
-DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native udev"
+DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native"
+EXTRANATIVEPATH += "chrpath-native"
+PROVIDES = " \
+ ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \
+ virtual/mesa \
+ "
-PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl virtual/mesa"
+inherit meson pkgconfig python3native gettext features_check
-inherit autotools pkgconfig pythonnative gettext distro_features_check
+# Unset these to stop python trying to report the target Python setup
+_PYTHON_SYSCONFIGDATA_NAME[unexport] = "1"
+STAGING_INCDIR[unexport] = "1"
+STAGING_LIBDIR[unexport] = "1"
-REQUIRED_DISTRO_FEATURES = "opengl"
+BBCLASSEXTEND = "native nativesdk"
-EXTRA_OECONF = "--enable-shared-glapi"
+ANY_OF_DISTRO_FEATURES_class-target = "opengl vulkan"
-PACKAGECONFIG ??= "gbm egl gles dri ${MESA_CRYPTO} \
- ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}\
- ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}\
- "
+PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \
+ ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)} \
+ surfaceless"
-PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm"
+export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config"
+export YOCTO_ALTERNATE_MULTILIB_NAME = "${base_libdir}"
+export LLVM_CONFIG = "${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE}"
+export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}"
+
+MESA_LLVM_RELEASE ?= "${LLVMVERSION}"
+
+# set the MESA_BUILD_TYPE to either 'release' (default) or 'debug'
+# by default the upstream mesa sources build a debug release
+# here we assume the user will want a release build by default
+MESA_BUILD_TYPE ?= "release"
+def check_buildtype(d):
+ _buildtype = d.getVar('MESA_BUILD_TYPE')
+ if _buildtype not in ['release', 'debug']:
+ bb.fatal("unknown build type (%s), please set MESA_BUILD_TYPE to either 'release' or 'debug'" % _buildtype)
+ if _buildtype == 'debug':
+ return 'debugoptimized'
+ return 'plain'
+MESON_BUILDTYPE = "${@check_buildtype(d)}"
+
+EXTRA_OEMESON = " \
+ -Dshared-glapi=true \
+ -Dgallium-opencl=disabled \
+ -Dglx-read-only-text=true \
+ -Dplatforms='${@",".join("${PLATFORMS}".split())}' \
+"
+
+PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri gallium', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \
+ elf-tls \
+ "
+PACKAGECONFIG_class-native ?= "gbm dri egl opengl elf-tls"
+PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl elf-tls"
+
+PACKAGECONFIG_remove_libc-musl = "elf-tls"
+
+# "gbm" requires "dri", "opengl"
+PACKAGECONFIG[gbm] = "-Dgbm=true,-Dgbm=false"
-X11_DEPS = "xf86driproto glproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes"
-PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}"
-PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc"
-PACKAGECONFIG[wayland] = ",,wayland-native wayland"
+X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr"
+# "x11" requires "opengl"
+PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}"
+PACKAGECONFIG[elf-tls] = "-Delf-tls=true, -Delf-tls=false"
+PACKAGECONFIG[xvmc] = "-Dgallium-xvmc=true,-Dgallium-xvmc=false,libxvmc"
+PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
-DRIDRIVERS = "swrast"
-DRIDRIVERS_append_x86 = ",radeon,r200,nouveau,i965,i915"
-DRIDRIVERS_append_x86-64 = ",radeon,r200,nouveau,i965,i915"
-PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, --disable-dri, dri2proto libdrm"
-PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, dri3proto presentproto libxshmfence"
+DRIDRIVERS_class-native = "swrast"
+DRIDRIVERS_class-nativesdk = "swrast"
+DRIDRIVERS_append_x86_class-target = ",r100,r200,nouveau,i965,i915"
+DRIDRIVERS_append_x86-64_class-target = ",r100,r200,nouveau,i965,i915"
+# "dri" requires "opengl"
+PACKAGECONFIG[dri] = "-Ddri=true -Ddri-drivers=${DRIDRIVERS}, -Ddri=false -Ddri-drivers='', xorgproto libdrm"
+PACKAGECONFIG[dri3] = "-Ddri3=true, -Ddri3=false, xorgproto libxshmfence"
-PACKAGECONFIG[gles] = "--enable-gles1 --enable-gles2, --disable-gles1 --disable-gles2"
+# Vulkan drivers need dri3 enabled
+# radeon could be enabled as well but requires gallium-llvm with llvm >= 3.9
+VULKAN_DRIVERS = ""
+VULKAN_DRIVERS_append_x86_class-target = ",intel"
+VULKAN_DRIVERS_append_x86-64_class-target = ",intel"
+PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${VULKAN_DRIVERS}, -Dvulkan-drivers='',"
-EGL_PLATFORMS = "drm"
-EGL_PLATFORMS .="${@bb.utils.contains('PACKAGECONFIG', 'x11', ',x11', '', d)}"
-EGL_PLATFORMS .="${@bb.utils.contains('PACKAGECONFIG', 'wayland', ',wayland', '', d)}"
-PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=${EGL_PLATFORMS}, --disable-egl"
+PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
+
+# "gles" requires "opengl"
+PACKAGECONFIG[gles] = "-Dgles1=true -Dgles2=true, -Dgles1=false -Dgles2=false"
+
+# "egl" requires "dri", "opengl"
+PACKAGECONFIG[egl] = "-Degl=true, -Degl=false"
+
+PACKAGECONFIG[etnaviv] = ""
+PACKAGECONFIG[freedreno] = ""
+PACKAGECONFIG[kmsro] = ""
+PACKAGECONFIG[vc4] = ""
+PACKAGECONFIG[v3d] = ""
GALLIUMDRIVERS = "swrast"
-GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', 'radeonsi,r600', '', d)}"
-PACKAGECONFIG[r600] = ""
-GALLIUMDRIVERS_LLVM33_ENABLED = "${@base_version_less_or_equal('MESA_LLVM_RELEASE', '3.2', False, len('${GALLIUMDRIVERS_LLVM33}') > 0, d)}"
+# gallium swrast was found to crash Xorg on startup in x32 qemu
+GALLIUMDRIVERS_x86-x32 = ""
+
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'kmsro', ',kmsro', '', d)}"
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'vc4', ',vc4', '', d)}"
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}"
+
+# radeonsi requires LLVM
+GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}"
+GALLIUMDRIVERS_LLVM33_ENABLED = "${@oe.utils.version_less_or_equal('MESA_LLVM_RELEASE', '3.2', False, len('${GALLIUMDRIVERS_LLVM33}') > 0, d)}"
GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${@',${GALLIUMDRIVERS_LLVM33}' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
-GALLIUMDRIVERS_append_x86 = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
-GALLIUMDRIVERS_append_x86-64 = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
-# keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers
-PACKAGECONFIG[gallium] = "--with-gallium-drivers=${GALLIUMDRIVERS}, --without-gallium-drivers"
-MESA_LLVM_RELEASE ?= "3.3"
-PACKAGECONFIG[gallium-llvm] = "--enable-gallium-llvm --enable-llvm-shared-libs, --disable-gallium-llvm, llvm${MESA_LLVM_RELEASE} \
+
+PACKAGECONFIG[r600] = ""
+
+GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}"
+GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}"
+GALLIUMDRIVERS_append = ",virgl"
+
+PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS}, -Dgallium-drivers=''"
+PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true, -Dllvm=false, llvm${MESA_LLVM_RELEASE} llvm-native \
${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
-export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}"
-PACKAGECONFIG[xa] = "--enable-xa, --disable-xa"
+PACKAGECONFIG[xa] = "-Dgallium-xa=true, -Dgallium-xa=false"
+
+PACKAGECONFIG[lima] = ""
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}"
+
+PACKAGECONFIG[panfrost] = ""
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'panfrost', ',panfrost', '', d)}"
-# Mesa requires one of the following crypto implementation, pick one of them
-MESA_CRYPTO ??= "openssl"
-PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl"
-PACKAGECONFIG[nettle] = "--with-sha1=libnettle,,nettle"
-PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt"
+OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium', 'classic', d)}"
+PACKAGECONFIG[osmesa] = "-Dosmesa=${OSMESA},-Dosmesa=none"
+
+PACKAGECONFIG[unwind] = "-Dlibunwind=true,-Dlibunwind=false,libunwind"
+
+# mesa tries to run cross-built gen_matypes on build machine to get struct size information
+EXTRA_OEMESON_append = " -Dasm=false"
# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
-# Multiple virtual/gl providers being built breaks staging
-EXCLUDE_FROM_WORLD = "1"
+CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS"
# Remove the mesa dependency on mesa-dev, as mesa is empty
RDEPENDS_${PN}-dev = ""
+# Add dependency so that GLES3 header don't need to be added manually
+RDEPENDS_libgles2-mesa-dev += "libgles3-mesa-dev"
+
PACKAGES =+ "libegl-mesa libegl-mesa-dev \
libosmesa libosmesa-dev \
libgl-mesa libgl-mesa-dev \
@@ -87,10 +175,8 @@ PACKAGES =+ "libegl-mesa libegl-mesa-dev \
libgles1-mesa libgles1-mesa-dev \
libgles2-mesa libgles2-mesa-dev \
libgles3-mesa libgles3-mesa-dev \
- libwayland-egl libwayland-egl-dev \
- libxvmcsoftpipe libxvmcsoftpipe-dev \
libxatracker libxatracker-dev \
- mesa-megadriver \
+ mesa-megadriver mesa-vulkan-drivers \
"
do_install_append () {
@@ -99,16 +185,20 @@ do_install_append () {
rm -f ${D}${libdir}/egl/*.la
rm -f ${D}${libdir}/gallium-pipe/*.la
rm -f ${D}${libdir}/gbm/*.la
-
+
# it was packaged in libdricore9.1.3-1 and preventing upgrades when debian.bbclass was used
- rm -f ${D}${sysconfdir}/drirc
+ chrpath --delete ${D}${libdir}/dri/*_dri.so || true
+
+ # libwayland-egl has been moved to wayland 1.15+
+ rm -f ${D}${libdir}/libwayland-egl*
+ rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc
}
# For the packages that make up the OpenGL interfaces, inject variables so that
# they don't get Debian-renamed (which would remove the -mesa suffix), and
# RPROVIDEs/RCONFLICTs on the generic libgl name.
python __anonymous() {
- pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
+ pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
for p in (("egl", "libegl", "libegl1"),
("dri", "libgl", "libgl1"),
("gles", "libgles1", "libglesv1-cm1"),
@@ -142,28 +232,28 @@ python mesa_populate_packages() {
d.setVar("RREPLACES_%s" % pkg, pkg.replace("mesa", "mesa-dri", 1))
import re
- dri_drivers_root = oe.path.join(d.getVar('PKGD', True), d.getVar('libdir', True), "dri")
+ dri_drivers_root = oe.path.join(d.getVar('PKGD'), d.getVar('libdir'), "dri")
if os.path.isdir(dri_drivers_root):
dri_pkgs = os.listdir(dri_drivers_root)
lib_name = d.expand("${MLPREFIX}mesa-megadriver")
for p in dri_pkgs:
- m = re.match('^(.*)_dri\.so$', p)
+ m = re.match(r'^(.*)_dri\.so$', p)
if m:
pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1))
d.appendVar("RPROVIDES_%s" % lib_name, pkg_name)
d.appendVar("RCONFLICTS_%s" % lib_name, pkg_name)
d.appendVar("RREPLACES_%s" % lib_name, pkg_name)
- pipe_drivers_root = os.path.join(d.getVar('libdir', True), "gallium-pipe")
- do_split_packages(d, pipe_drivers_root, '^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='')
+ pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe")
+ do_split_packages(d, pipe_drivers_root, r'^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='')
}
PACKAGESPLITFUNCS_prepend = "mesa_populate_packages "
PACKAGES_DYNAMIC += "^mesa-driver-.*"
-FILES_${PN} += "${sysconfdir}/drirc"
-FILES_mesa-megadriver = "${libdir}/dri/*"
+FILES_mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d/00-mesa-defaults.conf"
+FILES_mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${datadir}/vulkan"
FILES_libegl-mesa = "${libdir}/libEGL.so.*"
FILES_libgbm = "${libdir}/libgbm.so.*"
FILES_libgles1-mesa = "${libdir}/libGLESv1*.so.*"
@@ -171,11 +261,9 @@ FILES_libgles2-mesa = "${libdir}/libGLESv2.so.*"
FILES_libgl-mesa = "${libdir}/libGL.so.*"
FILES_libglapi = "${libdir}/libglapi.so.*"
FILES_libosmesa = "${libdir}/libOSMesa.so.*"
-FILES_libwayland-egl = "${libdir}/libwayland-egl.so.*"
-FILES_libxvmcsoftpipe = "${libdir}/libXvMCsoftpipe.so.*"
FILES_libxatracker = "${libdir}/libxatracker.so.*"
-FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc"
+FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan"
FILES_libegl-mesa-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
FILES_libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h"
FILES_libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc"
@@ -183,9 +271,12 @@ FILES_libglapi-dev = "${libdir}/libglapi.*"
FILES_libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
FILES_libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc"
FILES_libgles3-mesa-dev = "${includedir}/GLES3"
-FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
-FILES_libwayland-egl-dev = "${libdir}/pkgconfig/wayland-egl.pc ${libdir}/libwayland-egl.*"
-FILES_libxvmcsoftpipe-dev = "${libdir}/libXvMCsoftpipe.so ${libdir}/libXvMCsoftpipe.la"
+FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
FILES_libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
${libdir}/pkgconfig/xatracker.pc"
+
+# Fix upgrade path from mesa to mesa-megadriver
+RREPLACES_mesa-megadriver = "mesa"
+RCONFLICTS_mesa-megadriver = "mesa"
+RPROVIDES_mesa-megadriver = "mesa"
diff --git a/meta/recipes-graphics/mesa/mesa_12.0.1.bb b/meta/recipes-graphics/mesa/mesa_12.0.1.bb
deleted file mode 100644
index 80189e3ff1..0000000000
--- a/meta/recipes-graphics/mesa/mesa_12.0.1.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/mesa-${PV}.tar.xz \
- file://replace_glibc_check_with_linux.patch \
- file://clang-compile-PR89599.patch \
- file://disable-asm-on-non-gcc.patch \
-"
-
-SRC_URI[md5sum] = "972fd5ad5a63aeabf173fb9adefc6522"
-SRC_URI[sha256sum] = "bab24fb79f78c876073527f515ed871fc9c81d816f66c8a0b051d8d653896389"
-
-#because we cannot rely on the fact that all apps will use pkgconfig,
-#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
-do_install_append() {
- if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
- sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
- fi
-}
diff --git a/meta/recipes-graphics/mesa/mesa_19.2.4.bb b/meta/recipes-graphics/mesa/mesa_19.2.4.bb
new file mode 100644
index 0000000000..f4b33df227
--- /dev/null
+++ b/meta/recipes-graphics/mesa/mesa_19.2.4.bb
@@ -0,0 +1,21 @@
+require ${BPN}.inc
+
+SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
+ file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
+ file://0002-meson.build-make-TLS-ELF-optional.patch \
+ file://0003-Allow-enable-DRI-without-DRI-drivers.patch \
+ file://0004-Revert-mesa-Enable-asm-unconditionally-now-that-gen_.patch \
+ "
+
+SRC_URI[md5sum] = "5c047732b81651ddb341597528b4b096"
+SRC_URI[sha256sum] = "09000a0f7dbbd82e193b81a8f1bf0c118eab7ca975c0329181968596e548e30f"
+
+UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
+
+#because we cannot rely on the fact that all apps will use pkgconfig,
+#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
+do_install_append() {
+ if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
+ sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+ fi
+}
diff --git a/meta/recipes-graphics/mesa/mesa_git.bb b/meta/recipes-graphics/mesa/mesa_git.bb
deleted file mode 100644
index c0345178c4..0000000000
--- a/meta/recipes-graphics/mesa/mesa_git.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-require ${BPN}.inc
-
-DEFAULT_PREFERENCE = "-1"
-
-SRCREV = "ea0d1f575c214c09ba3df12644a960e86e031766"
-PV = "10.5.4+git${SRCPV}"
-
-SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;branch=10.5"
-
-S = "${WORKDIR}/git"
-
-DEPENDS += "python-mako-native"
-
-inherit pythonnative
-
-#because we cannot rely on the fact that all apps will use pkgconfig,
-#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
-do_install_append() {
- if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
- sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
- fi
-}