All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro
@ 2023-03-16  9:40 Alexander Kanavin
  2023-03-16  9:40 ` [PATCH 2/6] mesa: allow mesa-native/nativesdk only subject to opengl/vulkan DISTRO_FEATURE Alexander Kanavin
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Alexander Kanavin @ 2023-03-16  9:40 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

With mesa 23.0, it is not longer possible to use the host drivers, as
mesa upstream has added strict checks for matching builds between
drivers and libraries that load them.

Add a check and a hint to runqemu so that there is a helpful error when
there is no native/nativesdk opengl/virgl support.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 scripts/runqemu | 34 ++++++++++------------------------
 1 file changed, 10 insertions(+), 24 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 38aa35fdd4..0240dd533c 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -450,30 +450,16 @@ class BaseConfig(object):
             self.set("MACHINE", arg)
 
     def set_dri_path(self):
-        # As runqemu can be run within bitbake (when using testimage, for example),
-        # we need to ensure that we run host pkg-config, and that it does not
-        # get mis-directed to native build paths set by bitbake.
-        env = os.environ.copy()
-        try:
-            del env['PKG_CONFIG_PATH']
-            del env['PKG_CONFIG_DIR']
-            del env['PKG_CONFIG_LIBDIR']
-            del env['PKG_CONFIG_SYSROOT_DIR']
-        except KeyError:
-            pass
-        try:
-            dripath = subprocess.check_output("PATH=/bin:/usr/bin:$PATH pkg-config --variable=dridriverdir dri", shell=True, env=env)
-        except subprocess.CalledProcessError as e:
-            raise RunQemuError("Could not determine the path to dri drivers on the host via pkg-config.\nPlease install Mesa development files (particularly, dri.pc) on the host machine.")
-        self.qemu_environ['LIBGL_DRIVERS_PATH'] = dripath.decode('utf-8').strip()
-
-        # This preloads uninative libc pieces and therefore ensures that RPATH/RUNPATH
-        # in host mesa drivers doesn't trick uninative into loading host libc.
-        preload_items = ['libdl.so.2', 'librt.so.1', 'libpthread.so.0']
-        uninative_path = os.path.dirname(self.get("UNINATIVE_LOADER"))
-        if os.path.exists(uninative_path):
-            preload_paths = [os.path.join(uninative_path, i) for i in preload_items]
-            self.qemu_environ['LD_PRELOAD'] = " ".join(preload_paths)
+        drivers_path = os.path.join(self.bindir_native, '../lib/dri')
+        if not os.path.exists(drivers_path) or not os.listdir(drivers_path):
+            raise RunQemuError("""
+qemu has been built without opengl support and accelerated graphics support is not available.
+To enable it, add:
+DISTRO_FEATURES_NATIVE:append = " opengl"
+DISTRO_FEATURES_NATIVESDK:append = " opengl"
+to your build configuration.
+""")
+        self.qemu_environ['LIBGL_DRIVERS_PATH'] = drivers_path
 
     def check_args(self):
         for debug in ("-d", "--debug"):
-- 
2.30.2



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

* [PATCH 2/6] mesa: allow mesa-native/nativesdk only subject to opengl/vulkan DISTRO_FEATURE
  2023-03-16  9:40 [PATCH 1/6] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro Alexander Kanavin
@ 2023-03-16  9:40 ` Alexander Kanavin
  2023-03-16  9:40 ` [PATCH 3/6] mesa: enable a rich set of drivers for native builds Alexander Kanavin
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 16+ messages in thread
From: Alexander Kanavin @ 2023-03-16  9:40 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

This prevents accidental builds of it when native/nativesdk opengl
is not actually enabled (which may cause undesirable lengthening
of dependency chains or build failures because those dependencies
don't enable options required for mesa).

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 meta/recipes-graphics/mesa/mesa.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index c0b8f65625..775aab9297 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -51,7 +51,7 @@ inherit meson pkgconfig python3native gettext features_check
 
 BBCLASSEXTEND = "native nativesdk"
 
-ANY_OF_DISTRO_FEATURES:class-target = "opengl vulkan"
+ANY_OF_DISTRO_FEATURES = "opengl vulkan"
 
 PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)}"
 
-- 
2.30.2



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

* [PATCH 3/6] mesa: enable a rich set of drivers for native builds
  2023-03-16  9:40 [PATCH 1/6] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro Alexander Kanavin
  2023-03-16  9:40 ` [PATCH 2/6] mesa: allow mesa-native/nativesdk only subject to opengl/vulkan DISTRO_FEATURE Alexander Kanavin
@ 2023-03-16  9:40 ` Alexander Kanavin
  2023-03-20 17:10   ` [OE-core] " Ross Burton
  2023-03-16  9:41 ` [PATCH 4/6] llvm: allow building libllvm in native builds, subject to PACKAGECONFIG Alexander Kanavin
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 16+ messages in thread
From: Alexander Kanavin @ 2023-03-16  9:40 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

Without this, the only available driver would be swrast
(without llvmpipe) which is far too slow to be practical,
and so qemu wouldn't be able to perform accelerated graphics.

The one major dependency pulled in by this change is llvm-native
which takes just under three minutes on my machine. If this is
undesitable, opengl can be removed from DISTRO_FEATURES_NATIVE.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 meta/recipes-graphics/mesa/mesa.inc | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 775aab9297..dd15046438 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -89,6 +89,8 @@ PACKAGECONFIG = " \
 	${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'video-codecs', '', d)} \
 "
 
+PACKAGECONFIG:append:class-native = "gallium-llvm r600"
+
 # "gbm" requires "opengl"
 PACKAGECONFIG[gbm] = "-Dgbm=enabled,-Dgbm=disabled"
 
@@ -102,8 +104,10 @@ PACKAGECONFIG[dri3] = "-Ddri3=enabled, -Ddri3=disabled, xorgproto libxshmfence"
 # Vulkan drivers need dri3 enabled
 # amd 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"
+VULKAN_DRIVERS:append:x86 = ",intel"
+VULKAN_DRIVERS:append:x86-64 = ",intel"
+# i686 is a 32 bit override for mesa-native
+VULKAN_DRIVERS:append:i686 = ",intel"
 VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
 VULKAN_DRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'broadcom', ',broadcom', '', d)}"
 PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${@strip_comma('${VULKAN_DRIVERS}')}, -Dvulkan-drivers='',glslang-native vulkan-loader vulkan-headers"
@@ -149,8 +153,10 @@ PACKAGECONFIG[zink] = ""
 GALLIUMDRIVERS = "swrast"
 # gallium swrast was found to crash Xorg on startup in x32 qemu
 GALLIUMDRIVERS:x86-x32 = ""
-GALLIUMDRIVERS:append:x86:class-target = ",i915,iris,crocus"
-GALLIUMDRIVERS:append:x86-64:class-target = ",i915,iris,crocus"
+GALLIUMDRIVERS:append:x86 = ",i915,iris,crocus"
+GALLIUMDRIVERS:append:x86-64 = ",i915,iris,crocus"
+# i686 is a 32 bit override for mesa-native
+GALLIUMDRIVERS:append:i686 = ",i915,iris,crocus"
 
 GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}"
 GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
@@ -162,8 +168,10 @@ GALLIUMDRIVERS:append ="${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '
 # radeonsi requires LLVM
 GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}"
 GALLIUMDRIVERS_LLVM = "r300,nouveau${GALLIUMDRIVERS_RADEONSI}"
-GALLIUMDRIVERS_LLVM:append:x86:class-target = ",svga"
-GALLIUMDRIVERS_LLVM:append:x86-64:class-target = ",svga"
+GALLIUMDRIVERS_LLVM:append:x86 = ",svga"
+GALLIUMDRIVERS_LLVM:append:x86-64 = ",svga"
+# i686 is a 32 bit override for mesa-native
+GALLIUMDRIVERS_LLVM:append:i686 = ",svga"
 
 PACKAGECONFIG[r600] = ""
 PACKAGECONFIG[virgl] = ""
-- 
2.30.2



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

* [PATCH 4/6] llvm: allow building libllvm in native builds, subject to PACKAGECONFIG
  2023-03-16  9:40 [PATCH 1/6] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro Alexander Kanavin
  2023-03-16  9:40 ` [PATCH 2/6] mesa: allow mesa-native/nativesdk only subject to opengl/vulkan DISTRO_FEATURE Alexander Kanavin
  2023-03-16  9:40 ` [PATCH 3/6] mesa: enable a rich set of drivers for native builds Alexander Kanavin
@ 2023-03-16  9:41 ` Alexander Kanavin
  2023-03-20 16:20   ` [OE-core] " Ross Burton
  2023-03-16  9:41 ` [PATCH 5/6] mesa: do not strip rpaths from dri drivers Alexander Kanavin
  2023-03-16  9:41 ` [PATCH 6/6] mesa: update 22.3.5 -> 23.0.0 Alexander Kanavin
  4 siblings, 1 reply; 16+ messages in thread
From: Alexander Kanavin @ 2023-03-16  9:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

Also, enable that, if opengl is in native DISTRO_FEATURES: this allows
mesa-native to build drivers that rely on libllvm, particularly llvmpipe,
which is a (sort of) accelerated software renderer that is the only
option on build hosts without dedicated or supported GPUs.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 meta/recipes-devtools/llvm/llvm_git.bb | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-devtools/llvm/llvm_git.bb b/meta/recipes-devtools/llvm/llvm_git.bb
index b4e983d2d0..f133653903 100644
--- a/meta/recipes-devtools/llvm/llvm_git.bb
+++ b/meta/recipes-devtools/llvm/llvm_git.bb
@@ -57,9 +57,11 @@ def get_llvm_arch(bb, d, arch_var):
 def get_llvm_host_arch(bb, d):
     return get_llvm_arch(bb, d, 'HOST_ARCH')
 
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "libllvm"
+PACKAGECONFIG:class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'libllvm', '', d)}"
 # if optviewer OFF, force the modules to be not found or the ones on the host would be found
 PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml"
+PACKAGECONFIG[libllvm] = ""
 
 #
 # Default to build all OE-Core supported target arches (user overridable).
@@ -102,14 +104,15 @@ do_compile:prepend:class-target() {
 }
 
 do_compile() {
+    if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 'false', d)}; then
 	ninja -v ${PARALLEL_MAKE}
-}
-
-do_compile:class-native() {
+    else
 	ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen
+    fi
 }
 
 do_install() {
+    if ${@bb.utils.contains('PACKAGECONFIG', 'libllvm', 'true', 'false', d)}; then
 	DESTDIR=${D} ninja -v install
 
         # llvm harcodes usr/lib as install path, so this corrects it to actual libdir
@@ -121,9 +124,10 @@ do_install() {
 
         # reproducibility
         sed -i -e 's,${WORKDIR},,g' ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake
+    fi
 }
 
-do_install:class-native() {
+do_install:append:class-native() {
 	install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV}
 	install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV}
 	ln -sf llvm-config${PV} ${D}${bindir}/llvm-config
-- 
2.30.2



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

* [PATCH 5/6] mesa: do not strip rpaths from dri drivers
  2023-03-16  9:40 [PATCH 1/6] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro Alexander Kanavin
                   ` (2 preceding siblings ...)
  2023-03-16  9:41 ` [PATCH 4/6] llvm: allow building libllvm in native builds, subject to PACKAGECONFIG Alexander Kanavin
@ 2023-03-16  9:41 ` Alexander Kanavin
  2023-03-16  9:41 ` [PATCH 6/6] mesa: update 22.3.5 -> 23.0.0 Alexander Kanavin
  4 siblings, 0 replies; 16+ messages in thread
From: Alexander Kanavin @ 2023-03-16  9:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

This was needed back when we used upstream llvm-config which
would add bogus rpaths into the drivers; nowadays it is replaced
with a oe-specific wrapper.

The particular reason is that mesa-native relies on having rpaths
to work correctly (i.e. find other native libraries in the
same sysroot location).

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 meta/recipes-graphics/mesa/mesa.inc | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index dd15046438..b082b49400 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -247,9 +247,6 @@ do_install:append () {
     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
-    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
-- 
2.30.2



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

* [PATCH 6/6] mesa: update 22.3.5 -> 23.0.0
  2023-03-16  9:40 [PATCH 1/6] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro Alexander Kanavin
                   ` (3 preceding siblings ...)
  2023-03-16  9:41 ` [PATCH 5/6] mesa: do not strip rpaths from dri drivers Alexander Kanavin
@ 2023-03-16  9:41 ` Alexander Kanavin
  2023-03-18  2:47   ` [OE-core] " Khem Raj
  4 siblings, 1 reply; 16+ messages in thread
From: Alexander Kanavin @ 2023-03-16  9:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alexander Kanavin

Drop patches:
0001-gbm-backend-fix-gbm-compile-without-dri.patch
0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
(backports)

0001-util-format-Check-for-NEON-before-using-it.patch
(upstream submission has stalled with unanswered concerns from upstream;
patch no longer applies; issue does not reproduce with 'raspberrypi0-wifi' MACHINE)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 ...e-unsigned-instead-of-uint-to-fix-mu.patch | 44 -------------
 ...-backend-fix-gbm-compile-without-dri.patch | 65 -------------------
 ...ormat-Check-for-NEON-before-using-it.patch | 47 --------------
 .../{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb}  |  0
 meta/recipes-graphics/mesa/mesa.inc           |  5 +-
 .../mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb}   |  0
 6 files changed, 1 insertion(+), 160 deletions(-)
 delete mode 100644 meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
 delete mode 100644 meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
 delete mode 100644 meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
 rename meta/recipes-graphics/mesa/{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb} (100%)
 rename meta/recipes-graphics/mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb} (100%)

diff --git a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch b/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
deleted file mode 100644
index 3ab22889bf..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 8a5de0b6cf1090d7f29f3974ec79c32776cf2745 Mon Sep 17 00:00:00 2001
-From: Jami Kettunen <jami.kettunen@protonmail.com>
-Date: Tue, 31 Aug 2021 00:15:58 +0300
-Subject: [PATCH] freedreno/pm4: Use unsigned instead of uint to fix musl build
-
-Upstream-Status: Backport
-
-Fixes the following error I noticed when building against aarch64 with
-musl libc:
-
-  In file included from ../src/freedreno/decode/crashdec.h:38,
-                   from ../src/freedreno/decode/crashdec.c:40:
-  ../src/freedreno/common/freedreno_pm4.h:104:15: error: unknown type name 'uint'
-    104 | static inline uint
-        |               ^~~~
-  ../src/freedreno/common/freedreno_pm4.h:105:25: error: unknown type name 'uint'; did you mean 'int'?
-    105 | pm4_calc_odd_parity_bit(uint val)
-        |                         ^~~~
-        |                         int
-
-Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
-Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19665>
----
- src/freedreno/common/freedreno_pm4.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/freedreno/common/freedreno_pm4.h b/src/freedreno/common/freedreno_pm4.h
-index 8f958953d693..091247e709a0 100644
---- a/src/freedreno/common/freedreno_pm4.h
-+++ b/src/freedreno/common/freedreno_pm4.h
-@@ -105,8 +105,8 @@ pm4_pkt7_hdr(uint8_t opcode, uint16_t cnt)
- #define cp_type3_opcode(pkt) (((pkt) >> 8) & 0xFF)
- #define type3_pkt_size(pkt)  ((((pkt) >> 16) & 0x3FFF) + 1)
- 
--static inline uint
--pm4_calc_odd_parity_bit(uint val)
-+static inline unsigned
-+pm4_calc_odd_parity_bit(unsigned val)
- {
-    return (0x9669 >> (0xf & ((val) ^ ((val) >> 4) ^ ((val) >> 8) ^
-                              ((val) >> 12) ^ ((val) >> 16) ^ ((val) >> 20) ^
--- 
-2.39.2
-
diff --git a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch b/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
deleted file mode 100644
index 6541671b7a..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 25946100e21cf2095bea334e8d7096798561d0b7 Mon Sep 17 00:00:00 2001
-From: Vincent Davis Jr <vince@underview.tech>
-Date: Wed, 28 Dec 2022 16:28:01 -0600
-Subject: [PATCH] gbm/backend: fix gbm compile without dri
-
-Upstream-Status: Backport
-
-https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447
-https://gitlab.freedesktop.org/mesa/mesa/-/commit/842ca284650f066e58706741a7d22d67b5088e60
-
-At mesa version 22.2.3 patch wasn't introduced until after.
-
-Commit introduces a fix that allows for gbm to be built with an empty
-backend. There are situation especially in a Yocto/OE cross compilation
-environment where you want to build with an empty backend. The particular
-situation is as such:
-
-The mesa-gl recipe is the preferred provider for virtual/libgbm, virtual/libgl,
-virtual/mesa, etc... But the x11 DISTRO_FEATURE in't included this leads to build
-errors such as:
-
-| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in function `find_backend':
-| backend.c:(.text.find_backend+0xa4): undefined reference to `gbm_dri_backend'
-| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4):
-                undefined reference to `gbm_dri_backend'
-| collect2: error: ld returned 1 exit status
-
-Issue should be replicable by setting -Ddri3=disabled and -Dgbm=enabled
-
-Add fix to bypasses compilation issue by excluding gbm dri backend. If
-HAVE_DRI || HAVE_DRIX not specified.
-
-Acked-by: David Heidelberg <david.heidelberg@collabora.com>
-Signed-off-by: Vincent Davis Jr <vince@underview.tech>
----
- src/gbm/main/backend.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c
-index 974d0a76a4e..feee0703495 100644
---- a/src/gbm/main/backend.c
-+++ b/src/gbm/main/backend.c
-@@ -42,7 +42,9 @@
- #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
- #define VER_MIN(a, b) ((a) < (b) ? (a) : (b))
- 
-+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
- extern const struct gbm_backend gbm_dri_backend;
-+#endif
- 
- struct gbm_backend_desc {
-    const char *name;
-@@ -51,7 +53,9 @@ struct gbm_backend_desc {
- };
- 
- static const struct gbm_backend_desc builtin_backends[] = {
-+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
-    { "dri", &gbm_dri_backend },
-+#endif
- };
- 
- #define BACKEND_LIB_SUFFIX "_gbm"
--- 
-2.34.1
-
diff --git a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch b/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
deleted file mode 100644
index d22ff3c8a8..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From f17e836ef9b1bbc6056790596420b699e48128c2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 2 Dec 2021 19:57:42 -0800
-Subject: [PATCH] util/format: Check for NEON before using it
-
-This fixes build on rpi0-w and any other machine which does not have
-neon unit and is not used as FPU unit
-
-Fixes errors e.g.
-
-In file included from ../mesa-21.3.0/src/util/format/u_format_unpack_neon.c:35:
-/mnt/b/yoe/master/build/tmp/work/arm1176jzfshf-vfp-yoe-linux-gnueabi/mesa/2_21.3.0-r0/recipe-sysroot-native/usr/lib/clang/13.0.1/include/arm_neon.h:32:2: error: "NEON support not enabled"
-
-Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14032]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
----
- src/util/format/u_format.c             | 2 +-
- src/util/format/u_format_unpack_neon.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c
-index c071250..0880984 100644
---- a/src/util/format/u_format.c
-+++ b/src/util/format/u_format.c
-@@ -1184,7 +1184,7 @@ static void
- util_format_unpack_table_init(void)
- {
-    for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) {
--#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
-+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
-       const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format);
-       if (unpack) {
-          util_format_unpack_table[format] = unpack;
-diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_unpack_neon.c
-index a4a5cb1..1e4f794 100644
---- a/src/util/format/u_format_unpack_neon.c
-+++ b/src/util/format/u_format_unpack_neon.c
-@@ -23,7 +23,7 @@
- 
- #include <u_format.h>
- 
--#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
-+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
- 
- /* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics
-  * unless you tell it "no really".
diff --git a/meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb b/meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
similarity index 100%
rename from meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb
rename to meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index b082b49400..8f72f25c17 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -17,12 +17,9 @@ PE = "2"
 SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
            file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
            file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
-           file://0001-util-format-Check-for-NEON-before-using-it.patch \
-           file://0001-gbm-backend-fix-gbm-compile-without-dri.patch \
-           file://0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch \
            "
 
-SRC_URI[sha256sum] = "3eed2ecae2bc674494566faab9fcc9beb21cd804c7ba2b59a1694f3d7236e6a9"
+SRC_URI[sha256sum] = "01f3cff3763f09e0adabcb8011e4aebc6ad48f6a4dd4bae904fe918707d253e4"
 
 UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
 
diff --git a/meta/recipes-graphics/mesa/mesa_22.3.5.bb b/meta/recipes-graphics/mesa/mesa_23.0.0.bb
similarity index 100%
rename from meta/recipes-graphics/mesa/mesa_22.3.5.bb
rename to meta/recipes-graphics/mesa/mesa_23.0.0.bb
-- 
2.30.2



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

* Re: [OE-core] [PATCH 6/6] mesa: update 22.3.5 -> 23.0.0
  2023-03-16  9:41 ` [PATCH 6/6] mesa: update 22.3.5 -> 23.0.0 Alexander Kanavin
@ 2023-03-18  2:47   ` Khem Raj
  2023-03-18  8:01     ` Alexander Kanavin
  0 siblings, 1 reply; 16+ messages in thread
From: Khem Raj @ 2023-03-18  2:47 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: openembedded-core, Alexander Kanavin

mesa 23.x fails to build with default gcc ( 7.5.0 ) Ubuntu
7.5.0-3ubuntu1~18.04, it ends up with

../mesa-23.0.0/src/intel/compiler/brw_simd_selection.cpp: In function
‘int brw_simd_select_for_workgroup_size(const intel_device_info*,
const brw_cs_prog_data*, const unsigned int*)’:
../mesa-23.0.0/src/intel/compiler/brw_simd_selection.cpp:205:7: sorry,
unimplemented: non-trivial designated initializers not supported
       };
       ^

see mesa-native failure

https://errors.yoctoproject.org/Errors/Details/698144/

I wonder how it works on AB nodes running Ubuntu 18.04. Do we enforce
gcc from buildtools tarball there ?

On Thu, Mar 16, 2023 at 2:41 AM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> Drop patches:
> 0001-gbm-backend-fix-gbm-compile-without-dri.patch
> 0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> (backports)
>
> 0001-util-format-Check-for-NEON-before-using-it.patch
> (upstream submission has stalled with unanswered concerns from upstream;
> patch no longer applies; issue does not reproduce with 'raspberrypi0-wifi' MACHINE)
>
> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> ---
>  ...e-unsigned-instead-of-uint-to-fix-mu.patch | 44 -------------
>  ...-backend-fix-gbm-compile-without-dri.patch | 65 -------------------
>  ...ormat-Check-for-NEON-before-using-it.patch | 47 --------------
>  .../{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb}  |  0
>  meta/recipes-graphics/mesa/mesa.inc           |  5 +-
>  .../mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb}   |  0
>  6 files changed, 1 insertion(+), 160 deletions(-)
>  delete mode 100644 meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
>  delete mode 100644 meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
>  delete mode 100644 meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
>  rename meta/recipes-graphics/mesa/{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb} (100%)
>  rename meta/recipes-graphics/mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb} (100%)
>
> diff --git a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch b/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> deleted file mode 100644
> index 3ab22889bf..0000000000
> --- a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> +++ /dev/null
> @@ -1,44 +0,0 @@
> -From 8a5de0b6cf1090d7f29f3974ec79c32776cf2745 Mon Sep 17 00:00:00 2001
> -From: Jami Kettunen <jami.kettunen@protonmail.com>
> -Date: Tue, 31 Aug 2021 00:15:58 +0300
> -Subject: [PATCH] freedreno/pm4: Use unsigned instead of uint to fix musl build
> -
> -Upstream-Status: Backport
> -
> -Fixes the following error I noticed when building against aarch64 with
> -musl libc:
> -
> -  In file included from ../src/freedreno/decode/crashdec.h:38,
> -                   from ../src/freedreno/decode/crashdec.c:40:
> -  ../src/freedreno/common/freedreno_pm4.h:104:15: error: unknown type name 'uint'
> -    104 | static inline uint
> -        |               ^~~~
> -  ../src/freedreno/common/freedreno_pm4.h:105:25: error: unknown type name 'uint'; did you mean 'int'?
> -    105 | pm4_calc_odd_parity_bit(uint val)
> -        |                         ^~~~
> -        |                         int
> -
> -Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
> -Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19665>
> ----
> - src/freedreno/common/freedreno_pm4.h | 4 ++--
> - 1 file changed, 2 insertions(+), 2 deletions(-)
> -
> -diff --git a/src/freedreno/common/freedreno_pm4.h b/src/freedreno/common/freedreno_pm4.h
> -index 8f958953d693..091247e709a0 100644
> ---- a/src/freedreno/common/freedreno_pm4.h
> -+++ b/src/freedreno/common/freedreno_pm4.h
> -@@ -105,8 +105,8 @@ pm4_pkt7_hdr(uint8_t opcode, uint16_t cnt)
> - #define cp_type3_opcode(pkt) (((pkt) >> 8) & 0xFF)
> - #define type3_pkt_size(pkt)  ((((pkt) >> 16) & 0x3FFF) + 1)
> -
> --static inline uint
> --pm4_calc_odd_parity_bit(uint val)
> -+static inline unsigned
> -+pm4_calc_odd_parity_bit(unsigned val)
> - {
> -    return (0x9669 >> (0xf & ((val) ^ ((val) >> 4) ^ ((val) >> 8) ^
> -                              ((val) >> 12) ^ ((val) >> 16) ^ ((val) >> 20) ^
> ---
> -2.39.2
> -
> diff --git a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch b/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
> deleted file mode 100644
> index 6541671b7a..0000000000
> --- a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
> +++ /dev/null
> @@ -1,65 +0,0 @@
> -From 25946100e21cf2095bea334e8d7096798561d0b7 Mon Sep 17 00:00:00 2001
> -From: Vincent Davis Jr <vince@underview.tech>
> -Date: Wed, 28 Dec 2022 16:28:01 -0600
> -Subject: [PATCH] gbm/backend: fix gbm compile without dri
> -
> -Upstream-Status: Backport
> -
> -https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447
> -https://gitlab.freedesktop.org/mesa/mesa/-/commit/842ca284650f066e58706741a7d22d67b5088e60
> -
> -At mesa version 22.2.3 patch wasn't introduced until after.
> -
> -Commit introduces a fix that allows for gbm to be built with an empty
> -backend. There are situation especially in a Yocto/OE cross compilation
> -environment where you want to build with an empty backend. The particular
> -situation is as such:
> -
> -The mesa-gl recipe is the preferred provider for virtual/libgbm, virtual/libgl,
> -virtual/mesa, etc... But the x11 DISTRO_FEATURE in't included this leads to build
> -errors such as:
> -
> -| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in function `find_backend':
> -| backend.c:(.text.find_backend+0xa4): undefined reference to `gbm_dri_backend'
> -| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4):
> -                undefined reference to `gbm_dri_backend'
> -| collect2: error: ld returned 1 exit status
> -
> -Issue should be replicable by setting -Ddri3=disabled and -Dgbm=enabled
> -
> -Add fix to bypasses compilation issue by excluding gbm dri backend. If
> -HAVE_DRI || HAVE_DRIX not specified.
> -
> -Acked-by: David Heidelberg <david.heidelberg@collabora.com>
> -Signed-off-by: Vincent Davis Jr <vince@underview.tech>
> ----
> - src/gbm/main/backend.c | 4 ++++
> - 1 file changed, 4 insertions(+)
> -
> -diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c
> -index 974d0a76a4e..feee0703495 100644
> ---- a/src/gbm/main/backend.c
> -+++ b/src/gbm/main/backend.c
> -@@ -42,7 +42,9 @@
> - #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
> - #define VER_MIN(a, b) ((a) < (b) ? (a) : (b))
> -
> -+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
> - extern const struct gbm_backend gbm_dri_backend;
> -+#endif
> -
> - struct gbm_backend_desc {
> -    const char *name;
> -@@ -51,7 +53,9 @@ struct gbm_backend_desc {
> - };
> -
> - static const struct gbm_backend_desc builtin_backends[] = {
> -+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
> -    { "dri", &gbm_dri_backend },
> -+#endif
> - };
> -
> - #define BACKEND_LIB_SUFFIX "_gbm"
> ---
> -2.34.1
> -
> diff --git a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch b/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> deleted file mode 100644
> index d22ff3c8a8..0000000000
> --- a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> +++ /dev/null
> @@ -1,47 +0,0 @@
> -From f17e836ef9b1bbc6056790596420b699e48128c2 Mon Sep 17 00:00:00 2001
> -From: Khem Raj <raj.khem@gmail.com>
> -Date: Thu, 2 Dec 2021 19:57:42 -0800
> -Subject: [PATCH] util/format: Check for NEON before using it
> -
> -This fixes build on rpi0-w and any other machine which does not have
> -neon unit and is not used as FPU unit
> -
> -Fixes errors e.g.
> -
> -In file included from ../mesa-21.3.0/src/util/format/u_format_unpack_neon.c:35:
> -/mnt/b/yoe/master/build/tmp/work/arm1176jzfshf-vfp-yoe-linux-gnueabi/mesa/2_21.3.0-r0/recipe-sysroot-native/usr/lib/clang/13.0.1/include/arm_neon.h:32:2: error: "NEON support not enabled"
> -
> -Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14032]
> -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> -
> ----
> - src/util/format/u_format.c             | 2 +-
> - src/util/format/u_format_unpack_neon.c | 2 +-
> - 2 files changed, 2 insertions(+), 2 deletions(-)
> -
> -diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c
> -index c071250..0880984 100644
> ---- a/src/util/format/u_format.c
> -+++ b/src/util/format/u_format.c
> -@@ -1184,7 +1184,7 @@ static void
> - util_format_unpack_table_init(void)
> - {
> -    for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) {
> --#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
> -+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
> -       const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format);
> -       if (unpack) {
> -          util_format_unpack_table[format] = unpack;
> -diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_unpack_neon.c
> -index a4a5cb1..1e4f794 100644
> ---- a/src/util/format/u_format_unpack_neon.c
> -+++ b/src/util/format/u_format_unpack_neon.c
> -@@ -23,7 +23,7 @@
> -
> - #include <u_format.h>
> -
> --#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
> -+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
> -
> - /* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics
> -  * unless you tell it "no really".
> diff --git a/meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb b/meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
> similarity index 100%
> rename from meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb
> rename to meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
> diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
> index b082b49400..8f72f25c17 100644
> --- a/meta/recipes-graphics/mesa/mesa.inc
> +++ b/meta/recipes-graphics/mesa/mesa.inc
> @@ -17,12 +17,9 @@ PE = "2"
>  SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
>             file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
>             file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
> -           file://0001-util-format-Check-for-NEON-before-using-it.patch \
> -           file://0001-gbm-backend-fix-gbm-compile-without-dri.patch \
> -           file://0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch \
>             "
>
> -SRC_URI[sha256sum] = "3eed2ecae2bc674494566faab9fcc9beb21cd804c7ba2b59a1694f3d7236e6a9"
> +SRC_URI[sha256sum] = "01f3cff3763f09e0adabcb8011e4aebc6ad48f6a4dd4bae904fe918707d253e4"
>
>  UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
>
> diff --git a/meta/recipes-graphics/mesa/mesa_22.3.5.bb b/meta/recipes-graphics/mesa/mesa_23.0.0.bb
> similarity index 100%
> rename from meta/recipes-graphics/mesa/mesa_22.3.5.bb
> rename to meta/recipes-graphics/mesa/mesa_23.0.0.bb
> --
> 2.30.2
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#178696): https://lists.openembedded.org/g/openembedded-core/message/178696
> Mute This Topic: https://lists.openembedded.org/mt/97647023/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

* Re: [OE-core] [PATCH 6/6] mesa: update 22.3.5 -> 23.0.0
  2023-03-18  2:47   ` [OE-core] " Khem Raj
@ 2023-03-18  8:01     ` Alexander Kanavin
  2023-03-18 18:37       ` Khem Raj
  0 siblings, 1 reply; 16+ messages in thread
From: Alexander Kanavin @ 2023-03-18  8:01 UTC (permalink / raw)
  To: Khem Raj; +Cc: Alexander Kanavin, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 13003 bytes --]

Ubuntu 18.04 goes EOL next month, so it should perhaps be dropped from the
builders and supported distro list?

Alex

On Sat 18. Mar 2023 at 2.47, Khem Raj <raj.khem@gmail.com> wrote:

> mesa 23.x fails to build with default gcc ( 7.5.0 ) Ubuntu
> 7.5.0-3ubuntu1~18.04, it ends up with
>
> ../mesa-23.0.0/src/intel/compiler/brw_simd_selection.cpp: In function
> ‘int brw_simd_select_for_workgroup_size(const intel_device_info*,
> const brw_cs_prog_data*, const unsigned int*)’:
> ../mesa-23.0.0/src/intel/compiler/brw_simd_selection.cpp:205:7: sorry,
> unimplemented: non-trivial designated initializers not supported
>        };
>        ^
>
> see mesa-native failure
>
> https://errors.yoctoproject.org/Errors/Details/698144/
>
> I wonder how it works on AB nodes running Ubuntu 18.04. Do we enforce
> gcc from buildtools tarball there ?
>
> On Thu, Mar 16, 2023 at 2:41 AM Alexander Kanavin
> <alex.kanavin@gmail.com> wrote:
> >
> > Drop patches:
> > 0001-gbm-backend-fix-gbm-compile-without-dri.patch
> > 0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> > (backports)
> >
> > 0001-util-format-Check-for-NEON-before-using-it.patch
> > (upstream submission has stalled with unanswered concerns from upstream;
> > patch no longer applies; issue does not reproduce with
> 'raspberrypi0-wifi' MACHINE)
> >
> > Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> > ---
> >  ...e-unsigned-instead-of-uint-to-fix-mu.patch | 44 -------------
> >  ...-backend-fix-gbm-compile-without-dri.patch | 65 -------------------
> >  ...ormat-Check-for-NEON-before-using-it.patch | 47 --------------
> >  .../{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb}  |  0
> >  meta/recipes-graphics/mesa/mesa.inc           |  5 +-
> >  .../mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb}   |  0
> >  6 files changed, 1 insertion(+), 160 deletions(-)
> >  delete mode 100644
> meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> >  delete mode 100644
> meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
> >  delete mode 100644
> meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> >  rename meta/recipes-graphics/mesa/{mesa-gl_22.3.5.bb =>
> mesa-gl_23.0.0.bb} (100%)
> >  rename meta/recipes-graphics/mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb}
> (100%)
> >
> > diff --git
> a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> b/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> > deleted file mode 100644
> > index 3ab22889bf..0000000000
> > ---
> a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> > +++ /dev/null
> > @@ -1,44 +0,0 @@
> > -From 8a5de0b6cf1090d7f29f3974ec79c32776cf2745 Mon Sep 17 00:00:00 2001
> > -From: Jami Kettunen <jami.kettunen@protonmail.com>
> > -Date: Tue, 31 Aug 2021 00:15:58 +0300
> > -Subject: [PATCH] freedreno/pm4: Use unsigned instead of uint to fix
> musl build
> > -
> > -Upstream-Status: Backport
> > -
> > -Fixes the following error I noticed when building against aarch64 with
> > -musl libc:
> > -
> > -  In file included from ../src/freedreno/decode/crashdec.h:38,
> > -                   from ../src/freedreno/decode/crashdec.c:40:
> > -  ../src/freedreno/common/freedreno_pm4.h:104:15: error: unknown type
> name 'uint'
> > -    104 | static inline uint
> > -        |               ^~~~
> > -  ../src/freedreno/common/freedreno_pm4.h:105:25: error: unknown type
> name 'uint'; did you mean 'int'?
> > -    105 | pm4_calc_odd_parity_bit(uint val)
> > -        |                         ^~~~
> > -        |                         int
> > -
> > -Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
> > -Part-of: <
> https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19665>
> > ----
> > - src/freedreno/common/freedreno_pm4.h | 4 ++--
> > - 1 file changed, 2 insertions(+), 2 deletions(-)
> > -
> > -diff --git a/src/freedreno/common/freedreno_pm4.h
> b/src/freedreno/common/freedreno_pm4.h
> > -index 8f958953d693..091247e709a0 100644
> > ---- a/src/freedreno/common/freedreno_pm4.h
> > -+++ b/src/freedreno/common/freedreno_pm4.h
> > -@@ -105,8 +105,8 @@ pm4_pkt7_hdr(uint8_t opcode, uint16_t cnt)
> > - #define cp_type3_opcode(pkt) (((pkt) >> 8) & 0xFF)
> > - #define type3_pkt_size(pkt)  ((((pkt) >> 16) & 0x3FFF) + 1)
> > -
> > --static inline uint
> > --pm4_calc_odd_parity_bit(uint val)
> > -+static inline unsigned
> > -+pm4_calc_odd_parity_bit(unsigned val)
> > - {
> > -    return (0x9669 >> (0xf & ((val) ^ ((val) >> 4) ^ ((val) >> 8) ^
> > -                              ((val) >> 12) ^ ((val) >> 16) ^ ((val) >>
> 20) ^
> > ---
> > -2.39.2
> > -
> > diff --git
> a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
> b/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
> > deleted file mode 100644
> > index 6541671b7a..0000000000
> > ---
> a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
> > +++ /dev/null
> > @@ -1,65 +0,0 @@
> > -From 25946100e21cf2095bea334e8d7096798561d0b7 Mon Sep 17 00:00:00 2001
> > -From: Vincent Davis Jr <vince@underview.tech>
> > -Date: Wed, 28 Dec 2022 16:28:01 -0600
> > -Subject: [PATCH] gbm/backend: fix gbm compile without dri
> > -
> > -Upstream-Status: Backport
> > -
> > -https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447
> > -
> https://gitlab.freedesktop.org/mesa/mesa/-/commit/842ca284650f066e58706741a7d22d67b5088e60
> > -
> > -At mesa version 22.2.3 patch wasn't introduced until after.
> > -
> > -Commit introduces a fix that allows for gbm to be built with an empty
> > -backend. There are situation especially in a Yocto/OE cross compilation
> > -environment where you want to build with an empty backend. The
> particular
> > -situation is as such:
> > -
> > -The mesa-gl recipe is the preferred provider for virtual/libgbm,
> virtual/libgl,
> > -virtual/mesa, etc... But the x11 DISTRO_FEATURE in't included this
> leads to build
> > -errors such as:
> > -
> > -| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in function
> `find_backend':
> > -| backend.c:(.text.find_backend+0xa4): undefined reference to
> `gbm_dri_backend'
> > -| /../../../ld:
> src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4):
> > -                undefined reference to `gbm_dri_backend'
> > -| collect2: error: ld returned 1 exit status
> > -
> > -Issue should be replicable by setting -Ddri3=disabled and -Dgbm=enabled
> > -
> > -Add fix to bypasses compilation issue by excluding gbm dri backend. If
> > -HAVE_DRI || HAVE_DRIX not specified.
> > -
> > -Acked-by: David Heidelberg <david.heidelberg@collabora.com>
> > -Signed-off-by: Vincent Davis Jr <vince@underview.tech>
> > ----
> > - src/gbm/main/backend.c | 4 ++++
> > - 1 file changed, 4 insertions(+)
> > -
> > -diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c
> > -index 974d0a76a4e..feee0703495 100644
> > ---- a/src/gbm/main/backend.c
> > -+++ b/src/gbm/main/backend.c
> > -@@ -42,7 +42,9 @@
> > - #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
> > - #define VER_MIN(a, b) ((a) < (b) ? (a) : (b))
> > -
> > -+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
> > - extern const struct gbm_backend gbm_dri_backend;
> > -+#endif
> > -
> > - struct gbm_backend_desc {
> > -    const char *name;
> > -@@ -51,7 +53,9 @@ struct gbm_backend_desc {
> > - };
> > -
> > - static const struct gbm_backend_desc builtin_backends[] = {
> > -+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
> > -    { "dri", &gbm_dri_backend },
> > -+#endif
> > - };
> > -
> > - #define BACKEND_LIB_SUFFIX "_gbm"
> > ---
> > -2.34.1
> > -
> > diff --git
> a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> b/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> > deleted file mode 100644
> > index d22ff3c8a8..0000000000
> > ---
> a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> > +++ /dev/null
> > @@ -1,47 +0,0 @@
> > -From f17e836ef9b1bbc6056790596420b699e48128c2 Mon Sep 17 00:00:00 2001
> > -From: Khem Raj <raj.khem@gmail.com>
> > -Date: Thu, 2 Dec 2021 19:57:42 -0800
> > -Subject: [PATCH] util/format: Check for NEON before using it
> > -
> > -This fixes build on rpi0-w and any other machine which does not have
> > -neon unit and is not used as FPU unit
> > -
> > -Fixes errors e.g.
> > -
> > -In file included from
> ../mesa-21.3.0/src/util/format/u_format_unpack_neon.c:35:
> >
> -/mnt/b/yoe/master/build/tmp/work/arm1176jzfshf-vfp-yoe-linux-gnueabi/mesa/2_21.3.0-r0/recipe-sysroot-native/usr/lib/clang/13.0.1/include/arm_neon.h:32:2:
> error: "NEON support not enabled"
> > -
> > -Upstream-Status: Submitted [
> https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14032]
> > -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > -
> > ----
> > - src/util/format/u_format.c             | 2 +-
> > - src/util/format/u_format_unpack_neon.c | 2 +-
> > - 2 files changed, 2 insertions(+), 2 deletions(-)
> > -
> > -diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c
> > -index c071250..0880984 100644
> > ---- a/src/util/format/u_format.c
> > -+++ b/src/util/format/u_format.c
> > -@@ -1184,7 +1184,7 @@ static void
> > - util_format_unpack_table_init(void)
> > - {
> > -    for (enum pipe_format format = PIPE_FORMAT_NONE; format <
> PIPE_FORMAT_COUNT; format++) {
> > --#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) &&
> !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
> > -+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) &&
> defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
> > -       const struct util_format_unpack_description *unpack =
> util_format_unpack_description_neon(format);
> > -       if (unpack) {
> > -          util_format_unpack_table[format] = unpack;
> > -diff --git a/src/util/format/u_format_unpack_neon.c
> b/src/util/format/u_format_unpack_neon.c
> > -index a4a5cb1..1e4f794 100644
> > ---- a/src/util/format/u_format_unpack_neon.c
> > -+++ b/src/util/format/u_format_unpack_neon.c
> > -@@ -23,7 +23,7 @@
> > -
> > - #include <u_format.h>
> > -
> > --#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) &&
> !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
> > -+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) &&
> defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
> > -
> > - /* armhf builds default to vfp, not neon, and refuses to compile neon
> intrinsics
> > -  * unless you tell it "no really".
> > diff --git a/meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb
> b/meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
> > similarity index 100%
> > rename from meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb
> > rename to meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
> > diff --git a/meta/recipes-graphics/mesa/mesa.inc
> b/meta/recipes-graphics/mesa/mesa.inc
> > index b082b49400..8f72f25c17 100644
> > --- a/meta/recipes-graphics/mesa/mesa.inc
> > +++ b/meta/recipes-graphics/mesa/mesa.inc
> > @@ -17,12 +17,9 @@ PE = "2"
> >  SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
> >
>  file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
> >
>  file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
> > -           file://0001-util-format-Check-for-NEON-before-using-it.patch
> \
> > -           file://0001-gbm-backend-fix-gbm-compile-without-dri.patch \
> > -
>  file://0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch \
> >             "
> >
> > -SRC_URI[sha256sum] =
> "3eed2ecae2bc674494566faab9fcc9beb21cd804c7ba2b59a1694f3d7236e6a9"
> > +SRC_URI[sha256sum] =
> "01f3cff3763f09e0adabcb8011e4aebc6ad48f6a4dd4bae904fe918707d253e4"
> >
> >  UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
> >
> > diff --git a/meta/recipes-graphics/mesa/mesa_22.3.5.bb
> b/meta/recipes-graphics/mesa/mesa_23.0.0.bb
> > similarity index 100%
> > rename from meta/recipes-graphics/mesa/mesa_22.3.5.bb
> > rename to meta/recipes-graphics/mesa/mesa_23.0.0.bb
> > --
> > 2.30.2
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#178696):
> https://lists.openembedded.org/g/openembedded-core/message/178696
> > Mute This Topic: https://lists.openembedded.org/mt/97647023/1997914
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>

[-- Attachment #2: Type: text/html, Size: 17716 bytes --]

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

* Re: [OE-core] [PATCH 6/6] mesa: update 22.3.5 -> 23.0.0
  2023-03-18  8:01     ` Alexander Kanavin
@ 2023-03-18 18:37       ` Khem Raj
  2023-03-18 18:57         ` Martin Jansa
  2023-03-20  7:09         ` Alexander Kanavin
  0 siblings, 2 replies; 16+ messages in thread
From: Khem Raj @ 2023-03-18 18:37 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: Alexander Kanavin, openembedded-core

On Sat, Mar 18, 2023 at 1:02 AM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> Ubuntu 18.04 goes EOL next month, so it should perhaps be dropped from the builders and supported distro list?
>

Perhaps in the next cycle yes and definitely for the next LTS it
should be dropped.

Its stll supported via Extended Security Maintenance (ESM)  and users
maybe still be using it.

mesa needs gcc > 8 as per
https://docs.mesa3d.org/install.html?highlight=gcc+version#compiler
so 7.5 default on ubuntu 18.04 is falling under unsupported compilers
for mesa. So we should be recommending
buildtools-tarball-extra and also installing it on ubuntu 18.04 workers.

> Alex
>
> On Sat 18. Mar 2023 at 2.47, Khem Raj <raj.khem@gmail.com> wrote:
>>
>> mesa 23.x fails to build with default gcc ( 7.5.0 ) Ubuntu
>> 7.5.0-3ubuntu1~18.04, it ends up with
>>
>> ../mesa-23.0.0/src/intel/compiler/brw_simd_selection.cpp: In function
>> ‘int brw_simd_select_for_workgroup_size(const intel_device_info*,
>> const brw_cs_prog_data*, const unsigned int*)’:
>> ../mesa-23.0.0/src/intel/compiler/brw_simd_selection.cpp:205:7: sorry,
>> unimplemented: non-trivial designated initializers not supported
>>        };
>>        ^
>>
>> see mesa-native failure
>>
>> https://errors.yoctoproject.org/Errors/Details/698144/
>>
>> I wonder how it works on AB nodes running Ubuntu 18.04. Do we enforce
>> gcc from buildtools tarball there ?
>>
>> On Thu, Mar 16, 2023 at 2:41 AM Alexander Kanavin
>> <alex.kanavin@gmail.com> wrote:
>> >
>> > Drop patches:
>> > 0001-gbm-backend-fix-gbm-compile-without-dri.patch
>> > 0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
>> > (backports)
>> >
>> > 0001-util-format-Check-for-NEON-before-using-it.patch
>> > (upstream submission has stalled with unanswered concerns from upstream;
>> > patch no longer applies; issue does not reproduce with 'raspberrypi0-wifi' MACHINE)
>> >
>> > Signed-off-by: Alexander Kanavin <alex@linutronix.de>
>> > ---
>> >  ...e-unsigned-instead-of-uint-to-fix-mu.patch | 44 -------------
>> >  ...-backend-fix-gbm-compile-without-dri.patch | 65 -------------------
>> >  ...ormat-Check-for-NEON-before-using-it.patch | 47 --------------
>> >  .../{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb}  |  0
>> >  meta/recipes-graphics/mesa/mesa.inc           |  5 +-
>> >  .../mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb}   |  0
>> >  6 files changed, 1 insertion(+), 160 deletions(-)
>> >  delete mode 100644 meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
>> >  delete mode 100644 meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
>> >  delete mode 100644 meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
>> >  rename meta/recipes-graphics/mesa/{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb} (100%)
>> >  rename meta/recipes-graphics/mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb} (100%)
>> >
>> > diff --git a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch b/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
>> > deleted file mode 100644
>> > index 3ab22889bf..0000000000
>> > --- a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
>> > +++ /dev/null
>> > @@ -1,44 +0,0 @@
>> > -From 8a5de0b6cf1090d7f29f3974ec79c32776cf2745 Mon Sep 17 00:00:00 2001
>> > -From: Jami Kettunen <jami.kettunen@protonmail.com>
>> > -Date: Tue, 31 Aug 2021 00:15:58 +0300
>> > -Subject: [PATCH] freedreno/pm4: Use unsigned instead of uint to fix musl build
>> > -
>> > -Upstream-Status: Backport
>> > -
>> > -Fixes the following error I noticed when building against aarch64 with
>> > -musl libc:
>> > -
>> > -  In file included from ../src/freedreno/decode/crashdec.h:38,
>> > -                   from ../src/freedreno/decode/crashdec.c:40:
>> > -  ../src/freedreno/common/freedreno_pm4.h:104:15: error: unknown type name 'uint'
>> > -    104 | static inline uint
>> > -        |               ^~~~
>> > -  ../src/freedreno/common/freedreno_pm4.h:105:25: error: unknown type name 'uint'; did you mean 'int'?
>> > -    105 | pm4_calc_odd_parity_bit(uint val)
>> > -        |                         ^~~~
>> > -        |                         int
>> > -
>> > -Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
>> > -Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19665>
>> > ----
>> > - src/freedreno/common/freedreno_pm4.h | 4 ++--
>> > - 1 file changed, 2 insertions(+), 2 deletions(-)
>> > -
>> > -diff --git a/src/freedreno/common/freedreno_pm4.h b/src/freedreno/common/freedreno_pm4.h
>> > -index 8f958953d693..091247e709a0 100644
>> > ---- a/src/freedreno/common/freedreno_pm4.h
>> > -+++ b/src/freedreno/common/freedreno_pm4.h
>> > -@@ -105,8 +105,8 @@ pm4_pkt7_hdr(uint8_t opcode, uint16_t cnt)
>> > - #define cp_type3_opcode(pkt) (((pkt) >> 8) & 0xFF)
>> > - #define type3_pkt_size(pkt)  ((((pkt) >> 16) & 0x3FFF) + 1)
>> > -
>> > --static inline uint
>> > --pm4_calc_odd_parity_bit(uint val)
>> > -+static inline unsigned
>> > -+pm4_calc_odd_parity_bit(unsigned val)
>> > - {
>> > -    return (0x9669 >> (0xf & ((val) ^ ((val) >> 4) ^ ((val) >> 8) ^
>> > -                              ((val) >> 12) ^ ((val) >> 16) ^ ((val) >> 20) ^
>> > ---
>> > -2.39.2
>> > -
>> > diff --git a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch b/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
>> > deleted file mode 100644
>> > index 6541671b7a..0000000000
>> > --- a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
>> > +++ /dev/null
>> > @@ -1,65 +0,0 @@
>> > -From 25946100e21cf2095bea334e8d7096798561d0b7 Mon Sep 17 00:00:00 2001
>> > -From: Vincent Davis Jr <vince@underview.tech>
>> > -Date: Wed, 28 Dec 2022 16:28:01 -0600
>> > -Subject: [PATCH] gbm/backend: fix gbm compile without dri
>> > -
>> > -Upstream-Status: Backport
>> > -
>> > -https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447
>> > -https://gitlab.freedesktop.org/mesa/mesa/-/commit/842ca284650f066e58706741a7d22d67b5088e60
>> > -
>> > -At mesa version 22.2.3 patch wasn't introduced until after.
>> > -
>> > -Commit introduces a fix that allows for gbm to be built with an empty
>> > -backend. There are situation especially in a Yocto/OE cross compilation
>> > -environment where you want to build with an empty backend. The particular
>> > -situation is as such:
>> > -
>> > -The mesa-gl recipe is the preferred provider for virtual/libgbm, virtual/libgl,
>> > -virtual/mesa, etc... But the x11 DISTRO_FEATURE in't included this leads to build
>> > -errors such as:
>> > -
>> > -| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in function `find_backend':
>> > -| backend.c:(.text.find_backend+0xa4): undefined reference to `gbm_dri_backend'
>> > -| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4):
>> > -                undefined reference to `gbm_dri_backend'
>> > -| collect2: error: ld returned 1 exit status
>> > -
>> > -Issue should be replicable by setting -Ddri3=disabled and -Dgbm=enabled
>> > -
>> > -Add fix to bypasses compilation issue by excluding gbm dri backend. If
>> > -HAVE_DRI || HAVE_DRIX not specified.
>> > -
>> > -Acked-by: David Heidelberg <david.heidelberg@collabora.com>
>> > -Signed-off-by: Vincent Davis Jr <vince@underview.tech>
>> > ----
>> > - src/gbm/main/backend.c | 4 ++++
>> > - 1 file changed, 4 insertions(+)
>> > -
>> > -diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c
>> > -index 974d0a76a4e..feee0703495 100644
>> > ---- a/src/gbm/main/backend.c
>> > -+++ b/src/gbm/main/backend.c
>> > -@@ -42,7 +42,9 @@
>> > - #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
>> > - #define VER_MIN(a, b) ((a) < (b) ? (a) : (b))
>> > -
>> > -+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
>> > - extern const struct gbm_backend gbm_dri_backend;
>> > -+#endif
>> > -
>> > - struct gbm_backend_desc {
>> > -    const char *name;
>> > -@@ -51,7 +53,9 @@ struct gbm_backend_desc {
>> > - };
>> > -
>> > - static const struct gbm_backend_desc builtin_backends[] = {
>> > -+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
>> > -    { "dri", &gbm_dri_backend },
>> > -+#endif
>> > - };
>> > -
>> > - #define BACKEND_LIB_SUFFIX "_gbm"
>> > ---
>> > -2.34.1
>> > -
>> > diff --git a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch b/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
>> > deleted file mode 100644
>> > index d22ff3c8a8..0000000000
>> > --- a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
>> > +++ /dev/null
>> > @@ -1,47 +0,0 @@
>> > -From f17e836ef9b1bbc6056790596420b699e48128c2 Mon Sep 17 00:00:00 2001
>> > -From: Khem Raj <raj.khem@gmail.com>
>> > -Date: Thu, 2 Dec 2021 19:57:42 -0800
>> > -Subject: [PATCH] util/format: Check for NEON before using it
>> > -
>> > -This fixes build on rpi0-w and any other machine which does not have
>> > -neon unit and is not used as FPU unit
>> > -
>> > -Fixes errors e.g.
>> > -
>> > -In file included from ../mesa-21.3.0/src/util/format/u_format_unpack_neon.c:35:
>> > -/mnt/b/yoe/master/build/tmp/work/arm1176jzfshf-vfp-yoe-linux-gnueabi/mesa/2_21.3.0-r0/recipe-sysroot-native/usr/lib/clang/13.0.1/include/arm_neon.h:32:2: error: "NEON support not enabled"
>> > -
>> > -Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14032]
>> > -Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> > -
>> > ----
>> > - src/util/format/u_format.c             | 2 +-
>> > - src/util/format/u_format_unpack_neon.c | 2 +-
>> > - 2 files changed, 2 insertions(+), 2 deletions(-)
>> > -
>> > -diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c
>> > -index c071250..0880984 100644
>> > ---- a/src/util/format/u_format.c
>> > -+++ b/src/util/format/u_format.c
>> > -@@ -1184,7 +1184,7 @@ static void
>> > - util_format_unpack_table_init(void)
>> > - {
>> > -    for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) {
>> > --#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
>> > -+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
>> > -       const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format);
>> > -       if (unpack) {
>> > -          util_format_unpack_table[format] = unpack;
>> > -diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_unpack_neon.c
>> > -index a4a5cb1..1e4f794 100644
>> > ---- a/src/util/format/u_format_unpack_neon.c
>> > -+++ b/src/util/format/u_format_unpack_neon.c
>> > -@@ -23,7 +23,7 @@
>> > -
>> > - #include <u_format.h>
>> > -
>> > --#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
>> > -+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
>> > -
>> > - /* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics
>> > -  * unless you tell it "no really".
>> > diff --git a/meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb b/meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
>> > similarity index 100%
>> > rename from meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb
>> > rename to meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
>> > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
>> > index b082b49400..8f72f25c17 100644
>> > --- a/meta/recipes-graphics/mesa/mesa.inc
>> > +++ b/meta/recipes-graphics/mesa/mesa.inc
>> > @@ -17,12 +17,9 @@ PE = "2"
>> >  SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
>> >             file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
>> >             file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
>> > -           file://0001-util-format-Check-for-NEON-before-using-it.patch \
>> > -           file://0001-gbm-backend-fix-gbm-compile-without-dri.patch \
>> > -           file://0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch \
>> >             "
>> >
>> > -SRC_URI[sha256sum] = "3eed2ecae2bc674494566faab9fcc9beb21cd804c7ba2b59a1694f3d7236e6a9"
>> > +SRC_URI[sha256sum] = "01f3cff3763f09e0adabcb8011e4aebc6ad48f6a4dd4bae904fe918707d253e4"
>> >
>> >  UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
>> >
>> > diff --git a/meta/recipes-graphics/mesa/mesa_22.3.5.bb b/meta/recipes-graphics/mesa/mesa_23.0.0.bb
>> > similarity index 100%
>> > rename from meta/recipes-graphics/mesa/mesa_22.3.5.bb
>> > rename to meta/recipes-graphics/mesa/mesa_23.0.0.bb
>> > --
>> > 2.30.2
>> >
>> >
>> > -=-=-=-=-=-=-=-=-=-=-=-
>> > Links: You receive all messages sent to this group.
>> > View/Reply Online (#178696): https://lists.openembedded.org/g/openembedded-core/message/178696
>> > Mute This Topic: https://lists.openembedded.org/mt/97647023/1997914
>> > Group Owner: openembedded-core+owner@lists.openembedded.org
>> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
>> > -=-=-=-=-=-=-=-=-=-=-=-
>> >


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

* Re: [OE-core] [PATCH 6/6] mesa: update 22.3.5 -> 23.0.0
  2023-03-18 18:37       ` Khem Raj
@ 2023-03-18 18:57         ` Martin Jansa
  2023-03-20  7:09         ` Alexander Kanavin
  1 sibling, 0 replies; 16+ messages in thread
From: Martin Jansa @ 2023-03-18 18:57 UTC (permalink / raw)
  To: Khem Raj; +Cc: Alexander Kanavin, Alexander Kanavin, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 15112 bytes --]

On Sat, Mar 18, 2023 at 7:38 PM Khem Raj <raj.khem@gmail.com> wrote:

> On Sat, Mar 18, 2023 at 1:02 AM Alexander Kanavin
> <alex.kanavin@gmail.com> wrote:
> >
> > Ubuntu 18.04 goes EOL next month, so it should perhaps be dropped from
> the builders and supported distro list?
> >
>
> Perhaps in the next cycle yes and definitely for the next LTS it
> should be dropped.
>
> Its stll supported via Extended Security Maintenance (ESM)  and users
> maybe still be using it.
>
> mesa needs gcc > 8 as per
> https://docs.mesa3d.org/install.html?highlight=gcc+version#compiler
> so 7.5 default on ubuntu 18.04 is falling under unsupported compilers
> for mesa. So we should be recommending
> buildtools-tarball-extra and also installing it on ubuntu 18.04 workers.
>

IIRC we already need buildtools-tarball (regular was enough, not the
extended one) for 18.04 because of python

Mickledore needs newer python-3.8 (e.g. 3.8.10 in Focal) than 3.6.9 in
Bionic since:
https://git.openembedded.org/openembedded-core/commit/?id=cc05bc04156122fd6f918191a9cec7bc0392415e
https://git.openembedded.org/bitbake/commit/?id=744310f360d2288ac2ef07745abc86852126b5b9

extended is twice as big, but I wouldn't mind switching to it from regular
buildtools if needed (temporarily until we finish upgrade to 22.03. And
people who install newer python to 18.04 can install newer than default gcc
as well.

Cheers,


> > Alex
> >
> > On Sat 18. Mar 2023 at 2.47, Khem Raj <raj.khem@gmail.com> wrote:
> >>
> >> mesa 23.x fails to build with default gcc ( 7.5.0 ) Ubuntu
> >> 7.5.0-3ubuntu1~18.04, it ends up with
> >>
> >> ../mesa-23.0.0/src/intel/compiler/brw_simd_selection.cpp: In function
> >> ‘int brw_simd_select_for_workgroup_size(const intel_device_info*,
> >> const brw_cs_prog_data*, const unsigned int*)’:
> >> ../mesa-23.0.0/src/intel/compiler/brw_simd_selection.cpp:205:7: sorry,
> >> unimplemented: non-trivial designated initializers not supported
> >>        };
> >>        ^
> >>
> >> see mesa-native failure
> >>
> >> https://errors.yoctoproject.org/Errors/Details/698144/
> >>
> >> I wonder how it works on AB nodes running Ubuntu 18.04. Do we enforce
> >> gcc from buildtools tarball there ?
> >>
> >> On Thu, Mar 16, 2023 at 2:41 AM Alexander Kanavin
> >> <alex.kanavin@gmail.com> wrote:
> >> >
> >> > Drop patches:
> >> > 0001-gbm-backend-fix-gbm-compile-without-dri.patch
> >> > 0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> >> > (backports)
> >> >
> >> > 0001-util-format-Check-for-NEON-before-using-it.patch
> >> > (upstream submission has stalled with unanswered concerns from
> upstream;
> >> > patch no longer applies; issue does not reproduce with
> 'raspberrypi0-wifi' MACHINE)
> >> >
> >> > Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> >> > ---
> >> >  ...e-unsigned-instead-of-uint-to-fix-mu.patch | 44 -------------
> >> >  ...-backend-fix-gbm-compile-without-dri.patch | 65
> -------------------
> >> >  ...ormat-Check-for-NEON-before-using-it.patch | 47 --------------
> >> >  .../{mesa-gl_22.3.5.bb => mesa-gl_23.0.0.bb}  |  0
> >> >  meta/recipes-graphics/mesa/mesa.inc           |  5 +-
> >> >  .../mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb}   |  0
> >> >  6 files changed, 1 insertion(+), 160 deletions(-)
> >> >  delete mode 100644
> meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> >> >  delete mode 100644
> meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
> >> >  delete mode 100644
> meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> >> >  rename meta/recipes-graphics/mesa/{mesa-gl_22.3.5.bb =>
> mesa-gl_23.0.0.bb} (100%)
> >> >  rename meta/recipes-graphics/mesa/{mesa_22.3.5.bb => mesa_23.0.0.bb}
> (100%)
> >> >
> >> > diff --git
> a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> b/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> >> > deleted file mode 100644
> >> > index 3ab22889bf..0000000000
> >> > ---
> a/meta/recipes-graphics/mesa/files/0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch
> >> > +++ /dev/null
> >> > @@ -1,44 +0,0 @@
> >> > -From 8a5de0b6cf1090d7f29f3974ec79c32776cf2745 Mon Sep 17 00:00:00
> 2001
> >> > -From: Jami Kettunen <jami.kettunen@protonmail.com>
> >> > -Date: Tue, 31 Aug 2021 00:15:58 +0300
> >> > -Subject: [PATCH] freedreno/pm4: Use unsigned instead of uint to fix
> musl build
> >> > -
> >> > -Upstream-Status: Backport
> >> > -
> >> > -Fixes the following error I noticed when building against aarch64
> with
> >> > -musl libc:
> >> > -
> >> > -  In file included from ../src/freedreno/decode/crashdec.h:38,
> >> > -                   from ../src/freedreno/decode/crashdec.c:40:
> >> > -  ../src/freedreno/common/freedreno_pm4.h:104:15: error: unknown
> type name 'uint'
> >> > -    104 | static inline uint
> >> > -        |               ^~~~
> >> > -  ../src/freedreno/common/freedreno_pm4.h:105:25: error: unknown
> type name 'uint'; did you mean 'int'?
> >> > -    105 | pm4_calc_odd_parity_bit(uint val)
> >> > -        |                         ^~~~
> >> > -        |                         int
> >> > -
> >> > -Signed-off-by: Jami Kettunen <jami.kettunen@protonmail.com>
> >> > -Part-of: <
> https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19665>
> >> > ----
> >> > - src/freedreno/common/freedreno_pm4.h | 4 ++--
> >> > - 1 file changed, 2 insertions(+), 2 deletions(-)
> >> > -
> >> > -diff --git a/src/freedreno/common/freedreno_pm4.h
> b/src/freedreno/common/freedreno_pm4.h
> >> > -index 8f958953d693..091247e709a0 100644
> >> > ---- a/src/freedreno/common/freedreno_pm4.h
> >> > -+++ b/src/freedreno/common/freedreno_pm4.h
> >> > -@@ -105,8 +105,8 @@ pm4_pkt7_hdr(uint8_t opcode, uint16_t cnt)
> >> > - #define cp_type3_opcode(pkt) (((pkt) >> 8) & 0xFF)
> >> > - #define type3_pkt_size(pkt)  ((((pkt) >> 16) & 0x3FFF) + 1)
> >> > -
> >> > --static inline uint
> >> > --pm4_calc_odd_parity_bit(uint val)
> >> > -+static inline unsigned
> >> > -+pm4_calc_odd_parity_bit(unsigned val)
> >> > - {
> >> > -    return (0x9669 >> (0xf & ((val) ^ ((val) >> 4) ^ ((val) >> 8) ^
> >> > -                              ((val) >> 12) ^ ((val) >> 16) ^ ((val)
> >> 20) ^
> >> > ---
> >> > -2.39.2
> >> > -
> >> > diff --git
> a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
> b/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
> >> > deleted file mode 100644
> >> > index 6541671b7a..0000000000
> >> > ---
> a/meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch
> >> > +++ /dev/null
> >> > @@ -1,65 +0,0 @@
> >> > -From 25946100e21cf2095bea334e8d7096798561d0b7 Mon Sep 17 00:00:00
> 2001
> >> > -From: Vincent Davis Jr <vince@underview.tech>
> >> > -Date: Wed, 28 Dec 2022 16:28:01 -0600
> >> > -Subject: [PATCH] gbm/backend: fix gbm compile without dri
> >> > -
> >> > -Upstream-Status: Backport
> >> > -
> >> > -https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447
> >> > -
> https://gitlab.freedesktop.org/mesa/mesa/-/commit/842ca284650f066e58706741a7d22d67b5088e60
> >> > -
> >> > -At mesa version 22.2.3 patch wasn't introduced until after.
> >> > -
> >> > -Commit introduces a fix that allows for gbm to be built with an empty
> >> > -backend. There are situation especially in a Yocto/OE cross
> compilation
> >> > -environment where you want to build with an empty backend. The
> particular
> >> > -situation is as such:
> >> > -
> >> > -The mesa-gl recipe is the preferred provider for virtual/libgbm,
> virtual/libgl,
> >> > -virtual/mesa, etc... But the x11 DISTRO_FEATURE in't included this
> leads to build
> >> > -errors such as:
> >> > -
> >> > -| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in
> function `find_backend':
> >> > -| backend.c:(.text.find_backend+0xa4): undefined reference to
> `gbm_dri_backend'
> >> > -| /../../../ld:
> src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4):
> >> > -                undefined reference to `gbm_dri_backend'
> >> > -| collect2: error: ld returned 1 exit status
> >> > -
> >> > -Issue should be replicable by setting -Ddri3=disabled and
> -Dgbm=enabled
> >> > -
> >> > -Add fix to bypasses compilation issue by excluding gbm dri backend.
> If
> >> > -HAVE_DRI || HAVE_DRIX not specified.
> >> > -
> >> > -Acked-by: David Heidelberg <david.heidelberg@collabora.com>
> >> > -Signed-off-by: Vincent Davis Jr <vince@underview.tech>
> >> > ----
> >> > - src/gbm/main/backend.c | 4 ++++
> >> > - 1 file changed, 4 insertions(+)
> >> > -
> >> > -diff --git a/src/gbm/main/backend.c b/src/gbm/main/backend.c
> >> > -index 974d0a76a4e..feee0703495 100644
> >> > ---- a/src/gbm/main/backend.c
> >> > -+++ b/src/gbm/main/backend.c
> >> > -@@ -42,7 +42,9 @@
> >> > - #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
> >> > - #define VER_MIN(a, b) ((a) < (b) ? (a) : (b))
> >> > -
> >> > -+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
> >> > - extern const struct gbm_backend gbm_dri_backend;
> >> > -+#endif
> >> > -
> >> > - struct gbm_backend_desc {
> >> > -    const char *name;
> >> > -@@ -51,7 +53,9 @@ struct gbm_backend_desc {
> >> > - };
> >> > -
> >> > - static const struct gbm_backend_desc builtin_backends[] = {
> >> > -+#if defined(HAVE_DRI) || defined(HAVE_DRI2) || defined(HAVE_DRI3)
> >> > -    { "dri", &gbm_dri_backend },
> >> > -+#endif
> >> > - };
> >> > -
> >> > - #define BACKEND_LIB_SUFFIX "_gbm"
> >> > ---
> >> > -2.34.1
> >> > -
> >> > diff --git
> a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> b/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> >> > deleted file mode 100644
> >> > index d22ff3c8a8..0000000000
> >> > ---
> a/meta/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> >> > +++ /dev/null
> >> > @@ -1,47 +0,0 @@
> >> > -From f17e836ef9b1bbc6056790596420b699e48128c2 Mon Sep 17 00:00:00
> 2001
> >> > -From: Khem Raj <raj.khem@gmail.com>
> >> > -Date: Thu, 2 Dec 2021 19:57:42 -0800
> >> > -Subject: [PATCH] util/format: Check for NEON before using it
> >> > -
> >> > -This fixes build on rpi0-w and any other machine which does not have
> >> > -neon unit and is not used as FPU unit
> >> > -
> >> > -Fixes errors e.g.
> >> > -
> >> > -In file included from
> ../mesa-21.3.0/src/util/format/u_format_unpack_neon.c:35:
> >> >
> -/mnt/b/yoe/master/build/tmp/work/arm1176jzfshf-vfp-yoe-linux-gnueabi/mesa/2_21.3.0-r0/recipe-sysroot-native/usr/lib/clang/13.0.1/include/arm_neon.h:32:2:
> error: "NEON support not enabled"
> >> > -
> >> > -Upstream-Status: Submitted [
> https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14032]
> >> > -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >> > -
> >> > ----
> >> > - src/util/format/u_format.c             | 2 +-
> >> > - src/util/format/u_format_unpack_neon.c | 2 +-
> >> > - 2 files changed, 2 insertions(+), 2 deletions(-)
> >> > -
> >> > -diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c
> >> > -index c071250..0880984 100644
> >> > ---- a/src/util/format/u_format.c
> >> > -+++ b/src/util/format/u_format.c
> >> > -@@ -1184,7 +1184,7 @@ static void
> >> > - util_format_unpack_table_init(void)
> >> > - {
> >> > -    for (enum pipe_format format = PIPE_FORMAT_NONE; format <
> PIPE_FORMAT_COUNT; format++) {
> >> > --#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) &&
> !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
> >> > -+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) &&
> defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
> >> > -       const struct util_format_unpack_description *unpack =
> util_format_unpack_description_neon(format);
> >> > -       if (unpack) {
> >> > -          util_format_unpack_table[format] = unpack;
> >> > -diff --git a/src/util/format/u_format_unpack_neon.c
> b/src/util/format/u_format_unpack_neon.c
> >> > -index a4a5cb1..1e4f794 100644
> >> > ---- a/src/util/format/u_format_unpack_neon.c
> >> > -+++ b/src/util/format/u_format_unpack_neon.c
> >> > -@@ -23,7 +23,7 @@
> >> > -
> >> > - #include <u_format.h>
> >> > -
> >> > --#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) &&
> !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
> >> > -+#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) &&
> defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
> >> > -
> >> > - /* armhf builds default to vfp, not neon, and refuses to compile
> neon intrinsics
> >> > -  * unless you tell it "no really".
> >> > diff --git a/meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb
> b/meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
> >> > similarity index 100%
> >> > rename from meta/recipes-graphics/mesa/mesa-gl_22.3.5.bb
> >> > rename to meta/recipes-graphics/mesa/mesa-gl_23.0.0.bb
> >> > diff --git a/meta/recipes-graphics/mesa/mesa.inc
> b/meta/recipes-graphics/mesa/mesa.inc
> >> > index b082b49400..8f72f25c17 100644
> >> > --- a/meta/recipes-graphics/mesa/mesa.inc
> >> > +++ b/meta/recipes-graphics/mesa/mesa.inc
> >> > @@ -17,12 +17,9 @@ PE = "2"
> >> >  SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
> >> >
>  file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
> >> >
>  file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
> >> > -
>  file://0001-util-format-Check-for-NEON-before-using-it.patch \
> >> > -           file://0001-gbm-backend-fix-gbm-compile-without-dri.patch
> \
> >> > -
>  file://0001-freedreno-pm4-Use-unsigned-instead-of-uint-to-fix-mu.patch \
> >> >             "
> >> >
> >> > -SRC_URI[sha256sum] =
> "3eed2ecae2bc674494566faab9fcc9beb21cd804c7ba2b59a1694f3d7236e6a9"
> >> > +SRC_URI[sha256sum] =
> "01f3cff3763f09e0adabcb8011e4aebc6ad48f6a4dd4bae904fe918707d253e4"
> >> >
> >> >  UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
> >> >
> >> > diff --git a/meta/recipes-graphics/mesa/mesa_22.3.5.bb
> b/meta/recipes-graphics/mesa/mesa_23.0.0.bb
> >> > similarity index 100%
> >> > rename from meta/recipes-graphics/mesa/mesa_22.3.5.bb
> >> > rename to meta/recipes-graphics/mesa/mesa_23.0.0.bb
> >> > --
> >> > 2.30.2
> >> >
> >> >
> >> >
> >> >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#178791):
> https://lists.openembedded.org/g/openembedded-core/message/178791
> Mute This Topic: https://lists.openembedded.org/mt/97647023/3617156
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> Martin.Jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 22048 bytes --]

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

* Re: [OE-core] [PATCH 6/6] mesa: update 22.3.5 -> 23.0.0
  2023-03-18 18:37       ` Khem Raj
  2023-03-18 18:57         ` Martin Jansa
@ 2023-03-20  7:09         ` Alexander Kanavin
  2023-03-20 10:01           ` Richard Purdie
  1 sibling, 1 reply; 16+ messages in thread
From: Alexander Kanavin @ 2023-03-20  7:09 UTC (permalink / raw)
  To: Khem Raj; +Cc: Alexander Kanavin, openembedded-core

On Sat, 18 Mar 2023 at 19:38, Khem Raj <raj.khem@gmail.com> wrote:
> Perhaps in the next cycle yes and definitely for the next LTS it
> should be dropped.
>
> Its stll supported via Extended Security Maintenance (ESM)  and users
> maybe still be using it.

The question is: are ubuntu 18.04 workers going to be maintained after
18.04 transitions to ESM next month? In all likelihood they won't be,
as it is a commercial subscription, and then we can't continue to test
with it.


Alex


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

* Re: [OE-core] [PATCH 6/6] mesa: update 22.3.5 -> 23.0.0
  2023-03-20  7:09         ` Alexander Kanavin
@ 2023-03-20 10:01           ` Richard Purdie
  0 siblings, 0 replies; 16+ messages in thread
From: Richard Purdie @ 2023-03-20 10:01 UTC (permalink / raw)
  To: Alexander Kanavin, Khem Raj; +Cc: Alexander Kanavin, openembedded-core

On Mon, 2023-03-20 at 08:09 +0100, Alexander Kanavin wrote:
> On Sat, 18 Mar 2023 at 19:38, Khem Raj <raj.khem@gmail.com> wrote:
> > Perhaps in the next cycle yes and definitely for the next LTS it
> > should be dropped.
> > 
> > Its stll supported via Extended Security Maintenance (ESM)  and users
> > maybe still be using it.
> 
> The question is: are ubuntu 18.04 workers going to be maintained after
> 18.04 transitions to ESM next month? In all likelihood they won't be,
> as it is a commercial subscription, and then we can't continue to test
> with it.

I think the fact it can work with buildtools should mean we're ok. As
mentioned, we already need it there for python version requirements and
as mentioned, it is EOL soon anyway.

Cheers,

Richard


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

* Re: [OE-core] [PATCH 4/6] llvm: allow building libllvm in native builds, subject to PACKAGECONFIG
  2023-03-16  9:41 ` [PATCH 4/6] llvm: allow building libllvm in native builds, subject to PACKAGECONFIG Alexander Kanavin
@ 2023-03-20 16:20   ` Ross Burton
  2023-03-20 17:36     ` Alexander Kanavin
  0 siblings, 1 reply; 16+ messages in thread
From: Ross Burton @ 2023-03-20 16:20 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: OE-core

On 16 Mar 2023, at 09:41, Alexander Kanavin via lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org> wrote:
> +PACKAGECONFIG:class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'libllvm', '', d)}"

Currently the llvm drivers in Mesa are the only known user of libllvm in oe-core, but I don’t like making that a hard assertion in the recipe and the subsequent native/target specific changes to the recipe.

What’s the build impact on llvm-native of enabling/disabling libllvm and why shouldn’t we just do it always?

Ross


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

* Re: [OE-core] [PATCH 3/6] mesa: enable a rich set of drivers for native builds
  2023-03-16  9:40 ` [PATCH 3/6] mesa: enable a rich set of drivers for native builds Alexander Kanavin
@ 2023-03-20 17:10   ` Ross Burton
  2023-03-20 17:41     ` Alexander Kanavin
  0 siblings, 1 reply; 16+ messages in thread
From: Ross Burton @ 2023-03-20 17:10 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: OE-core, Alexander Kanavin

On 16 Mar 2023, at 09:40, Alexander Kanavin via lists.openembedded.org <alex.kanavin=gmail.com@lists.openembedded.org> wrote:
> 
> Without this, the only available driver would be swrast
> (without llvmpipe) which is far too slow to be practical,
> and so qemu wouldn't be able to perform accelerated graphics.
> 
> The one major dependency pulled in by this change is llvm-native
> which takes just under three minutes on my machine. If this is
> undesitable, opengl can be removed from DISTRO_FEATURES_NATIVE.

Grumble build time grumble.

Can we make this a packageconfig that is documented heavily in the local.conf sample?  My builder is headless so I disable the sdl backend in qemu-system-native already, and I’d be disabling this too as 99% of the time I just use runqemu nographic, but I don’t want to disable opengl entirely.

Ross

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

* Re: [OE-core] [PATCH 4/6] llvm: allow building libllvm in native builds, subject to PACKAGECONFIG
  2023-03-20 16:20   ` [OE-core] " Ross Burton
@ 2023-03-20 17:36     ` Alexander Kanavin
  0 siblings, 0 replies; 16+ messages in thread
From: Alexander Kanavin @ 2023-03-20 17:36 UTC (permalink / raw)
  To: Ross Burton; +Cc: OE-core

On Mon, 20 Mar 2023 at 17:20, Ross Burton <Ross.Burton@arm.com> wrote:
> Currently the llvm drivers in Mesa are the only known user of libllvm in oe-core, but I don’t like making that a hard assertion in the recipe and the subsequent native/target specific changes to the recipe.
>
> What’s the build impact on llvm-native of enabling/disabling libllvm and why shouldn’t we just do it always?

I think that's answered elsewhere in the series. It's still 4 times
quicker than rust-native. Maybe we should just embrace this brave new
world of toolchains with heavy build times.

Alex


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

* Re: [OE-core] [PATCH 3/6] mesa: enable a rich set of drivers for native builds
  2023-03-20 17:10   ` [OE-core] " Ross Burton
@ 2023-03-20 17:41     ` Alexander Kanavin
  0 siblings, 0 replies; 16+ messages in thread
From: Alexander Kanavin @ 2023-03-20 17:41 UTC (permalink / raw)
  To: Ross Burton; +Cc: OE-core, Alexander Kanavin

On Mon, 20 Mar 2023 at 18:10, Ross Burton <Ross.Burton@arm.com> wrote:
> > The one major dependency pulled in by this change is llvm-native
> > which takes just under three minutes on my machine. If this is
> > undesitable, opengl can be removed from DISTRO_FEATURES_NATIVE.
>
> Grumble build time grumble.
>
> Can we make this a packageconfig that is documented heavily in the local.conf sample?  My builder is headless so I disable the sdl backend in qemu-system-native already, and I’d be disabling this too as 99% of the time I just use runqemu nographic, but I don’t want to disable opengl entirely.

You can disable native opengl on the native distro feature level, but
keep target opengl enabled, would that work? I'm not sure if there is
a use case for native mesa without the drivers.

Even on headless hosts you can use egl-headless, and then a vnc client
will show you the qemu display.

Alex


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

end of thread, other threads:[~2023-03-20 17:41 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-16  9:40 [PATCH 1/6] runqemu: direct mesa to use its own drivers, rather than ones provided by host distro Alexander Kanavin
2023-03-16  9:40 ` [PATCH 2/6] mesa: allow mesa-native/nativesdk only subject to opengl/vulkan DISTRO_FEATURE Alexander Kanavin
2023-03-16  9:40 ` [PATCH 3/6] mesa: enable a rich set of drivers for native builds Alexander Kanavin
2023-03-20 17:10   ` [OE-core] " Ross Burton
2023-03-20 17:41     ` Alexander Kanavin
2023-03-16  9:41 ` [PATCH 4/6] llvm: allow building libllvm in native builds, subject to PACKAGECONFIG Alexander Kanavin
2023-03-20 16:20   ` [OE-core] " Ross Burton
2023-03-20 17:36     ` Alexander Kanavin
2023-03-16  9:41 ` [PATCH 5/6] mesa: do not strip rpaths from dri drivers Alexander Kanavin
2023-03-16  9:41 ` [PATCH 6/6] mesa: update 22.3.5 -> 23.0.0 Alexander Kanavin
2023-03-18  2:47   ` [OE-core] " Khem Raj
2023-03-18  8:01     ` Alexander Kanavin
2023-03-18 18:37       ` Khem Raj
2023-03-18 18:57         ` Martin Jansa
2023-03-20  7:09         ` Alexander Kanavin
2023-03-20 10:01           ` Richard Purdie

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.