mesa-gl: Use swrast gallium driver
PATCH 1/6 mesa-gl: Use swrast gallium driver
From: Khem Raj <[email protected]>
Fixes:
../mesa-21.0.0/meson.build:21:0: ERROR: Options "swrast" are not in allowed choices: "auto, i915, i965, r100, r200, nouveau"
with any driver enabled in DRIDRIVERS, do_configure fails with:
../mesa-21.0.0/meson.build:519:4: ERROR: Problem encountered: building dri drivers require at least one windowing system
even after enabling gallium and wayland PACKAGECONFIGs, move DRIDRIVERS_append* from mesa.inc to mesa recipe.
--- meta/recipes-graphics/mesa/mesa-gl_21.0.0.bb | 9 +++++---- meta/recipes-graphics/mesa/mesa.inc | 4 ---- meta/recipes-graphics/mesa/mesa_21.0.0.bb | 4 ++++ 3 files changed, 9 insertions(+), 8 deletions(-)
meta/recipes-graphics/mesa/mesa-gl_21.0.0.bb +5 -4
@@ -8,8 +8,9 @@ S = "${WORKDIR}/mesa-${PV}" # At least one DRI rendering engine is required to build mesa. # When no X11 is available, use osmesa for the rendering engine. -PACKAGECONFIG ??= "opengl dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa', d)}" -PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa', d)}" +PACKAGECONFIG ??= "opengl dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa gallium', d)}" +PACKAGECONFIG_class-target = "opengl dri ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'osmesa gallium', d)}" -# When NOT using X11, we need to make sure we have swrast available. -DRIDRIVERS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', ',swrast', d)}" +# 21.0.0 version fails to build when any driver is enabled in DRIDRIVERS +# ./mesa-21.0.0/meson.build:519:4: ERROR: Problem encountered: building dri drivers require at least one windowing system +DRIDRIVERS ?= ""
meta/recipes-graphics/mesa/mesa.inc +0 -4
@@ -102,10 +102,6 @@ PACKAGECONFIG[elf-tls] = "-Delf-tls=true, -Delf-tls=false" PACKAGECONFIG[xvmc] = "-Dgallium-xvmc=enabled,-Dgallium-xvmc=disabled,libxvmc" PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" -DRIDRIVERS_class-native = "nouveau" -DRIDRIVERS_class-nativesdk = "nouveau" -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-drivers=${@strip_comma('${DRIDRIVERS}')}, -Ddri-drivers='', xorgproto libdrm" PACKAGECONFIG[dri3] = "-Ddri3=enabled, -Ddri3=disabled, xorgproto libxshmfence"
meta/recipes-graphics/mesa/mesa_21.0.0.bb +4 -0
@@ -1,2 +1,6 @@ require ${BPN}.inc +DRIDRIVERS_class-native = "nouveau" +DRIDRIVERS_class-nativesdk = "nouveau" +DRIDRIVERS_append_x86_class-target = ",r100,r200,nouveau,i965,i915" +DRIDRIVERS_append_x86-64_class-target = ",r100,r200,nouveau,i965,i915"
Signature · 1 line
2.29.2
PATCH 2/6 mesa: update 21.0.0 -> 21.0.1
---
.../mesa/{mesa-gl_21.0.0.bb => mesa-gl_21.0.1.bb} | 0
meta/recipes-graphics/mesa/mesa.inc | 2 +-
meta/recipes-graphics/mesa/{mesa_21.0.0.bb => mesa_21.0.1.bb} | 0
3 files changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-graphics/mesa/{mesa-gl_21.0.0.bb => mesa-gl_21.0.1.bb} (100%)
rename meta/recipes-graphics/mesa/{mesa_21.0.0.bb => mesa_21.0.1.bb} (100%)meta/recipes-graphics/mesa/mesa-gl_21.0.1.bb renamed from meta/recipes-graphics/mesa/mesa-gl_21.0.0.bb +0 -0
meta/recipes-graphics/mesa/mesa.inc +1 -1
@@ -21,7 +21,7 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \ " -SRC_URI[sha256sum] = "e6204e98e6a8d77cf9dc5d34f99dd8e3ef7144f3601c808ca0dd26ba522e0d84" +SRC_URI[sha256sum] = "379fc984459394f2ab2d84049efdc3a659869dc1328ce72ef0598506611712bb" UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
meta/recipes-graphics/mesa/mesa_21.0.1.bb renamed from meta/recipes-graphics/mesa/mesa_21.0.0.bb +0 -0
Signature · 1 line
2.29.2
PATCH 3/6 ptest-runner: correct version check
In reply to Alexander Kanavin--- meta/recipes-support/ptest-runner/ptest-runner_2.4.0.bb | 1 - 1 file changed, 1 deletion(-)
meta/recipes-support/ptest-runner/ptest-runner_2.4.0.bb +0 -1
@@ -12,7 +12,6 @@ PV .= "+git${SRCPV}" SRC_URI = "git://git.yoctoproject.org/ptest-runner2 \ " -UPSTREAM_VERSION_UNKNOWN = "1" S = "${WORKDIR}/git"
Signature · 1 line
2.29.2
PATCH 4/6 runqemu: do not stop processing graphical options after nographic
In reply to Alexander KanavinSome options such as egl-headless are fully compatible with it, so there is no need to quit.
--- scripts/runqemu | 1 - 1 file changed, 1 deletion(-)
scripts/runqemu +0 -1
@@ -1314,7 +1314,6 @@ class BaseConfig(object): if self.gtk == True: raise RunQemuError('Option nographic makes no sense alongside the gtk option.') self.qemu_opt += ' -nographic' - return if self.novga == True: self.qemu_opt += ' -vga none'
Signature · 1 line
2.29.2
PATCH 5/6 mesa: gallium option requires libdrm
In reply to Alexander KanavinPreviously it was pulled in via dri option, and there was no configuration where gallium was enabled and dri was not.
--- meta/recipes-graphics/mesa/mesa.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/mesa/mesa.inc +1 -1
@@ -149,7 +149,7 @@ GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ' GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}" GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'virgl', ',virgl', '', d)}" -PACKAGECONFIG[gallium] = "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, -Dgallium-drivers=''" +PACKAGECONFIG[gallium] = "-Dgallium-drivers=${@strip_comma('${GALLIUMDRIVERS}')}, -Dgallium-drivers='', libdrm" PACKAGECONFIG[gallium-llvm] = "-Dllvm=enabled -Dshared-llvm=enabled, -Dllvm=disabled, llvm${MESA_LLVM_RELEASE} llvm-native \ elfutils" PACKAGECONFIG[xa] = "-Dgallium-xa=enabled, -Dgallium-xa=disabled"
Signature · 1 line
2.29.2
PATCH 6/6 mesa: enable dri in native/nativesdk through gallium drivers
In reply to Alexander KanavinPreviously, dri was enabled via a token dri driver (swrast, then nouveau). Upstream is discussing removing dri drivers altogether (they're becoming difficult to support and only needed for obsolete x86 hardware), so let's prepare for that happening in the future:
https://lists.freedesktop.org/archives/mesa-dev/2021-March/224984.html
--- meta/recipes-graphics/mesa/mesa.inc | 4 ++-- meta/recipes-graphics/mesa/mesa_21.0.1.bb | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-)
meta/recipes-graphics/mesa/mesa.inc +2 -2
@@ -87,8 +87,8 @@ PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland v ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \ elf-tls \ " -PACKAGECONFIG_class-native ?= "gbm dri egl opengl elf-tls x11" -PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl elf-tls x11" +PACKAGECONFIG_class-native ?= "gbm gallium egl opengl elf-tls x11" +PACKAGECONFIG_class-nativesdk ?= "gbm gallium egl opengl elf-tls x11" PACKAGECONFIG_remove_libc-musl = "elf-tls"
meta/recipes-graphics/mesa/mesa_21.0.1.bb +0 -2
@@ -1,6 +1,4 @@ require ${BPN}.inc -DRIDRIVERS_class-native = "nouveau" -DRIDRIVERS_class-nativesdk = "nouveau" DRIDRIVERS_append_x86_class-target = ",r100,r200,nouveau,i965,i915" DRIDRIVERS_append_x86-64_class-target = ",r100,r200,nouveau,i965,i915"
Signature · 1 line
2.29.2