Vulkan prep and some cleanup
v2 cover Vulkan prep and some cleanup
From: Randolph Sapp <[email protected]>
Enable limited x11 support to help with the Vulkan WSI layers. Adjust PACKAGECONFIG strings for a few packages so they still prefer the Wayland backend properly and still use GLES instead of GL.
Also attempt a little bit of patch cleanup. Expect a few more cleanup patches with the non-root Weston patchset when that comes out.
This version has some light edits to address Andrews concerns. As far as SGX compatibility goes, that will continue to be a thorn. I'm not sure how we can address those properly moving forward, but we can tackle that after Vulkan entablement. Machine specific overrides will be required, but arguably those should live in meta-ti as they will be required for any distro layer attempting to enable these features.
Randolph Sapp (5):
arago.conf: drop the explicit removal of x11, add vulkan
qtwayland: override the packageconfig to prefer wayland
qtwayland: drop the fix-wayland-texture-sharing patch
qtwayland: drop the plugins-decorations patch
glfw: convert to append and drop patches
meta-arago-distro/conf/distro/arago.conf | 4 +- ...land-texture-sharing-custom-composit.patch | 52 ------------------- ...ons-bradient-display-window-icon-onl.patch | 42 --------------- .../recipes-qt/qt5/qtwayland_git.bbappend | 11 ++-- ...xt-remove-check-for-Wayland-Egl-prov.patch | 27 ---------- .../recipes-graphics/glfw/glfw_%.bbappend | 8 +++ .../recipes-graphics/glfw/glfw_git.bb | 24 --------- 7 files changed, 14 insertions(+), 154 deletions(-) delete mode 100644 meta-arago-distro/recipes-qt/qt5/qtwayland/0001-examples-fix-wayland-texture-sharing-custom-composit.patch delete mode 100644 meta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patch delete mode 100644 meta-arago-extras/recipes-graphics/glfw/glfw/0001-HACK-CMakeList.txt-remove-check-for-Wayland-Egl-prov.patch create mode 100644 meta-arago-extras/recipes-graphics/glfw/glfw_%.bbappend delete mode 100644 meta-arago-extras/recipes-graphics/glfw/glfw_git.bb
Signature · 1 line
2.40.0
PATCH v2 1/5 arago.conf: drop the explicit removal of x11, add vulkan
From: Randolph Sapp <[email protected]>
Drop the explicit removal of x11 as the new PVR Vulkan libs have runtime dependencies on libx11.
Add vulkan as a distro feature.
--- meta-arago-distro/conf/distro/arago.conf | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
meta-arago-distro/conf/distro/arago.conf +1 -3
@@ -45,12 +45,10 @@ TMPDIR .= "${TCMODEAPPEND}" # Start with default set of distro features DISTRO_FEATURES = "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC}" -# Remove some unwanted features -DISTRO_FEATURES:remove = "x11" - # Add additional distro features DISTRO_FEATURES:append = " pam wayland opengl" #DISTRO_FEATURES:append = " opencl" +DISTRO_FEATURES:append = " vulkan" DISTRO_FEATURES:append = " opencv" DISTRO_FEATURES:append = " openmp"
Signature · 1 line
2.40.0
PATCH v2 2/5 qtwayland: override the packageconfig to prefer wayland
In reply to [email protected]From: Randolph Sapp <[email protected]>
While we're allowing X to exist now, we are by no means prefering it. Set the PACKAGECONFIG to remove the X specific components.
--- meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend | 2 ++ 1 file changed, 2 insertions(+)
meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend +2 -0
@@ -5,3 +5,5 @@ SRC_URI += " \ file://0001-plugins-decorations-bradient-display-window-icon-onl.patch \ file://0001-examples-fix-wayland-texture-sharing-custom-composit.patch \ " + +PACKAGECONFIG:remove = "xcomposite-egl xcomposite-glx"
Signature · 1 line
2.40.0
PATCH v2 3/5 qtwayland: drop the fix-wayland-texture-sharing patch
In reply to [email protected]From: Randolph Sapp <[email protected]>
Meta-qt is now providing a version of qtwayland that already has this patch applied.
--- ...land-texture-sharing-custom-composit.patch | 52 ------------------- .../recipes-qt/qt5/qtwayland_git.bbappend | 1 - 2 files changed, 53 deletions(-) delete mode 100644 meta-arago-distro/recipes-qt/qt5/qtwayland/0001-examples-fix-wayland-texture-sharing-custom-composit.patch
meta-arago-distro/recipes-qt/qt5/qtwayland/0001-examples-fix-wayland-texture-sharing-custom-composit.patch deleted +0 -52
@@ -1,52 +0,0 @@ -From 1d18591d9e7ed9b3580e06c37be23bfde24bc30c Mon Sep 17 00:00:00 2001 -From: Peter Seiderer <[email protected]> -Date: Fri, 3 Apr 2020 22:40:29 +0200 -Subject: [PATCH] examples: fix wayland/texture-sharing/custom-compositor -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fixes: - - main.cpp:83:33: error: ‘GL_RGBA8’ was not declared in this scope; did you mean ‘GL_RGBA4’? - 83 | *glInternalFormat = GL_RGBA8; - | ^~~~~~~~ - | GL_RGBA4 - main.cpp:120:33: error: ‘GL_RGBA8’ was not declared in this scope; did you mean ‘GL_RGBA4’? - 120 | *glInternalFormat = GL_RGBA8; - | ^~~~~~~~ - | GL_RGBA4 - -Task-number: QTBUG-83304 -Change-Id: I0515f3303b08c405d162986e280e9a7bd35e28f7 -Reviewed-by: Laszlo Agocs <[email protected]> -Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]> - -Upstream-Status: Backport [1d18591d9e7ed9b3580e06c37be23bfde24bc30c] - -The patch is backport from upstream commit - -1d18591d9e7ed9b3580e06c37be23bfde24bc30c - -Signed-off-by: Gowtham Tammana <[email protected]> ---- - examples/wayland/texture-sharing/custom-compositor/main.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/examples/wayland/texture-sharing/custom-compositor/main.cpp b/examples/wayland/texture-sharing/custom-compositor/main.cpp -index a39c8c38..af375024 100644 ---- a/examples/wayland/texture-sharing/custom-compositor/main.cpp -+++ b/examples/wayland/texture-sharing/custom-compositor/main.cpp -@@ -63,6 +63,10 @@ - - #include "QtWaylandCompositor/private/qwltexturesharingextension_p.h" - -+#ifndef GL_RGBA8 -+#define GL_RGBA8 0x8058 -+#endif -+ - class CustomSharingExtension : public QWaylandTextureSharingExtension - { - Q_OBJECT --- -2.17.1 -
meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend +0 -1
@@ -3,7 +3,6 @@ PR:append = ".arago2" SRC_URI += " \ file://0001-plugins-decorations-bradient-display-window-icon-onl.patch \ - file://0001-examples-fix-wayland-texture-sharing-custom-composit.patch \ " PACKAGECONFIG:remove = "xcomposite-egl xcomposite-glx"
Signature · 1 line
2.40.0
PATCH v2 4/5 qtwayland: drop the plugins-decorations patch
In reply to [email protected]From: Randolph Sapp <[email protected]>
This seems like it was a needless patch to guard against garbage from being shown if the window icon request failed to return any useful icon. Not necessary.
Add some info about why this bbappend still exists. It's to prefer wayland over x11 and remove some unoptimized components.
--- ...ons-bradient-display-window-icon-onl.patch | 42 ------------------- .../recipes-qt/qt5/qtwayland_git.bbappend | 8 ++-- 2 files changed, 3 insertions(+), 47 deletions(-) delete mode 100644 meta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patch
meta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patch deleted +0 -42
@@ -1,42 +0,0 @@ -From 547fd678ba55025c3578f021b40c96b1e91b839e Mon Sep 17 00:00:00 2001 -From: Eric Ruei <[email protected]> -Date: Fri, 9 Sep 2016 16:54:02 -0400 -Subject: [PATCH] plugins/decorations/bradient: display window icon only if - icon.pixmap not null - -Signed-off-by: Eric Ruei <[email protected]> ---- - src/plugins/decorations/bradient/main.cpp | 17 ++++++++++------- - 1 file changed, 10 insertions(+), 7 deletions(-) - -diff --git a/src/plugins/decorations/bradient/main.cpp b/src/plugins/decorations/bradient/main.cpp -index ea29869..279bff1 100644 ---- a/src/plugins/decorations/bradient/main.cpp -+++ b/src/plugins/decorations/bradient/main.cpp -@@ -222,13 +222,16 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device) - // Window icon - QIcon icon = waylandWindow()->windowIcon(); - if (!icon.isNull()) { -- QPixmap pixmap = icon.pixmap(QSize(128, 128)); -- QPixmap scaled = pixmap.scaled(22, 22, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); -- -- QRectF iconRect(0, 0, 22, 22); -- p.drawPixmap(iconRect.adjusted(margins().left() + BUTTON_SPACING, 4, -- margins().left() + BUTTON_SPACING, 4), -- scaled, iconRect); -+ QPixmap pixmap = icon.pixmap(QSize(128, 128)); -+ if(!pixmap.isNull()) -+ { -+ QPixmap scaled = pixmap.scaled(22, 22, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); -+ -+ QRectF iconRect(0, 0, 22, 22); -+ p.drawPixmap(iconRect.adjusted(margins().left() + BUTTON_SPACING, 4, -+ margins().left() + BUTTON_SPACING, 4), -+ scaled, iconRect); -+ } - } - - // Window title --- -1.9.1 -
meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend +3 -5
@@ -1,8 +1,6 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -PR:append = ".arago2" +# This append exists to modify the PACKAGECONFIG such that the wayland backend +# is preferred over x11 and unoptimized components are removed. -SRC_URI += " \ - file://0001-plugins-decorations-bradient-display-window-icon-onl.patch \ -" +PR:append = ".arago3" PACKAGECONFIG:remove = "xcomposite-egl xcomposite-glx"
Signature · 1 line
2.40.0
Re: [meta-arago][kirkstone][PATCHv2 4/5] qtwayland: drop the plugins-decorations patch
Quoted 69 lines · On Thu, Apr 27, 2023 at 12:20:35PM -0500, [email protected] wrote:
From: Randolph Sapp <[email protected]>
This seems like it was a needless patch to guard against garbage from being shown if the window icon request failed to return any useful icon. Not necessary.
Add some info about why this bbappend still exists. It's to prefer wayland over x11 and remove some unoptimized components.
Signed-off-by Randolph Sapp <[email protected]>--- ...ons-bradient-display-window-icon-onl.patch | 42 ------------------- .../recipes-qt/qt5/qtwayland_git.bbappend | 8 ++-- 2 files changed, 3 insertions(+), 47 deletions(-) delete mode 100644 meta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patchmeta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patch deleted +0
-42@@ -1,42 +0,0 @@ -From 547fd678ba55025c3578f021b40c96b1e91b839e Mon Sep 17 00:00:00 2001 -From: Eric Ruei <[email protected]> -Date: Fri, 9 Sep 2016 16:54:02 -0400 -Subject: [PATCH] plugins/decorations/bradient: display window icon only if - icon.pixmap not null - -Signed-off-by: Eric Ruei <[email protected]> ---- - src/plugins/decorations/bradient/main.cpp | 17 ++++++++++------- - 1 file changed, 10 insertions(+), 7 deletions(-) - -diff --git a/src/plugins/decorations/bradient/main.cpp b/src/plugins/decorations/bradient/main.cpp -index ea29869..279bff1 100644 ---- a/src/plugins/decorations/bradient/main.cpp -+++ b/src/plugins/decorations/bradient/main.cpp -@@ -222,13 +222,16 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device) - // Window icon - QIcon icon = waylandWindow()->windowIcon(); - if (!icon.isNull()) { -- QPixmap pixmap = icon.pixmap(QSize(128, 128)); -- QPixmap scaled = pixmap.scaled(22, 22, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); -- -- QRectF iconRect(0, 0, 22, 22); -- p.drawPixmap(iconRect.adjusted(margins().left() + BUTTON_SPACING, 4, -- margins().left() + BUTTON_SPACING, 4), -- scaled, iconRect); -+ QPixmap pixmap = icon.pixmap(QSize(128, 128)); -+ if(!pixmap.isNull()) -+ { -+ QPixmap scaled = pixmap.scaled(22, 22, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); -+ -+ QRectF iconRect(0, 0, 22, 22); -+ p.drawPixmap(iconRect.adjusted(margins().left() + BUTTON_SPACING, 4, -+ margins().left() + BUTTON_SPACING, 4), -+ scaled, iconRect); -+ } - } - - // Window title --- -1.9.1 -meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend +0
-0
meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend line 2
Quoted 4 lines
meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend +2
-2@@ -1,8 +1,6 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -PR:append = ".arago2" +# This append exists to modify the PACKAGECONFIG such that the wayland backend +# is preferred over x11 and unoptimized components are removed.
If changing PACKAGECONFIG is the only need for a bbappend, then you should rather do it in the distro config:
https://git.yoctoproject.org/meta-arago/tree/meta-arago-distro/conf/distro/arago.conf#n72
Quoted 8 lines
meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend +1
-3-SRC_URI += " \ - file://0001-plugins-decorations-bradient-display-window-icon-onl.patch \ -" +PR:append = ".arago3" PACKAGECONFIG:remove = "xcomposite-egl xcomposite-glx"Signature · 1 line
2.40.0
Re: [EXTERNAL] Re: [meta-arago][kirkstone][PATCHv2 4/5] qtwayland: drop the plugins-decorations patch
Quoted 78 lines · Denys Dmytriyenko
Quoted 69 lines · On Thu, Apr 27, 2023 at 12:20:35PM -0500, [email protected] wrote:
From: Randolph Sapp <[email protected]>
This seems like it was a needless patch to guard against garbage from being shown if the window icon request failed to return any useful icon. Not necessary.
Add some info about why this bbappend still exists. It's to prefer wayland over x11 and remove some unoptimized components.
Signed-off-by Randolph Sapp <[email protected]>--- ...ons-bradient-display-window-icon-onl.patch | 42 ------------------- .../recipes-qt/qt5/qtwayland_git.bbappend | 8 ++-- 2 files changed, 3 insertions(+), 47 deletions(-)delete mode 100644
meta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patchmeta-arago-distro/recipes-qt/qt5/qtwayland/0001-plugins-decorations-bradient-display-window-icon-onl.patch deleted +0
-42@@ -1,42 +0,0 @@ -From 547fd678ba55025c3578f021b40c96b1e91b839e Mon Sep 17 00:00:00 2001 -From: Eric Ruei <[email protected]> -Date: Fri, 9 Sep 2016 16:54:02 -0400 -Subject: [PATCH] plugins/decorations/bradient: display window icon only if - icon.pixmap not null - -Signed-off-by: Eric Ruei <[email protected]> ---- - src/plugins/decorations/bradient/main.cpp | 17 ++++++++++------- - 1 file changed, 10 insertions(+), 7 deletions(-) - -diff --git a/src/plugins/decorations/bradient/main.cpp b/src/plugins/decorations/bradient/main.cpp -index ea29869..279bff1 100644 ---- a/src/plugins/decorations/bradient/main.cpp -+++ b/src/plugins/decorations/bradient/main.cpp -@@ -222,13 +222,16 @@ void QWaylandBradientDecoration::paint(QPaintDevice *device) - // Window icon - QIcon icon = waylandWindow()->windowIcon(); - if (!icon.isNull()) { -- QPixmap pixmap = icon.pixmap(QSize(128, 128)); -- QPixmap scaled = pixmap.scaled(22, 22, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); -- -- QRectF iconRect(0, 0, 22, 22); -- p.drawPixmap(iconRect.adjusted(margins().left() + BUTTON_SPACING, 4, -- margins().left() + BUTTON_SPACING, 4), -- scaled, iconRect); -+ QPixmap pixmap = icon.pixmap(QSize(128, 128)); -+ if(!pixmap.isNull()) -+ { -+ QPixmap scaled = pixmap.scaled(22, 22, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); -+ -+ QRectF iconRect(0, 0, 22, 22); -+ p.drawPixmap(iconRect.adjusted(margins().left() + BUTTON_SPACING, 4, -+ margins().left() + BUTTON_SPACING, 4), -+ scaled, iconRect); -+ } - } - - // Window title --- -1.9.1 -meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend +0
-0meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend line 2
Quoted 4 lines
meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend +2
-2@@ -1,8 +1,6 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -PR:append = ".arago2" +# This append exists to modify the PACKAGECONFIG such that the wayland backend +# is preferred over x11 and unoptimized components are removed.If changing PACKAGECONFIG is the only need for a bbappend, then you should rather do it in the distro config:
Quoted 2 lines
https://git.yoctoproject.org/meta-arago/tree/meta-arago-distro/conf/distro/arago.conf#n72
Fair enough. Expect a v3.
Quoted 9 lines
Quoted 9 lines
meta-arago-distro/recipes-qt/qt5/qtwayland_git.bbappend +1
-3-SRC_URI += " \ - file://0001-plugins-decorations-bradient-display-window-icon-onl.patch \ -" +PR:append = ".arago3" PACKAGECONFIG:remove = "xcomposite-egl xcomposite-glx"Signature · 1 line
2.40.0
PATCH v2 5/5 glfw: convert to append and drop patches
In reply to [email protected]From: Randolph Sapp <[email protected]>
A reasonable version of glfw is now provided by meta-oe. Also the EGL version this package needs to build a against can be satisfied by Mesa EGL so this old patch isn't required anymore.
Add a PACKAGECONFIG variable for wayland and use it. This append will need to be adjusted again when meta-oe glfw patches settle.
--- ...xt-remove-check-for-Wayland-Egl-prov.patch | 27 ------------------- .../recipes-graphics/glfw/glfw_%.bbappend | 8 ++++++ .../recipes-graphics/glfw/glfw_git.bb | 24 ----------------- 3 files changed, 8 insertions(+), 51 deletions(-) delete mode 100644 meta-arago-extras/recipes-graphics/glfw/glfw/0001-HACK-CMakeList.txt-remove-check-for-Wayland-Egl-prov.patch create mode 100644 meta-arago-extras/recipes-graphics/glfw/glfw_%.bbappend delete mode 100644 meta-arago-extras/recipes-graphics/glfw/glfw_git.bb
meta-arago-extras/recipes-graphics/glfw/glfw/0001-HACK-CMakeList.txt-remove-check-for-Wayland-Egl-prov.patch deleted +0 -27
@@ -1,27 +0,0 @@ -From c6e30af80018f7a6fc7b8b0e810718f4bd646cf6 Mon Sep 17 00:00:00 2001 -From: Denys Dmytriyenko <[email protected]> -Date: Thu, 12 Apr 2018 12:29:39 -0400 -Subject: [PATCH] HACK: CMakeList.txt: remove check for Wayland-Egl, provided - by SGX libs - -Signed-off-by: Denys Dmytriyenko <[email protected]> ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1f5d6ef..eaf780f 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -266,7 +266,7 @@ if (_GLFW_WAYLAND) - find_package(ECM REQUIRED NO_MODULE) - list(APPEND CMAKE_MODULE_PATH "${ECM_MODULE_PATH}") - -- find_package(Wayland REQUIRED Client Cursor Egl) -+ find_package(Wayland REQUIRED Client Cursor) - find_package(WaylandScanner REQUIRED) - find_package(WaylandProtocols 1.12 REQUIRED) - --- -2.7.4 -
meta-arago-extras/recipes-graphics/glfw/glfw_%.bbappend new file +8 -0
@@ -0,0 +1,8 @@ +# Add some wayland configuration options until meta-oe adds some good +# PACKAGECONFIGS + +PR:append = ".arago1" + +PACKAGECONFIG[wayland] = "-DGLFW_USE_WAYLAND=ON,,wayland wayland-native wayland-protocols extra-cmake-modules libxkbcommon" + +PACKAGECONFIG += " wayland"
meta-arago-extras/recipes-graphics/glfw/glfw_git.bb deleted +0 -24
@@ -1,24 +0,0 @@ -SUMMARY = "GLFW cross platform graphics framework" -DESCRIPTION = "A multi-platform library for OpenGL and OpenGLES, window and input" -HOMEPAGE = "http://glfw.org/" -LICENSE = "Zlib & Libpng" -LIC_FILES_CHKSUM = "file://LICENSE.md;md5=90c6dd54408744b0f8a55f2a6c7ad870" - -PV = "3.2.1+git${SRCPV}" -PR = "r0" - -BRANCH = "master" -SRC_URI = "git://github.com/glfw/glfw.git;protocol=https;branch=${BRANCH}" -SRCREV = "0a3c4f5d80b041ee1a12c8da3503653d98bd1a15" - -SRC_URI += "file://0001-HACK-CMakeList.txt-remove-check-for-Wayland-Egl-prov.patch" - -DEPENDS = "extra-cmake-modules glib-2.0 virtual/libgles2 virtual/egl weston wayland wayland-native wayland-protocols" - -S = "${WORKDIR}/git" - -inherit cmake pkgconfig - -EXTRA_OECMAKE += "-DGLFW_USE_WAYLAND=ON -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF" - -FILES:${PN}-dev += "${libdir}/cmake"
Signature · 1 line
2.40.0