All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Mesa improvements
@ 2019-05-02 18:09 Marco Felsch
  2019-05-02 18:09 ` [PATCH v2 1/4] mesa: Convert recipe to use meson build system Marco Felsch
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Marco Felsch @ 2019-05-02 18:09 UTC (permalink / raw)
  To: fabio.berton, openembedded-core

Hi,

this series covers a few changes made by mesa-19. Since now mesa uses
meson as build system. This switch is covered by Fabio's patch.

Futhermore the imx gallium targets gets squashed into the kmsro target.

At last the gallium swrast and virgl shouldn't be build per default.

Fabio Berton (1):
  mesa: Convert recipe to use meson build system

Marco Felsch (3):
  mesa: fix imx gallium driver PACKAGECONFIG option
  mesa: make gallium swrast target optional
  mesa: make gallium virgl optional

 ...0001-Simplify-wayland-scanner-lookup.patch | 44 ----------
 ...k-for-all-linux-host_os-combinations.patch | 41 +++++++++
 ...-winsys-svga-drm-Include-sys-types.h.patch | 35 --------
 ...M-version-when-using-LLVM-Git-releas.patch | 45 ----------
 ...R-for-defining-WAYLAND_PROTOCOLS_DAT.patch | 38 ---------
 meta/recipes-graphics/mesa/mesa.inc           | 84 +++++++++----------
 meta/recipes-graphics/mesa/mesa_19.0.1.bb     |  5 +-
 7 files changed, 83 insertions(+), 209 deletions(-)
 delete mode 100644 meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch
 create mode 100644 meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
 delete mode 100644 meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch
 delete mode 100644 meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch
 delete mode 100644 meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch

-- 
2.20.1



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 1/4] mesa: Convert recipe to use meson build system
  2019-05-02 18:09 [PATCH v2 0/4] Mesa improvements Marco Felsch
@ 2019-05-02 18:09 ` Marco Felsch
  2019-05-03 10:19   ` Alexander Kanavin
  2019-05-02 18:09 ` [PATCH v2 2/4] mesa: fix imx gallium driver PACKAGECONFIG option Marco Felsch
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Marco Felsch @ 2019-05-02 18:09 UTC (permalink / raw)
  To: fabio.berton, openembedded-core; +Cc: Jussi Kukkonen, Otavio Salvador

From: Fabio Berton <fabio.berton@ossystems.com.br>

- Remove all non related meson patches
  - Change radeon driver to r100
  - Add python3-mako-native and gettext-native to DEPENDS

Based on https://patchwork.openembedded.org/patch/158748/

Upstream-Status: Submitted [openembedded-core@lists.openembedded.org]

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
[m.felsch@pengutronix.de: rebased on top of oe-core master-next]
[m.felsch@pengutronix.de: add upstream-status line]
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
Changelog:

v2:
- new patch

 ...0001-Simplify-wayland-scanner-lookup.patch | 44 --------------
 ...k-for-all-linux-host_os-combinations.patch | 41 +++++++++++++
 ...-winsys-svga-drm-Include-sys-types.h.patch | 35 -----------
 ...M-version-when-using-LLVM-Git-releas.patch | 45 --------------
 ...R-for-defining-WAYLAND_PROTOCOLS_DAT.patch | 38 ------------
 meta/recipes-graphics/mesa/mesa.inc           | 59 +++++++++----------
 meta/recipes-graphics/mesa/mesa_19.0.1.bb     |  5 +-
 7 files changed, 69 insertions(+), 198 deletions(-)
 delete mode 100644 meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch
 create mode 100644 meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
 delete mode 100644 meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch
 delete mode 100644 meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch
 delete mode 100644 meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch

diff --git a/meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch b/meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch
deleted file mode 100644
index d065e2285c..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From e53837ad7b01364f34a533b95f4817c1795789de Mon Sep 17 00:00:00 2001
-From: Fabio Berton <fabio.berton@ossystems.com.br>
-Date: Wed, 20 Feb 2019 16:17:00 -0300
-Subject: [PATCH 1/4] Simplify wayland-scanner lookup
-Organization: O.S. Systems Software LTDA.
-
-Don't use pkg-config to lookup the path of a binary that's in the path.
-
-Alternatively we'd have to prefix the path returned by pkg-config with
-PKG_CONFIG_SYSROOT_DIR.
-
-Upstream-Status: Pending
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
----
- configure.ac | 7 +------
- 1 file changed, 1 insertion(+), 6 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 1ef68fe68e6..1816a4cd475 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1854,16 +1854,11 @@ for plat in $platforms; do
-         fi
-         WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
- 
--        PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
--                          WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
--                          WAYLAND_SCANNER='')
-         PKG_CHECK_EXISTS([wayland-scanner >= 1.15],
-                           AC_SUBST(SCANNER_ARG, 'private-code'),
-                           AC_SUBST(SCANNER_ARG, 'code'))
- 
--        if test "x$WAYLAND_SCANNER" = x; then
--            AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
--        fi
-+        AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
- 
-         if test "x$WAYLAND_SCANNER" = "x:"; then
-                 AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
--- 
-2.21.0
-
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..23e207aebf
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
@@ -0,0 +1,41 @@
+From 021c24931367c83b62c550d1a296b0e9676726c0 Mon Sep 17 00:00:00 2001
+From: Fabio Berton <fabio.berton@ossystems.com.br>
+Date: Fri, 15 Mar 2019 17:42:50 -0300
+Subject: [PATCH] meson.build: check for all linux host_os combinations
+Organization: O.S. Systems Software LTDA.
+
+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.
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ meson.build | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 9272590201d..56465513da9 100644
+--- a/meson.build
++++ b/meson.build
+@@ -89,7 +89,7 @@ if (with_gles1 or with_gles2) and not with_opengl
+   error('building OpenGL ES without OpenGL is not supported.')
+ endif
+ 
+-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly', 'linux'].contains(host_machine.system())
++system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux')
+ 
+ _drivers = get_option('dri-drivers')
+ if _drivers.contains('auto')
+@@ -792,7 +792,7 @@ if cc.compiles('int foo(void) __attribute__((__noreturn__));',
+ endif
+ 
+ # TODO: this is very incomplete
+-if ['linux', 'cygwin', 'gnu'].contains(host_machine.system())
++if ['cygwin', 'gnu'].contains(host_machine.system()) or host_machine.system().startswith('linux')
+   pre_args += '-D_GNU_SOURCE'
+ endif
+ 
+-- 
+2.21.0
+
diff --git a/meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch b/meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch
deleted file mode 100644
index aaeb0f11ba..0000000000
--- a/meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From f212b6bed4bf265aec069c21cdc4b7c2d9cb32df Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 16 Aug 2017 18:58:20 -0700
-Subject: [PATCH 2/4] winsys/svga/drm: Include sys/types.h
-Organization: O.S. Systems Software LTDA.
-
-vmw_screen.h uses dev_t which is defines in sys/types.h
-this header is required to be included for getting dev_t
-definition. This issue happens on musl C library, it is hidden
-on glibc since sys/types.h is included through another
-system headers
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Backport [7dfdfbf8c37e52e7b9b09f7d1d434edad3ebc864]
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
----
- src/gallium/winsys/svga/drm/vmw_screen.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/gallium/winsys/svga/drm/vmw_screen.h b/src/gallium/winsys/svga/drm/vmw_screen.h
-index a87c087d9c5..cb34fec48e7 100644
---- a/src/gallium/winsys/svga/drm/vmw_screen.h
-+++ b/src/gallium/winsys/svga/drm/vmw_screen.h
-@@ -41,6 +41,7 @@
- #include "svga_winsys.h"
- #include "pipebuffer/pb_buffer_fenced.h"
- #include <os/os_thread.h>
-+#include <sys/types.h>
- 
- #define VMW_GMR_POOL_SIZE (16*1024*1024)
- #define VMW_QUERY_POOL_SIZE (8192)
--- 
-2.21.0
-
diff --git a/meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch b/meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch
deleted file mode 100644
index 96edc2172b..0000000000
--- a/meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From ce7b9ff6517fda089f296b2af2c1c49604872514 Mon Sep 17 00:00:00 2001
-From: Otavio Salvador <otavio@ossystems.com.br>
-Date: Tue, 5 Jun 2018 11:11:10 -0300
-Subject: [PATCH 3/4] Properly get LLVM version when using LLVM Git releases
-Organization: O.S. Systems Software LTDA.
-
-$ llvm-config-host --version
-5.0.0git-9a5c333388c
-
-We need to ignore everything after 5.0.0 which is what the cut cmd is
-doing
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 1816a4cd475..13fed9daf59 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1124,7 +1124,7 @@ strip_unwanted_llvm_flags() {
- 
- llvm_set_environment_variables() {
-     if test "x$LLVM_CONFIG" != xno; then
--        LLVM_VERSION=`$LLVM_CONFIG --version | egrep -o '^[[0-9.]]+'`
-+        LLVM_VERSION=`$LLVM_CONFIG --version | cut -c1-5`
-         LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
-         LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
-         LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
-@@ -2870,7 +2870,7 @@ detect_old_buggy_llvm() {
-     dnl ourselves.
-     dnl (See https://llvm.org/bugs/show_bug.cgi?id=6823)
-     dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
--    LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
-+    LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version | cut -c1-5`
-     AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes])
- 
-     if test "x$llvm_have_one_so" = xyes; then
--- 
-2.21.0
-
diff --git a/meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch b/meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch
deleted file mode 100644
index 45bcd466a3..0000000000
--- a/meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 5489e1d22e18740a1924628c5c97096d48dcfbf8 Mon Sep 17 00:00:00 2001
-From: Fabio Berton <fabio.berton@ossystems.com.br>
-Date: Fri, 15 Feb 2019 10:57:06 -0200
-Subject: [PATCH 4/4] use PKG_CHECK_VAR for defining WAYLAND_PROTOCOLS_DATADIR
-Organization: O.S. Systems Software LTDA.
-
-This allows to override the wayland-protocols pkgdatadir with the
-WAYLAND_PROTOCOLS_DATADIR from environment.
-
-pkgconfig would return an absolute path in
-/usr/share/wayland-protocols
-for the pkgdatadir value, which is not suitable for cross-compiling.
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 13fed9daf59..6cff8afb7cf 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1852,7 +1852,7 @@ for plat in $platforms; do
-         if test "x$enable_egl" = xyes; then
-           PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl-backend >= $WAYLAND_EGL_BACKEND_REQUIRED])
-         fi
--        WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
-+        PKG_CHECK_VAR([WAYLAND_PROTOCOLS_DATADIR], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED], pkgdatadir)
- 
-         PKG_CHECK_EXISTS([wayland-scanner >= 1.15],
-                           AC_SUBST(SCANNER_ARG, 'private-code'),
--- 
-2.21.0
-
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index ece74974b5..675b57b9cb 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c
 
 PE = "2"
 
-DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native"
+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)} \
@@ -24,7 +24,7 @@ PROVIDES = " \
     virtual/mesa \
     "
 
-inherit autotools pkgconfig python3native gettext distro_features_check
+inherit meson pkgconfig python3native gettext distro_features_check
 
 BBCLASSEXTEND = "native nativesdk"
 
@@ -34,16 +34,14 @@ PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \
                ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)} \
                surfaceless"
 
-export LLVM_CONFIG = "${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE}"
 export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config"
 export YOCTO_ALTERNATE_MULTILIB_NAME = "${base_libdir}"
-EXTRA_OECONF = "--enable-shared-glapi \
-                --disable-opencl \
-                --enable-glx-read-only-text \
-                PYTHON2=python2 \
-                --with-llvm-prefix=${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE} \
-                --with-platforms='${PLATFORMS}' \
-                --enable-autotools \
+
+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)} \
@@ -55,36 +53,36 @@ PACKAGECONFIG_class-native ?= "gbm dri egl opengl"
 PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl"
 
 # "gbm" requires "dri", "opengl"
-PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm"
+PACKAGECONFIG[gbm] = "-Dgbm=true,-Dgbm=false"
 
 X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr"
 # "x11" requires "opengl"
-PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}"
-PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc"
+PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}"
+PACKAGECONFIG[xvmc] = "-Dgallium-xvmc=true,-Dgallium-xvmc=false,libxvmc"
 PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
 
 DRIDRIVERS_class-native = "swrast"
 DRIDRIVERS_class-nativesdk = "swrast"
-DRIDRIVERS_append_x86_class-target = ",radeon,r200,nouveau,i965,i915"
-DRIDRIVERS_append_x86-64_class-target = ",radeon,r200,nouveau,i965,i915"
+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] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, --disable-dri, xorgproto libdrm"
-PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, xorgproto libxshmfence"
+PACKAGECONFIG[dri] = "-Ddri-drivers=${DRIDRIVERS}, -Ddri-drivers='', xorgproto libdrm"
+PACKAGECONFIG[dri3] = "-Ddri3=true, -Ddri3=false, xorgproto libxshmfence"
 
 # 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] = "--with-vulkan-drivers=${VULKAN_DRIVERS}, --without-vulkan-drivers, python3-mako-native"
+PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${VULKAN_DRIVERS}, -Dvulkan-drivers='',"
 
-PACKAGECONFIG[opengl] = "--enable-opengl, --disable-opengl"
+PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
 
 # "gles" requires "opengl"
-PACKAGECONFIG[gles] = "--enable-gles1 --enable-gles2, --disable-gles1 --disable-gles2"
+PACKAGECONFIG[gles] = "-Dgles1=true -Dgles2=true, -Dgles1=false -Dgles2=false"
 
 # "egl" requires "dri", "opengl"
-PACKAGECONFIG[egl] = "--enable-egl, --disable-egl"
+PACKAGECONFIG[egl] = "-Degl=true, -Degl=false"
 
 PACKAGECONFIG[etnaviv] = ""
 PACKAGECONFIG[imx] = ""
@@ -105,27 +103,25 @@ GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600',
 GALLIUMDRIVERS_append = ",virgl"
 
 # 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"
+PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS}, -Dgallium-drivers=''"
 MESA_LLVM_RELEASE ?= "8.0.0"
-PACKAGECONFIG[gallium-llvm] = "--enable-llvm --enable-llvm-shared-libs, --disable-llvm, llvm${MESA_LLVM_RELEASE} llvm-native \
+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"
 
-OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium-osmesa', 'osmesa', d)}"
-PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}"
+OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium', 'classic', d)}"
+PACKAGECONFIG[osmesa] = "-Dosmesa=${OSMESA},-Dosmesa=none"
 
-PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
+PACKAGECONFIG[unwind] = "-Dlibunwind=true,-Dlibunwind=false,libunwind"
 
-EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls"
-EXTRA_OECONF_append_libc-musl = " --disable-glx-tls"
-EXTRA_OECONF_append_libc-musl_x86 = " --disable-asm"
+# 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"
 
 CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS"
-EXTRA_OEMAKE += "WAYLAND_PROTOCOLS_DATADIR=${STAGING_DATADIR}/wayland-protocols"
 
 # Remove the mesa dependency on mesa-dev, as mesa is empty
 RDEPENDS_${PN}-dev = ""
@@ -158,7 +154,6 @@ do_install_append () {
     # libwayland-egl has been moved to wayland 1.15+
     rm -f ${D}${libdir}/libwayland-egl*
     rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc
-    rmdir --ignore-fail-on-non-empty ${D}${libdir}/pkgconfig
 }
 
 # For the packages that make up the OpenGL interfaces, inject variables so that
diff --git a/meta/recipes-graphics/mesa/mesa_19.0.1.bb b/meta/recipes-graphics/mesa/mesa_19.0.1.bb
index d90be8a074..c6258d66aa 100644
--- a/meta/recipes-graphics/mesa/mesa_19.0.1.bb
+++ b/meta/recipes-graphics/mesa/mesa_19.0.1.bb
@@ -1,10 +1,7 @@
 require ${BPN}.inc
 
 SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
-           file://0001-Simplify-wayland-scanner-lookup.patch \
-           file://0002-winsys-svga-drm-Include-sys-types.h.patch \
-           file://0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch \
-           file://0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch \
+           file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
 "
 
 SRC_URI[md5sum] = "19636bb3da35c21f43040d31e575d5ce"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 2/4] mesa: fix imx gallium driver PACKAGECONFIG option
  2019-05-02 18:09 [PATCH v2 0/4] Mesa improvements Marco Felsch
  2019-05-02 18:09 ` [PATCH v2 1/4] mesa: Convert recipe to use meson build system Marco Felsch
@ 2019-05-02 18:09 ` Marco Felsch
  2019-05-02 18:09 ` [PATCH v2 3/4] mesa: make gallium swrast target optional Marco Felsch
  2019-05-02 18:09 ` [PATCH v2 4/4] mesa: make gallium virgl optional Marco Felsch
  3 siblings, 0 replies; 10+ messages in thread
From: Marco Felsch @ 2019-05-02 18:09 UTC (permalink / raw)
  To: fabio.berton, openembedded-core

Since commit [1] the imx-drm driver is covered by the generic kmsro
driver.

[1] https://gitlab.freedesktop.org/mesa/mesa/commit/ \
	41a0acd6a149ec9f47ea527ad08a2b29bf1ee6b2

Upstream-Status: Submitted [openembedded-core@lists.openembedded.org]

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
Changelog:

v2:
- added Upstream-Status line

 meta/recipes-graphics/mesa/mesa.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 675b57b9cb..7516a06639 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -85,11 +85,11 @@ PACKAGECONFIG[gles] = "-Dgles1=true -Dgles2=true, -Dgles1=false -Dgles2=false"
 PACKAGECONFIG[egl] = "-Degl=true, -Degl=false"
 
 PACKAGECONFIG[etnaviv] = ""
-PACKAGECONFIG[imx] = ""
+PACKAGECONFIG[kmsro] = ""
 
 GALLIUMDRIVERS = "swrast"
 GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
-GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'imx', ',imx', '', d)}"
+GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'kmsro', ',kmsro', '', d)}"
 
 # radeonsi requires LLVM
 GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 3/4] mesa: make gallium swrast target optional
  2019-05-02 18:09 [PATCH v2 0/4] Mesa improvements Marco Felsch
  2019-05-02 18:09 ` [PATCH v2 1/4] mesa: Convert recipe to use meson build system Marco Felsch
  2019-05-02 18:09 ` [PATCH v2 2/4] mesa: fix imx gallium driver PACKAGECONFIG option Marco Felsch
@ 2019-05-02 18:09 ` Marco Felsch
  2019-05-09 13:28   ` Ulrich Ölmann
  2019-05-02 18:09 ` [PATCH v2 4/4] mesa: make gallium virgl optional Marco Felsch
  3 siblings, 1 reply; 10+ messages in thread
From: Marco Felsch @ 2019-05-02 18:09 UTC (permalink / raw)
  To: fabio.berton, openembedded-core

Most the time we are compiling for embedded targets which have dedicated
hardware combinations. Setting swrast default on isn't a good solution
for such devices because if the hardware render node have an issue or
don't support a special format/request mesa will fallback to the
software renderer. This will make it harder to debug performace issues.

A better way is to let the user deciced if a software renderer is
needed e.g. if the system has no hardware renderer or to have such a
fallback device. This way the user knows that the software renderer is
enabled.

Upstream-Status: Submitted [openembedded-core@lists.openembedded.org]

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
Changelog:

v2:
- added Upstream-Status line
- fix leading comma

 meta/recipes-graphics/mesa/mesa.inc | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 7516a06639..b41d3054c3 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -86,24 +86,27 @@ PACKAGECONFIG[egl] = "-Degl=true, -Degl=false"
 
 PACKAGECONFIG[etnaviv] = ""
 PACKAGECONFIG[kmsro] = ""
+PACKAGECONFIG[swrast] = ""
 
-GALLIUMDRIVERS = "swrast"
-GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
-GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'kmsro', ',kmsro', '', d)}"
+GALLIUMDRIVERS = ""
+GALLIUMDRIVERS +="${@bb.utils.contains('PACKAGECONFIG', 'swrast', 'swrast', '', d)}"
+GALLIUMDRIVERS +="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', 'etnaviv', '', d)}"
+GALLIUMDRIVERS +="${@bb.utils.contains('PACKAGECONFIG', 'kmsro', 'kmsro', '', d)}"
 
 # radeonsi requires LLVM
-GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}"
+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_LLVM = "r300 svga nouveau ${@'${GALLIUMDRIVERS_LLVM33}' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
 
 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"
+GALLIUMDRIVERS += "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${GALLIUMDRIVERS_LLVM}', '', d)}"
+GALLIUMDRIVERS += "${@bb.utils.contains('PACKAGECONFIG', 'r600', 'r600', '', d)}"
+GALLIUMDRIVERS += "virgl"
+GALLIUMDRIVERS_MESON = "${@",".join("${GALLIUMDRIVERS}".split())}"
 
 # keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers
-PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS}, -Dgallium-drivers=''"
+PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS_MESON}, -Dgallium-drivers=''"
 MESA_LLVM_RELEASE ?= "8.0.0"
 PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true, -Dllvm=false, llvm${MESA_LLVM_RELEASE} llvm-native \
                                ${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 4/4] mesa: make gallium virgl optional
  2019-05-02 18:09 [PATCH v2 0/4] Mesa improvements Marco Felsch
                   ` (2 preceding siblings ...)
  2019-05-02 18:09 ` [PATCH v2 3/4] mesa: make gallium swrast target optional Marco Felsch
@ 2019-05-02 18:09 ` Marco Felsch
  2019-05-03 10:17   ` Alexander Kanavin
  3 siblings, 1 reply; 10+ messages in thread
From: Marco Felsch @ 2019-05-02 18:09 UTC (permalink / raw)
  To: fabio.berton, openembedded-core

Same as for the swrast target it isn't a good solution to enable the
target per default since we compiling for embedded targets most the
time. Make this target optional to save some memory.

Upstream-Status: Submitted [openembedded-core@lists.openembedded.org]

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
Changelog:

v2:
- new patch

 meta/recipes-graphics/mesa/mesa.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index b41d3054c3..6a55848c8a 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -87,6 +87,8 @@ PACKAGECONFIG[egl] = "-Degl=true, -Degl=false"
 PACKAGECONFIG[etnaviv] = ""
 PACKAGECONFIG[kmsro] = ""
 PACKAGECONFIG[swrast] = ""
+PACKAGECONFIG[r600] = ""
+PACKAGECONFIG[virgl] = ""
 
 GALLIUMDRIVERS = ""
 GALLIUMDRIVERS +="${@bb.utils.contains('PACKAGECONFIG', 'swrast', 'swrast', '', d)}"
@@ -98,11 +100,9 @@ GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', 'radeonsi
 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 ''}"
 
-PACKAGECONFIG[r600] = ""
-
 GALLIUMDRIVERS += "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${GALLIUMDRIVERS_LLVM}', '', d)}"
 GALLIUMDRIVERS += "${@bb.utils.contains('PACKAGECONFIG', 'r600', 'r600', '', d)}"
-GALLIUMDRIVERS += "virgl"
+GALLIUMDRIVERS += "${@bb.utils.contains('PACKAGECONFIG', 'virgl', 'virgl', '', d)}"
 GALLIUMDRIVERS_MESON = "${@",".join("${GALLIUMDRIVERS}".split())}"
 
 # keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 4/4] mesa: make gallium virgl optional
  2019-05-02 18:09 ` [PATCH v2 4/4] mesa: make gallium virgl optional Marco Felsch
@ 2019-05-03 10:17   ` Alexander Kanavin
  2019-05-06  5:52     ` Marco Felsch
  0 siblings, 1 reply; 10+ messages in thread
From: Alexander Kanavin @ 2019-05-03 10:17 UTC (permalink / raw)
  To: Marco Felsch; +Cc: OE-core

On Thu, 2 May 2019 at 20:09, Marco Felsch <m.felsch@pengutronix.de> wrote:
> Same as for the swrast target it isn't a good solution to enable the
> target per default since we compiling for embedded targets most the
> time. Make this target optional to save some memory.

This will probably break virgl oe-selftests as they expect target mesa
to be configured with virgl.
Try 'oe-selftest -r runtime_test.TestImage.test_testimage_virgl_gtk'
and 'oe-selftest -r
runtime_test.TestImage.test_testimage_virgl_headless'

You can address this by setting PACKAGECONFIG_append_qemuall = " virgl".


> Upstream-Status: Submitted [openembedded-core@lists.openembedded.org]

This is not necessary. It is only used for patches to the recipes that
live as files in the layer tree.

Alex


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 1/4] mesa: Convert recipe to use meson build system
  2019-05-02 18:09 ` [PATCH v2 1/4] mesa: Convert recipe to use meson build system Marco Felsch
@ 2019-05-03 10:19   ` Alexander Kanavin
  2019-05-06  5:56     ` Marco Felsch
  0 siblings, 1 reply; 10+ messages in thread
From: Alexander Kanavin @ 2019-05-03 10:19 UTC (permalink / raw)
  To: Marco Felsch; +Cc: Otavio Salvador, OE-core

Does this address the musl failure that was seen with the previous
iteration of the patch?
http://lists.openembedded.org/pipermail/openembedded-core/2019-April/281620.html

Alex

On Thu, 2 May 2019 at 20:10, Marco Felsch <m.felsch@pengutronix.de> wrote:
>
> From: Fabio Berton <fabio.berton@ossystems.com.br>
>
> - Remove all non related meson patches
>   - Change radeon driver to r100
>   - Add python3-mako-native and gettext-native to DEPENDS
>
> Based on https://patchwork.openembedded.org/patch/158748/
>
> Upstream-Status: Submitted [openembedded-core@lists.openembedded.org]
>
> Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
> [m.felsch@pengutronix.de: rebased on top of oe-core master-next]
> [m.felsch@pengutronix.de: add upstream-status line]
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> Changelog:
>
> v2:
> - new patch
>
>  ...0001-Simplify-wayland-scanner-lookup.patch | 44 --------------
>  ...k-for-all-linux-host_os-combinations.patch | 41 +++++++++++++
>  ...-winsys-svga-drm-Include-sys-types.h.patch | 35 -----------
>  ...M-version-when-using-LLVM-Git-releas.patch | 45 --------------
>  ...R-for-defining-WAYLAND_PROTOCOLS_DAT.patch | 38 ------------
>  meta/recipes-graphics/mesa/mesa.inc           | 59 +++++++++----------
>  meta/recipes-graphics/mesa/mesa_19.0.1.bb     |  5 +-
>  7 files changed, 69 insertions(+), 198 deletions(-)
>  delete mode 100644 meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch
>  create mode 100644 meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
>  delete mode 100644 meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch
>  delete mode 100644 meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch
>  delete mode 100644 meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch
>
> diff --git a/meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch b/meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch
> deleted file mode 100644
> index d065e2285c..0000000000
> --- a/meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch
> +++ /dev/null
> @@ -1,44 +0,0 @@
> -From e53837ad7b01364f34a533b95f4817c1795789de Mon Sep 17 00:00:00 2001
> -From: Fabio Berton <fabio.berton@ossystems.com.br>
> -Date: Wed, 20 Feb 2019 16:17:00 -0300
> -Subject: [PATCH 1/4] Simplify wayland-scanner lookup
> -Organization: O.S. Systems Software LTDA.
> -
> -Don't use pkg-config to lookup the path of a binary that's in the path.
> -
> -Alternatively we'd have to prefix the path returned by pkg-config with
> -PKG_CONFIG_SYSROOT_DIR.
> -
> -Upstream-Status: Pending
> -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
> -Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> -Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
> ----
> - configure.ac | 7 +------
> - 1 file changed, 1 insertion(+), 6 deletions(-)
> -
> -diff --git a/configure.ac b/configure.ac
> -index 1ef68fe68e6..1816a4cd475 100644
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -1854,16 +1854,11 @@ for plat in $platforms; do
> -         fi
> -         WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
> -
> --        PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
> --                          WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
> --                          WAYLAND_SCANNER='')
> -         PKG_CHECK_EXISTS([wayland-scanner >= 1.15],
> -                           AC_SUBST(SCANNER_ARG, 'private-code'),
> -                           AC_SUBST(SCANNER_ARG, 'code'))
> -
> --        if test "x$WAYLAND_SCANNER" = x; then
> --            AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
> --        fi
> -+        AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
> -
> -         if test "x$WAYLAND_SCANNER" = "x:"; then
> -                 AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
> ---
> -2.21.0
> -
> 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..23e207aebf
> --- /dev/null
> +++ b/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
> @@ -0,0 +1,41 @@
> +From 021c24931367c83b62c550d1a296b0e9676726c0 Mon Sep 17 00:00:00 2001
> +From: Fabio Berton <fabio.berton@ossystems.com.br>
> +Date: Fri, 15 Mar 2019 17:42:50 -0300
> +Subject: [PATCH] meson.build: check for all linux host_os combinations
> +Organization: O.S. Systems Software LTDA.
> +
> +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.
> +
> +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
> +---
> + meson.build | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/meson.build b/meson.build
> +index 9272590201d..56465513da9 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -89,7 +89,7 @@ if (with_gles1 or with_gles2) and not with_opengl
> +   error('building OpenGL ES without OpenGL is not supported.')
> + endif
> +
> +-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly', 'linux'].contains(host_machine.system())
> ++system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux')
> +
> + _drivers = get_option('dri-drivers')
> + if _drivers.contains('auto')
> +@@ -792,7 +792,7 @@ if cc.compiles('int foo(void) __attribute__((__noreturn__));',
> + endif
> +
> + # TODO: this is very incomplete
> +-if ['linux', 'cygwin', 'gnu'].contains(host_machine.system())
> ++if ['cygwin', 'gnu'].contains(host_machine.system()) or host_machine.system().startswith('linux')
> +   pre_args += '-D_GNU_SOURCE'
> + endif
> +
> +--
> +2.21.0
> +
> diff --git a/meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch b/meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch
> deleted file mode 100644
> index aaeb0f11ba..0000000000
> --- a/meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -From f212b6bed4bf265aec069c21cdc4b7c2d9cb32df Mon Sep 17 00:00:00 2001
> -From: Khem Raj <raj.khem@gmail.com>
> -Date: Wed, 16 Aug 2017 18:58:20 -0700
> -Subject: [PATCH 2/4] winsys/svga/drm: Include sys/types.h
> -Organization: O.S. Systems Software LTDA.
> -
> -vmw_screen.h uses dev_t which is defines in sys/types.h
> -this header is required to be included for getting dev_t
> -definition. This issue happens on musl C library, it is hidden
> -on glibc since sys/types.h is included through another
> -system headers
> -
> -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> -Upstream-Status: Backport [7dfdfbf8c37e52e7b9b09f7d1d434edad3ebc864]
> -Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> -Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
> ----
> - src/gallium/winsys/svga/drm/vmw_screen.h | 1 +
> - 1 file changed, 1 insertion(+)
> -
> -diff --git a/src/gallium/winsys/svga/drm/vmw_screen.h b/src/gallium/winsys/svga/drm/vmw_screen.h
> -index a87c087d9c5..cb34fec48e7 100644
> ---- a/src/gallium/winsys/svga/drm/vmw_screen.h
> -+++ b/src/gallium/winsys/svga/drm/vmw_screen.h
> -@@ -41,6 +41,7 @@
> - #include "svga_winsys.h"
> - #include "pipebuffer/pb_buffer_fenced.h"
> - #include <os/os_thread.h>
> -+#include <sys/types.h>
> -
> - #define VMW_GMR_POOL_SIZE (16*1024*1024)
> - #define VMW_QUERY_POOL_SIZE (8192)
> ---
> -2.21.0
> -
> diff --git a/meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch b/meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch
> deleted file mode 100644
> index 96edc2172b..0000000000
> --- a/meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch
> +++ /dev/null
> @@ -1,45 +0,0 @@
> -From ce7b9ff6517fda089f296b2af2c1c49604872514 Mon Sep 17 00:00:00 2001
> -From: Otavio Salvador <otavio@ossystems.com.br>
> -Date: Tue, 5 Jun 2018 11:11:10 -0300
> -Subject: [PATCH 3/4] Properly get LLVM version when using LLVM Git releases
> -Organization: O.S. Systems Software LTDA.
> -
> -$ llvm-config-host --version
> -5.0.0git-9a5c333388c
> -
> -We need to ignore everything after 5.0.0 which is what the cut cmd is
> -doing
> -
> -Upstream-Status: Pending
> -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> -Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> -Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
> ----
> - configure.ac | 4 ++--
> - 1 file changed, 2 insertions(+), 2 deletions(-)
> -
> -diff --git a/configure.ac b/configure.ac
> -index 1816a4cd475..13fed9daf59 100644
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -1124,7 +1124,7 @@ strip_unwanted_llvm_flags() {
> -
> - llvm_set_environment_variables() {
> -     if test "x$LLVM_CONFIG" != xno; then
> --        LLVM_VERSION=`$LLVM_CONFIG --version | egrep -o '^[[0-9.]]+'`
> -+        LLVM_VERSION=`$LLVM_CONFIG --version | cut -c1-5`
> -         LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
> -         LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
> -         LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
> -@@ -2870,7 +2870,7 @@ detect_old_buggy_llvm() {
> -     dnl ourselves.
> -     dnl (See https://llvm.org/bugs/show_bug.cgi?id=6823)
> -     dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
> --    LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
> -+    LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version | cut -c1-5`
> -     AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes])
> -
> -     if test "x$llvm_have_one_so" = xyes; then
> ---
> -2.21.0
> -
> diff --git a/meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch b/meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch
> deleted file mode 100644
> index 45bcd466a3..0000000000
> --- a/meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch
> +++ /dev/null
> @@ -1,38 +0,0 @@
> -From 5489e1d22e18740a1924628c5c97096d48dcfbf8 Mon Sep 17 00:00:00 2001
> -From: Fabio Berton <fabio.berton@ossystems.com.br>
> -Date: Fri, 15 Feb 2019 10:57:06 -0200
> -Subject: [PATCH 4/4] use PKG_CHECK_VAR for defining WAYLAND_PROTOCOLS_DATADIR
> -Organization: O.S. Systems Software LTDA.
> -
> -This allows to override the wayland-protocols pkgdatadir with the
> -WAYLAND_PROTOCOLS_DATADIR from environment.
> -
> -pkgconfig would return an absolute path in
> -/usr/share/wayland-protocols
> -for the pkgdatadir value, which is not suitable for cross-compiling.
> -
> -Upstream-Status: Pending
> -
> -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> -Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> -Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
> ----
> - configure.ac | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> -diff --git a/configure.ac b/configure.ac
> -index 13fed9daf59..6cff8afb7cf 100644
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -1852,7 +1852,7 @@ for plat in $platforms; do
> -         if test "x$enable_egl" = xyes; then
> -           PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl-backend >= $WAYLAND_EGL_BACKEND_REQUIRED])
> -         fi
> --        WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
> -+        PKG_CHECK_VAR([WAYLAND_PROTOCOLS_DATADIR], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED], pkgdatadir)
> -
> -         PKG_CHECK_EXISTS([wayland-scanner >= 1.15],
> -                           AC_SUBST(SCANNER_ARG, 'private-code'),
> ---
> -2.21.0
> -
> diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> index ece74974b5..675b57b9cb 100644
> --- a/meta/recipes-graphics/mesa/mesa.inc
> +++ b/meta/recipes-graphics/mesa/mesa.inc
> @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c
>
>  PE = "2"
>
> -DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native"
> +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)} \
> @@ -24,7 +24,7 @@ PROVIDES = " \
>      virtual/mesa \
>      "
>
> -inherit autotools pkgconfig python3native gettext distro_features_check
> +inherit meson pkgconfig python3native gettext distro_features_check
>
>  BBCLASSEXTEND = "native nativesdk"
>
> @@ -34,16 +34,14 @@ PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \
>                 ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)} \
>                 surfaceless"
>
> -export LLVM_CONFIG = "${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE}"
>  export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config"
>  export YOCTO_ALTERNATE_MULTILIB_NAME = "${base_libdir}"
> -EXTRA_OECONF = "--enable-shared-glapi \
> -                --disable-opencl \
> -                --enable-glx-read-only-text \
> -                PYTHON2=python2 \
> -                --with-llvm-prefix=${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE} \
> -                --with-platforms='${PLATFORMS}' \
> -                --enable-autotools \
> +
> +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)} \
> @@ -55,36 +53,36 @@ PACKAGECONFIG_class-native ?= "gbm dri egl opengl"
>  PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl"
>
>  # "gbm" requires "dri", "opengl"
> -PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm"
> +PACKAGECONFIG[gbm] = "-Dgbm=true,-Dgbm=false"
>
>  X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr"
>  # "x11" requires "opengl"
> -PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}"
> -PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc"
> +PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}"
> +PACKAGECONFIG[xvmc] = "-Dgallium-xvmc=true,-Dgallium-xvmc=false,libxvmc"
>  PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
>
>  DRIDRIVERS_class-native = "swrast"
>  DRIDRIVERS_class-nativesdk = "swrast"
> -DRIDRIVERS_append_x86_class-target = ",radeon,r200,nouveau,i965,i915"
> -DRIDRIVERS_append_x86-64_class-target = ",radeon,r200,nouveau,i965,i915"
> +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] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, --disable-dri, xorgproto libdrm"
> -PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, xorgproto libxshmfence"
> +PACKAGECONFIG[dri] = "-Ddri-drivers=${DRIDRIVERS}, -Ddri-drivers='', xorgproto libdrm"
> +PACKAGECONFIG[dri3] = "-Ddri3=true, -Ddri3=false, xorgproto libxshmfence"
>
>  # 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] = "--with-vulkan-drivers=${VULKAN_DRIVERS}, --without-vulkan-drivers, python3-mako-native"
> +PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${VULKAN_DRIVERS}, -Dvulkan-drivers='',"
>
> -PACKAGECONFIG[opengl] = "--enable-opengl, --disable-opengl"
> +PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
>
>  # "gles" requires "opengl"
> -PACKAGECONFIG[gles] = "--enable-gles1 --enable-gles2, --disable-gles1 --disable-gles2"
> +PACKAGECONFIG[gles] = "-Dgles1=true -Dgles2=true, -Dgles1=false -Dgles2=false"
>
>  # "egl" requires "dri", "opengl"
> -PACKAGECONFIG[egl] = "--enable-egl, --disable-egl"
> +PACKAGECONFIG[egl] = "-Degl=true, -Degl=false"
>
>  PACKAGECONFIG[etnaviv] = ""
>  PACKAGECONFIG[imx] = ""
> @@ -105,27 +103,25 @@ GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600',
>  GALLIUMDRIVERS_append = ",virgl"
>
>  # 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"
> +PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS}, -Dgallium-drivers=''"
>  MESA_LLVM_RELEASE ?= "8.0.0"
> -PACKAGECONFIG[gallium-llvm] = "--enable-llvm --enable-llvm-shared-libs, --disable-llvm, llvm${MESA_LLVM_RELEASE} llvm-native \
> +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"
>
> -OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium-osmesa', 'osmesa', d)}"
> -PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}"
> +OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium', 'classic', d)}"
> +PACKAGECONFIG[osmesa] = "-Dosmesa=${OSMESA},-Dosmesa=none"
>
> -PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
> +PACKAGECONFIG[unwind] = "-Dlibunwind=true,-Dlibunwind=false,libunwind"
>
> -EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls"
> -EXTRA_OECONF_append_libc-musl = " --disable-glx-tls"
> -EXTRA_OECONF_append_libc-musl_x86 = " --disable-asm"
> +# 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"
>
>  CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS"
> -EXTRA_OEMAKE += "WAYLAND_PROTOCOLS_DATADIR=${STAGING_DATADIR}/wayland-protocols"
>
>  # Remove the mesa dependency on mesa-dev, as mesa is empty
>  RDEPENDS_${PN}-dev = ""
> @@ -158,7 +154,6 @@ do_install_append () {
>      # libwayland-egl has been moved to wayland 1.15+
>      rm -f ${D}${libdir}/libwayland-egl*
>      rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc
> -    rmdir --ignore-fail-on-non-empty ${D}${libdir}/pkgconfig
>  }
>
>  # For the packages that make up the OpenGL interfaces, inject variables so that
> diff --git a/meta/recipes-graphics/mesa/mesa_19.0.1.bb b/meta/recipes-graphics/mesa/mesa_19.0.1.bb
> index d90be8a074..c6258d66aa 100644
> --- a/meta/recipes-graphics/mesa/mesa_19.0.1.bb
> +++ b/meta/recipes-graphics/mesa/mesa_19.0.1.bb
> @@ -1,10 +1,7 @@
>  require ${BPN}.inc
>
>  SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
> -           file://0001-Simplify-wayland-scanner-lookup.patch \
> -           file://0002-winsys-svga-drm-Include-sys-types.h.patch \
> -           file://0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch \
> -           file://0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch \
> +           file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
>  "
>
>  SRC_URI[md5sum] = "19636bb3da35c21f43040d31e575d5ce"
> --
> 2.20.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 4/4] mesa: make gallium virgl optional
  2019-05-03 10:17   ` Alexander Kanavin
@ 2019-05-06  5:52     ` Marco Felsch
  0 siblings, 0 replies; 10+ messages in thread
From: Marco Felsch @ 2019-05-06  5:52 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: OE-core

On 19-05-03 12:17, Alexander Kanavin wrote:
> On Thu, 2 May 2019 at 20:09, Marco Felsch <m.felsch@pengutronix.de> wrote:
> > Same as for the swrast target it isn't a good solution to enable the
> > target per default since we compiling for embedded targets most the
> > time. Make this target optional to save some memory.
> 
> This will probably break virgl oe-selftests as they expect target mesa
> to be configured with virgl.
> Try 'oe-selftest -r runtime_test.TestImage.test_testimage_virgl_gtk'
> and 'oe-selftest -r
> runtime_test.TestImage.test_testimage_virgl_headless'
> 
> You can address this by setting PACKAGECONFIG_append_qemuall = " virgl".

Thanks for covering that. I will add this line in my v3.

> 
> > Upstream-Status: Submitted [openembedded-core@lists.openembedded.org]
> 
> This is not necessary. It is only used for patches to the recipes that
> live as files in the layer tree.

Oh.. Okay now I got it.

Regards,
  Marco

> 
> Alex
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 1/4] mesa: Convert recipe to use meson build system
  2019-05-03 10:19   ` Alexander Kanavin
@ 2019-05-06  5:56     ` Marco Felsch
  0 siblings, 0 replies; 10+ messages in thread
From: Marco Felsch @ 2019-05-06  5:56 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Otavio Salvador, OE-core

On 19-05-03 12:19, Alexander Kanavin wrote:
> Does this address the musl failure that was seen with the previous
> iteration of the patch?
> http://lists.openembedded.org/pipermail/openembedded-core/2019-April/281620.html

Nope, I picked v3 https://patchwork.openembedded.org/patch/159665/ and
rebased them. Unfortunately the patch state is wrong, it isn't in
master-next. Let me check who I can switch the toolchain and fix the
error.

Regards,
  Marco

> 
> Alex
> 
> On Thu, 2 May 2019 at 20:10, Marco Felsch <m.felsch@pengutronix.de> wrote:
> >
> > From: Fabio Berton <fabio.berton@ossystems.com.br>
> >
> > - Remove all non related meson patches
> >   - Change radeon driver to r100
> >   - Add python3-mako-native and gettext-native to DEPENDS
> >
> > Based on https://patchwork.openembedded.org/patch/158748/
> >
> > Upstream-Status: Submitted [openembedded-core@lists.openembedded.org]
> >
> > Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
> > [m.felsch@pengutronix.de: rebased on top of oe-core master-next]
> > [m.felsch@pengutronix.de: add upstream-status line]
> > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > ---
> > Changelog:
> >
> > v2:
> > - new patch
> >
> >  ...0001-Simplify-wayland-scanner-lookup.patch | 44 --------------
> >  ...k-for-all-linux-host_os-combinations.patch | 41 +++++++++++++
> >  ...-winsys-svga-drm-Include-sys-types.h.patch | 35 -----------
> >  ...M-version-when-using-LLVM-Git-releas.patch | 45 --------------
> >  ...R-for-defining-WAYLAND_PROTOCOLS_DAT.patch | 38 ------------
> >  meta/recipes-graphics/mesa/mesa.inc           | 59 +++++++++----------
> >  meta/recipes-graphics/mesa/mesa_19.0.1.bb     |  5 +-
> >  7 files changed, 69 insertions(+), 198 deletions(-)
> >  delete mode 100644 meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch
> >  create mode 100644 meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
> >  delete mode 100644 meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch
> >  delete mode 100644 meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch
> >  delete mode 100644 meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch
> >
> > diff --git a/meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch b/meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch
> > deleted file mode 100644
> > index d065e2285c..0000000000
> > --- a/meta/recipes-graphics/mesa/files/0001-Simplify-wayland-scanner-lookup.patch
> > +++ /dev/null
> > @@ -1,44 +0,0 @@
> > -From e53837ad7b01364f34a533b95f4817c1795789de Mon Sep 17 00:00:00 2001
> > -From: Fabio Berton <fabio.berton@ossystems.com.br>
> > -Date: Wed, 20 Feb 2019 16:17:00 -0300
> > -Subject: [PATCH 1/4] Simplify wayland-scanner lookup
> > -Organization: O.S. Systems Software LTDA.
> > -
> > -Don't use pkg-config to lookup the path of a binary that's in the path.
> > -
> > -Alternatively we'd have to prefix the path returned by pkg-config with
> > -PKG_CONFIG_SYSROOT_DIR.
> > -
> > -Upstream-Status: Pending
> > -Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
> > -Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> > -Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
> > ----
> > - configure.ac | 7 +------
> > - 1 file changed, 1 insertion(+), 6 deletions(-)
> > -
> > -diff --git a/configure.ac b/configure.ac
> > -index 1ef68fe68e6..1816a4cd475 100644
> > ---- a/configure.ac
> > -+++ b/configure.ac
> > -@@ -1854,16 +1854,11 @@ for plat in $platforms; do
> > -         fi
> > -         WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
> > -
> > --        PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
> > --                          WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
> > --                          WAYLAND_SCANNER='')
> > -         PKG_CHECK_EXISTS([wayland-scanner >= 1.15],
> > -                           AC_SUBST(SCANNER_ARG, 'private-code'),
> > -                           AC_SUBST(SCANNER_ARG, 'code'))
> > -
> > --        if test "x$WAYLAND_SCANNER" = x; then
> > --            AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
> > --        fi
> > -+        AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
> > -
> > -         if test "x$WAYLAND_SCANNER" = "x:"; then
> > -                 AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
> > ---
> > -2.21.0
> > -
> > 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..23e207aebf
> > --- /dev/null
> > +++ b/meta/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
> > @@ -0,0 +1,41 @@
> > +From 021c24931367c83b62c550d1a296b0e9676726c0 Mon Sep 17 00:00:00 2001
> > +From: Fabio Berton <fabio.berton@ossystems.com.br>
> > +Date: Fri, 15 Mar 2019 17:42:50 -0300
> > +Subject: [PATCH] meson.build: check for all linux host_os combinations
> > +Organization: O.S. Systems Software LTDA.
> > +
> > +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.
> > +
> > +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
> > +---
> > + meson.build | 4 ++--
> > + 1 file changed, 2 insertions(+), 2 deletions(-)
> > +
> > +diff --git a/meson.build b/meson.build
> > +index 9272590201d..56465513da9 100644
> > +--- a/meson.build
> > ++++ b/meson.build
> > +@@ -89,7 +89,7 @@ if (with_gles1 or with_gles2) and not with_opengl
> > +   error('building OpenGL ES without OpenGL is not supported.')
> > + endif
> > +
> > +-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly', 'linux'].contains(host_machine.system())
> > ++system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux')
> > +
> > + _drivers = get_option('dri-drivers')
> > + if _drivers.contains('auto')
> > +@@ -792,7 +792,7 @@ if cc.compiles('int foo(void) __attribute__((__noreturn__));',
> > + endif
> > +
> > + # TODO: this is very incomplete
> > +-if ['linux', 'cygwin', 'gnu'].contains(host_machine.system())
> > ++if ['cygwin', 'gnu'].contains(host_machine.system()) or host_machine.system().startswith('linux')
> > +   pre_args += '-D_GNU_SOURCE'
> > + endif
> > +
> > +--
> > +2.21.0
> > +
> > diff --git a/meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch b/meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch
> > deleted file mode 100644
> > index aaeb0f11ba..0000000000
> > --- a/meta/recipes-graphics/mesa/files/0002-winsys-svga-drm-Include-sys-types.h.patch
> > +++ /dev/null
> > @@ -1,35 +0,0 @@
> > -From f212b6bed4bf265aec069c21cdc4b7c2d9cb32df Mon Sep 17 00:00:00 2001
> > -From: Khem Raj <raj.khem@gmail.com>
> > -Date: Wed, 16 Aug 2017 18:58:20 -0700
> > -Subject: [PATCH 2/4] winsys/svga/drm: Include sys/types.h
> > -Organization: O.S. Systems Software LTDA.
> > -
> > -vmw_screen.h uses dev_t which is defines in sys/types.h
> > -this header is required to be included for getting dev_t
> > -definition. This issue happens on musl C library, it is hidden
> > -on glibc since sys/types.h is included through another
> > -system headers
> > -
> > -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > -Upstream-Status: Backport [7dfdfbf8c37e52e7b9b09f7d1d434edad3ebc864]
> > -Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> > -Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
> > ----
> > - src/gallium/winsys/svga/drm/vmw_screen.h | 1 +
> > - 1 file changed, 1 insertion(+)
> > -
> > -diff --git a/src/gallium/winsys/svga/drm/vmw_screen.h b/src/gallium/winsys/svga/drm/vmw_screen.h
> > -index a87c087d9c5..cb34fec48e7 100644
> > ---- a/src/gallium/winsys/svga/drm/vmw_screen.h
> > -+++ b/src/gallium/winsys/svga/drm/vmw_screen.h
> > -@@ -41,6 +41,7 @@
> > - #include "svga_winsys.h"
> > - #include "pipebuffer/pb_buffer_fenced.h"
> > - #include <os/os_thread.h>
> > -+#include <sys/types.h>
> > -
> > - #define VMW_GMR_POOL_SIZE (16*1024*1024)
> > - #define VMW_QUERY_POOL_SIZE (8192)
> > ---
> > -2.21.0
> > -
> > diff --git a/meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch b/meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch
> > deleted file mode 100644
> > index 96edc2172b..0000000000
> > --- a/meta/recipes-graphics/mesa/files/0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch
> > +++ /dev/null
> > @@ -1,45 +0,0 @@
> > -From ce7b9ff6517fda089f296b2af2c1c49604872514 Mon Sep 17 00:00:00 2001
> > -From: Otavio Salvador <otavio@ossystems.com.br>
> > -Date: Tue, 5 Jun 2018 11:11:10 -0300
> > -Subject: [PATCH 3/4] Properly get LLVM version when using LLVM Git releases
> > -Organization: O.S. Systems Software LTDA.
> > -
> > -$ llvm-config-host --version
> > -5.0.0git-9a5c333388c
> > -
> > -We need to ignore everything after 5.0.0 which is what the cut cmd is
> > -doing
> > -
> > -Upstream-Status: Pending
> > -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > -Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> > -Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
> > ----
> > - configure.ac | 4 ++--
> > - 1 file changed, 2 insertions(+), 2 deletions(-)
> > -
> > -diff --git a/configure.ac b/configure.ac
> > -index 1816a4cd475..13fed9daf59 100644
> > ---- a/configure.ac
> > -+++ b/configure.ac
> > -@@ -1124,7 +1124,7 @@ strip_unwanted_llvm_flags() {
> > -
> > - llvm_set_environment_variables() {
> > -     if test "x$LLVM_CONFIG" != xno; then
> > --        LLVM_VERSION=`$LLVM_CONFIG --version | egrep -o '^[[0-9.]]+'`
> > -+        LLVM_VERSION=`$LLVM_CONFIG --version | cut -c1-5`
> > -         LLVM_CPPFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cppflags"`
> > -         LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
> > -         LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
> > -@@ -2870,7 +2870,7 @@ detect_old_buggy_llvm() {
> > -     dnl ourselves.
> > -     dnl (See https://llvm.org/bugs/show_bug.cgi?id=6823)
> > -     dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
> > --    LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version`
> > -+    LLVM_SO_NAME=LLVM-`$LLVM_CONFIG --version | cut -c1-5`
> > -     AS_IF([test -f "$LLVM_LIBDIR/lib$LLVM_SO_NAME.$IMP_LIB_EXT"], [llvm_have_one_so=yes])
> > -
> > -     if test "x$llvm_have_one_so" = xyes; then
> > ---
> > -2.21.0
> > -
> > diff --git a/meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch b/meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch
> > deleted file mode 100644
> > index 45bcd466a3..0000000000
> > --- a/meta/recipes-graphics/mesa/files/0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch
> > +++ /dev/null
> > @@ -1,38 +0,0 @@
> > -From 5489e1d22e18740a1924628c5c97096d48dcfbf8 Mon Sep 17 00:00:00 2001
> > -From: Fabio Berton <fabio.berton@ossystems.com.br>
> > -Date: Fri, 15 Feb 2019 10:57:06 -0200
> > -Subject: [PATCH 4/4] use PKG_CHECK_VAR for defining WAYLAND_PROTOCOLS_DATADIR
> > -Organization: O.S. Systems Software LTDA.
> > -
> > -This allows to override the wayland-protocols pkgdatadir with the
> > -WAYLAND_PROTOCOLS_DATADIR from environment.
> > -
> > -pkgconfig would return an absolute path in
> > -/usr/share/wayland-protocols
> > -for the pkgdatadir value, which is not suitable for cross-compiling.
> > -
> > -Upstream-Status: Pending
> > -
> > -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > -Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> > -Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
> > ----
> > - configure.ac | 2 +-
> > - 1 file changed, 1 insertion(+), 1 deletion(-)
> > -
> > -diff --git a/configure.ac b/configure.ac
> > -index 13fed9daf59..6cff8afb7cf 100644
> > ---- a/configure.ac
> > -+++ b/configure.ac
> > -@@ -1852,7 +1852,7 @@ for plat in $platforms; do
> > -         if test "x$enable_egl" = xyes; then
> > -           PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl-backend >= $WAYLAND_EGL_BACKEND_REQUIRED])
> > -         fi
> > --        WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
> > -+        PKG_CHECK_VAR([WAYLAND_PROTOCOLS_DATADIR], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED], pkgdatadir)
> > -
> > -         PKG_CHECK_EXISTS([wayland-scanner >= 1.15],
> > -                           AC_SUBST(SCANNER_ARG, 'private-code'),
> > ---
> > -2.21.0
> > -
> > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> > index ece74974b5..675b57b9cb 100644
> > --- a/meta/recipes-graphics/mesa/mesa.inc
> > +++ b/meta/recipes-graphics/mesa/mesa.inc
> > @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c
> >
> >  PE = "2"
> >
> > -DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native"
> > +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)} \
> > @@ -24,7 +24,7 @@ PROVIDES = " \
> >      virtual/mesa \
> >      "
> >
> > -inherit autotools pkgconfig python3native gettext distro_features_check
> > +inherit meson pkgconfig python3native gettext distro_features_check
> >
> >  BBCLASSEXTEND = "native nativesdk"
> >
> > @@ -34,16 +34,14 @@ PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \
> >                 ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)} \
> >                 surfaceless"
> >
> > -export LLVM_CONFIG = "${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE}"
> >  export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config"
> >  export YOCTO_ALTERNATE_MULTILIB_NAME = "${base_libdir}"
> > -EXTRA_OECONF = "--enable-shared-glapi \
> > -                --disable-opencl \
> > -                --enable-glx-read-only-text \
> > -                PYTHON2=python2 \
> > -                --with-llvm-prefix=${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE} \
> > -                --with-platforms='${PLATFORMS}' \
> > -                --enable-autotools \
> > +
> > +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)} \
> > @@ -55,36 +53,36 @@ PACKAGECONFIG_class-native ?= "gbm dri egl opengl"
> >  PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl"
> >
> >  # "gbm" requires "dri", "opengl"
> > -PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm"
> > +PACKAGECONFIG[gbm] = "-Dgbm=true,-Dgbm=false"
> >
> >  X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr"
> >  # "x11" requires "opengl"
> > -PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}"
> > -PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc"
> > +PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}"
> > +PACKAGECONFIG[xvmc] = "-Dgallium-xvmc=true,-Dgallium-xvmc=false,libxvmc"
> >  PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
> >
> >  DRIDRIVERS_class-native = "swrast"
> >  DRIDRIVERS_class-nativesdk = "swrast"
> > -DRIDRIVERS_append_x86_class-target = ",radeon,r200,nouveau,i965,i915"
> > -DRIDRIVERS_append_x86-64_class-target = ",radeon,r200,nouveau,i965,i915"
> > +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] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, --disable-dri, xorgproto libdrm"
> > -PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, xorgproto libxshmfence"
> > +PACKAGECONFIG[dri] = "-Ddri-drivers=${DRIDRIVERS}, -Ddri-drivers='', xorgproto libdrm"
> > +PACKAGECONFIG[dri3] = "-Ddri3=true, -Ddri3=false, xorgproto libxshmfence"
> >
> >  # 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] = "--with-vulkan-drivers=${VULKAN_DRIVERS}, --without-vulkan-drivers, python3-mako-native"
> > +PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${VULKAN_DRIVERS}, -Dvulkan-drivers='',"
> >
> > -PACKAGECONFIG[opengl] = "--enable-opengl, --disable-opengl"
> > +PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false"
> >
> >  # "gles" requires "opengl"
> > -PACKAGECONFIG[gles] = "--enable-gles1 --enable-gles2, --disable-gles1 --disable-gles2"
> > +PACKAGECONFIG[gles] = "-Dgles1=true -Dgles2=true, -Dgles1=false -Dgles2=false"
> >
> >  # "egl" requires "dri", "opengl"
> > -PACKAGECONFIG[egl] = "--enable-egl, --disable-egl"
> > +PACKAGECONFIG[egl] = "-Degl=true, -Degl=false"
> >
> >  PACKAGECONFIG[etnaviv] = ""
> >  PACKAGECONFIG[imx] = ""
> > @@ -105,27 +103,25 @@ GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600',
> >  GALLIUMDRIVERS_append = ",virgl"
> >
> >  # 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"
> > +PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS}, -Dgallium-drivers=''"
> >  MESA_LLVM_RELEASE ?= "8.0.0"
> > -PACKAGECONFIG[gallium-llvm] = "--enable-llvm --enable-llvm-shared-libs, --disable-llvm, llvm${MESA_LLVM_RELEASE} llvm-native \
> > +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"
> >
> > -OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium-osmesa', 'osmesa', d)}"
> > -PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}"
> > +OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium', 'classic', d)}"
> > +PACKAGECONFIG[osmesa] = "-Dosmesa=${OSMESA},-Dosmesa=none"
> >
> > -PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
> > +PACKAGECONFIG[unwind] = "-Dlibunwind=true,-Dlibunwind=false,libunwind"
> >
> > -EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls"
> > -EXTRA_OECONF_append_libc-musl = " --disable-glx-tls"
> > -EXTRA_OECONF_append_libc-musl_x86 = " --disable-asm"
> > +# 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"
> >
> >  CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS"
> > -EXTRA_OEMAKE += "WAYLAND_PROTOCOLS_DATADIR=${STAGING_DATADIR}/wayland-protocols"
> >
> >  # Remove the mesa dependency on mesa-dev, as mesa is empty
> >  RDEPENDS_${PN}-dev = ""
> > @@ -158,7 +154,6 @@ do_install_append () {
> >      # libwayland-egl has been moved to wayland 1.15+
> >      rm -f ${D}${libdir}/libwayland-egl*
> >      rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc
> > -    rmdir --ignore-fail-on-non-empty ${D}${libdir}/pkgconfig
> >  }
> >
> >  # For the packages that make up the OpenGL interfaces, inject variables so that
> > diff --git a/meta/recipes-graphics/mesa/mesa_19.0.1.bb b/meta/recipes-graphics/mesa/mesa_19.0.1.bb
> > index d90be8a074..c6258d66aa 100644
> > --- a/meta/recipes-graphics/mesa/mesa_19.0.1.bb
> > +++ b/meta/recipes-graphics/mesa/mesa_19.0.1.bb
> > @@ -1,10 +1,7 @@
> >  require ${BPN}.inc
> >
> >  SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
> > -           file://0001-Simplify-wayland-scanner-lookup.patch \
> > -           file://0002-winsys-svga-drm-Include-sys-types.h.patch \
> > -           file://0003-Properly-get-LLVM-version-when-using-LLVM-Git-releas.patch \
> > -           file://0004-use-PKG_CHECK_VAR-for-defining-WAYLAND_PROTOCOLS_DAT.patch \
> > +           file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
> >  "
> >
> >  SRC_URI[md5sum] = "19636bb3da35c21f43040d31e575d5ce"
> > --
> > 2.20.1
> >
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 3/4] mesa: make gallium swrast target optional
  2019-05-02 18:09 ` [PATCH v2 3/4] mesa: make gallium swrast target optional Marco Felsch
@ 2019-05-09 13:28   ` Ulrich Ölmann
  0 siblings, 0 replies; 10+ messages in thread
From: Ulrich Ölmann @ 2019-05-09 13:28 UTC (permalink / raw)
  To: openembedded-core

Hi there,

On Thu, May 02 2019 at 20:09 +0200, Marco Felsch <m.felsch@pengutronix.de> wrote:
> Most the time we are compiling for embedded targets which have dedicated
> hardware combinations. Setting swrast default on isn't a good solution
> for such devices because if the hardware render node have an issue or
> don't support a special format/request mesa will fallback to the
> software renderer. This will make it harder to debug performace issues.
>
> A better way is to let the user deciced if a software renderer is
> needed e.g. if the system has no hardware renderer or to have such a
> fallback device. This way the user knows that the software renderer is
> enabled.
>
> Upstream-Status: Submitted [openembedded-core@lists.openembedded.org]
>
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> Changelog:
>
> v2:
> - added Upstream-Status line
> - fix leading comma
>
>  meta/recipes-graphics/mesa/mesa.inc | 21 ++++++++++++---------
>  1 file changed, 12 insertions(+), 9 deletions(-)
>
> diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> index 7516a06639..b41d3054c3 100644
> --- a/meta/recipes-graphics/mesa/mesa.inc
> +++ b/meta/recipes-graphics/mesa/mesa.inc
> @@ -86,24 +86,27 @@ PACKAGECONFIG[egl] = "-Degl=true, -Degl=false"
>
>  PACKAGECONFIG[etnaviv] = ""
>  PACKAGECONFIG[kmsro] = ""
> +PACKAGECONFIG[swrast] = ""
>
> -GALLIUMDRIVERS = "swrast"
> -GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
> -GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'kmsro', ',kmsro', '', d)}"
> +GALLIUMDRIVERS = ""
> +GALLIUMDRIVERS +="${@bb.utils.contains('PACKAGECONFIG', 'swrast', 'swrast', '', d)}"
> +GALLIUMDRIVERS +="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', 'etnaviv', '', d)}"
> +GALLIUMDRIVERS +="${@bb.utils.contains('PACKAGECONFIG', 'kmsro', 'kmsro', '', d)}"
>
>  # radeonsi requires LLVM
> -GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}"
> +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_LLVM = "r300 svga nouveau ${@'${GALLIUMDRIVERS_LLVM33}' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
>
>  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"
> +GALLIUMDRIVERS += "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', '${GALLIUMDRIVERS_LLVM}', '', d)}"
> +GALLIUMDRIVERS += "${@bb.utils.contains('PACKAGECONFIG', 'r600', 'r600', '', d)}"
> +GALLIUMDRIVERS += "virgl"
> +GALLIUMDRIVERS_MESON = "${@",".join("${GALLIUMDRIVERS}".split())}"

how does it have to look like if I want to go without this auxiliary
variable GALLIUMDRIVERS_MESON and instead insert the Python expression
that generates its content directly into ...

>  # keep --with-gallium-drivers separate, because when only one of gallium versions is enabled, other 2 were adding --without-gallium-drivers
> -PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS}, -Dgallium-drivers=''"
> +PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS_MESON}, -Dgallium-drivers=''"

... the above assignment of PACKAGECONFIG[gallium]?
I can't get it to work - perhaps it is a problem with escaping things?

Best regards
Ulrich


>  MESA_LLVM_RELEASE ?= "8.0.0"
>  PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true, -Dllvm=false, llvm${MESA_LLVM_RELEASE} llvm-native \
>                                 ${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}"
-- 
Pengutronix e.K.                           | Ulrich Ölmann               |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-05-09 13:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-02 18:09 [PATCH v2 0/4] Mesa improvements Marco Felsch
2019-05-02 18:09 ` [PATCH v2 1/4] mesa: Convert recipe to use meson build system Marco Felsch
2019-05-03 10:19   ` Alexander Kanavin
2019-05-06  5:56     ` Marco Felsch
2019-05-02 18:09 ` [PATCH v2 2/4] mesa: fix imx gallium driver PACKAGECONFIG option Marco Felsch
2019-05-02 18:09 ` [PATCH v2 3/4] mesa: make gallium swrast target optional Marco Felsch
2019-05-09 13:28   ` Ulrich Ölmann
2019-05-02 18:09 ` [PATCH v2 4/4] mesa: make gallium virgl optional Marco Felsch
2019-05-03 10:17   ` Alexander Kanavin
2019-05-06  5:52     ` Marco Felsch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.