* [Buildroot] [PATCH v2 0/4] Enable venus vulkan encapsulation and add vkmark
@ 2024-12-05 17:36 Alex Bennée
2024-12-05 17:36 ` [Buildroot] [PATCH v2 1/4] support/testing: update tests for SOFTPIPE (squash!) Alex Bennée
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Alex Bennée @ 2024-12-05 17:36 UTC (permalink / raw)
To: buildroot
Hi,
This is a respin of a series I sent out in August. This time it
applies on top of the series Bernd has just sent out:
Subject: [Buildroot] [PATCH 1/7] package/libdrm: add host variant
Message-Id: <20241202174008.1134667-1-bernd@kuhls.net>
Date: Mon, 2 Dec 2024 18:40:02 +0100
From: Bernd Kuhls <bernd@kuhls.net>
and enables the VirtIO Venus encapsulation to Vulkan graphics and add
the vkmark benchmark program.
For v2
- added SOFTPIPE fixes (these need merging into Bernd's series)
- addressed remaining comments for dependencies
- tweaked a few more dependancies
- added a vkmark test
The test won't currently work if the system QEMU doesn't support
Venus. This will be in the 9.2.0 release (due any day now) but will
also require an upto date virglrenderer (available in Debian
Trixie/Testing). It doesn't have to be merged now and can wait until
the rest of the world catches up.
I plan to use buildroot generated images for QEMU's own functional
tests for Venus.
I've run through:
utils/docker-run make check-package
and everything looks clean. Full details about the changes are bellow
the ---'s in the individual commits.
Alex Bennée (4):
support/testing: update tests for SOFTPIPE (squash!)
package/mesa3d: add option to enable VIRTIO vulkan driver
package/vkmark: add vkmark benchmarking tool
support/testing: add test for vkmark package (PENDING!)
DEVELOPERS | 3 +
package/Config.in | 1 +
package/mesa3d/Config.in | 16 ++--
package/mesa3d/mesa3d.mk | 1 +
package/vkmark/Config.in | 46 ++++++++++++
package/vkmark/vkmark.hash | 2 +
package/vkmark/vkmark.mk | 34 +++++++++
support/testing/tests/package/test_flutter.py | 2 +-
.../tests/package/test_glslsandbox_player.py | 2 +-
support/testing/tests/package/test_glxinfo.py | 2 +-
support/testing/tests/package/test_kmscube.py | 2 +-
.../tests/package/test_python_pyqt5.py | 2 +-
support/testing/tests/package/test_vkmark.py | 75 +++++++++++++++++++
support/testing/tests/package/test_weston.py | 2 +-
14 files changed, 179 insertions(+), 11 deletions(-)
create mode 100644 package/vkmark/Config.in
create mode 100644 package/vkmark/vkmark.hash
create mode 100644 package/vkmark/vkmark.mk
create mode 100644 support/testing/tests/package/test_vkmark.py
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH v2 1/4] support/testing: update tests for SOFTPIPE (squash!)
2024-12-05 17:36 [Buildroot] [PATCH v2 0/4] Enable venus vulkan encapsulation and add vkmark Alex Bennée
@ 2024-12-05 17:36 ` Alex Bennée
2024-12-05 17:36 ` [Buildroot] [PATCH v2 2/4] package/mesa3d: add option to enable VIRTIO vulkan driver Alex Bennée
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Alex Bennée @ 2024-12-05 17:36 UTC (permalink / raw)
To: buildroot; +Cc: Bernd Kuhls, Romain Naour, Julien Olivain, Adam Duskett
Deal with the API change fallout. These should be merged into the
earlier patches that deprecated SWRAST in favour of SOFTPIPE.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
package/mesa3d/Config.in | 10 +++++-----
support/testing/tests/package/test_flutter.py | 2 +-
.../testing/tests/package/test_glslsandbox_player.py | 2 +-
support/testing/tests/package/test_glxinfo.py | 2 +-
support/testing/tests/package/test_kmscube.py | 2 +-
support/testing/tests/package/test_python_pyqt5.py | 2 +-
support/testing/tests/package/test_weston.py | 2 +-
7 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index b42e593be7..058308fbb2 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -326,19 +326,19 @@ comment "intel vulkan needs a glibc toolchain w/ headers >= 3.17"
depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 || \
!BR2_TOOLCHAIN_USES_GLIBC
-config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_SWRAST
- bool "Vulkan swrast driver"
+config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_SOFTPIPE
+ bool "Vulkan softpipe driver"
depends on BR2_PACKAGE_MESA3D_LLVM
- select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST
+ select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE
select BR2_PACKAGE_MESA3D_VULKAN_DRIVER
help
- Vulkan swrast driver.
+ Vulkan softpipe driver.
comment "Off-screen Rendering"
config BR2_PACKAGE_MESA3D_OSMESA_GALLIUM
bool "OSMesa (Gallium) library"
- select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST
+ select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE
help
The OSMesa API provides functions for off-screen rendering.
diff --git a/support/testing/tests/package/test_flutter.py b/support/testing/tests/package/test_flutter.py
index 08aa497417..e4040ca7dc 100644
--- a/support/testing/tests/package/test_flutter.py
+++ b/support/testing/tests/package/test_flutter.py
@@ -22,7 +22,7 @@ class TestFlutter(infra.basetest.BRTest, GraphicsBase):
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{infra.filepath("tests/package/test_flutter/linux-vkms.fragment")}"
BR2_PACKAGE_LIBDRM=y
BR2_PACKAGE_MESA3D=y
- BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
+ BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_FLUTTER_PI=y
diff --git a/support/testing/tests/package/test_glslsandbox_player.py b/support/testing/tests/package/test_glslsandbox_player.py
index 3b0dd60395..f72ac2adce 100644
--- a/support/testing/tests/package/test_glslsandbox_player.py
+++ b/support/testing/tests/package/test_glslsandbox_player.py
@@ -17,7 +17,7 @@ class TestGlslsandboxPlayer(infra.basetest.BRTest):
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{}"
BR2_PACKAGE_LIBDRM=y
BR2_PACKAGE_MESA3D=y
- BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
+ BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE=y
BR2_PACKAGE_MESA3D_LLVM=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
diff --git a/support/testing/tests/package/test_glxinfo.py b/support/testing/tests/package/test_glxinfo.py
index 3ccbdca8d9..2fece52372 100644
--- a/support/testing/tests/package/test_glxinfo.py
+++ b/support/testing/tests/package/test_glxinfo.py
@@ -19,7 +19,7 @@ class TestGlxinfo(infra.basetest.BRTest):
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86/linux.config"
BR2_PACKAGE_MESA3D_DEMOS=y
BR2_PACKAGE_MESA3D=y
- BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
+ BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE=y
BR2_PACKAGE_MESA3D_OPENGL_GLX=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_XSERVER_XORG_SERVER=y
diff --git a/support/testing/tests/package/test_kmscube.py b/support/testing/tests/package/test_kmscube.py
index 0ddeb67939..4a0eb07c32 100644
--- a/support/testing/tests/package/test_kmscube.py
+++ b/support/testing/tests/package/test_kmscube.py
@@ -18,7 +18,7 @@ class TestKmsCube(infra.basetest.BRTest):
BR2_PACKAGE_KMSCUBE=y
BR2_PACKAGE_LIBDRM=y
BR2_PACKAGE_MESA3D=y
- BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
+ BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE=y
BR2_PACKAGE_MESA3D_LLVM=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
diff --git a/support/testing/tests/package/test_python_pyqt5.py b/support/testing/tests/package/test_python_pyqt5.py
index 5f1952b559..65130f9c03 100644
--- a/support/testing/tests/package/test_python_pyqt5.py
+++ b/support/testing/tests/package/test_python_pyqt5.py
@@ -28,7 +28,7 @@ class TestPythonPyQt5(infra.basetest.BRTest):
BR2_PACKAGE_DEJAVU=y
BR2_PACKAGE_LIBDRM=y
BR2_PACKAGE_MESA3D=y
- BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
+ BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE=y
BR2_PACKAGE_MESA3D_LLVM=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
diff --git a/support/testing/tests/package/test_weston.py b/support/testing/tests/package/test_weston.py
index f37a73565f..fbe33bd601 100644
--- a/support/testing/tests/package/test_weston.py
+++ b/support/testing/tests/package/test_weston.py
@@ -22,7 +22,7 @@ class TestWeston(infra.basetest.BRTest, GraphicsBase):
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{}"
BR2_PACKAGE_LIBDRM=y
BR2_PACKAGE_MESA3D=y
- BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
+ BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SOFTPIPE=y
BR2_PACKAGE_MESA3D_LLVM=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH v2 2/4] package/mesa3d: add option to enable VIRTIO vulkan driver
2024-12-05 17:36 [Buildroot] [PATCH v2 0/4] Enable venus vulkan encapsulation and add vkmark Alex Bennée
2024-12-05 17:36 ` [Buildroot] [PATCH v2 1/4] support/testing: update tests for SOFTPIPE (squash!) Alex Bennée
@ 2024-12-05 17:36 ` Alex Bennée
2025-02-05 15:12 ` Thomas Petazzoni
2024-12-05 17:36 ` [Buildroot] [PATCH v2 3/4] package/vkmark: add vkmark benchmarking tool Alex Bennée
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Alex Bennée @ 2024-12-05 17:36 UTC (permalink / raw)
To: buildroot; +Cc: Bernd Kuhls, Romain Naour
The support for Venus (the Vulkan VirtIO encapsulation) in MESA has
been stable since 23.2 so add an option to enable it.
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240822181546.64900-6-bernd@kuhls.net>
---
v2
- re-based on Bernd's series
- make clear Venus is the encapsulation for Vulkan
- dropped python-pyyaml as merged in earlier bumps
---
package/mesa3d/Config.in | 6 ++++++
package/mesa3d/mesa3d.mk | 1 +
2 files changed, 7 insertions(+)
diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index 058308fbb2..2f2b4869a4 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -334,6 +334,12 @@ config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_SOFTPIPE
help
Vulkan softpipe driver.
+config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_VIRTIO
+ bool "Vulkan VirtIO driver (Venus)"
+ select BR2_PACKAGE_MESA3D_VULKAN_DRIVER
+ help
+ Vulkan VirtIO (venus) driver.
+
comment "Off-screen Rendering"
config BR2_PACKAGE_MESA3D_OSMESA_GALLIUM
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index d7459d0f19..bd6e53d8da 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -111,6 +111,7 @@ MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL) += virgl
MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_BROADCOM) += broadcom
MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL) += intel
MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_SWRAST) += swrast
+MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_VIRTIO) += virtio
ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),)
MESA3D_CONF_OPTS += \
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH v2 3/4] package/vkmark: add vkmark benchmarking tool
2024-12-05 17:36 [Buildroot] [PATCH v2 0/4] Enable venus vulkan encapsulation and add vkmark Alex Bennée
2024-12-05 17:36 ` [Buildroot] [PATCH v2 1/4] support/testing: update tests for SOFTPIPE (squash!) Alex Bennée
2024-12-05 17:36 ` [Buildroot] [PATCH v2 2/4] package/mesa3d: add option to enable VIRTIO vulkan driver Alex Bennée
@ 2024-12-05 17:36 ` Alex Bennée
2025-02-05 15:11 ` Thomas Petazzoni via buildroot
2024-12-05 17:36 ` [Buildroot] [PATCH v2 4/4] support/testing: add test for vkmark package (PENDING!) Alex Bennée
2025-02-05 15:07 ` [Buildroot] [PATCH v2 0/4] Enable venus vulkan encapsulation and add vkmark Thomas Petazzoni via buildroot
4 siblings, 1 reply; 9+ messages in thread
From: Alex Bennée @ 2024-12-05 17:36 UTC (permalink / raw)
To: buildroot; +Cc: Eric Le Bihan
We build from the current master as we need fairly upto date bits for
cross compile support.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
v3
- add xcb-util-wm deps under X11
- add assimp directly to VKMARK_DEPENDENCIES
- drop duplicate BR2_INSTALL_LIBSTDCPP
- drop BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
v2
- fix whitespace errors in Config.in
- fix sorting of sources
- add DEVELOPERS entry
- rework KConfig based on review
- drop unused sha256sum
- explicitly enable/disable the backends
---
DEVELOPERS | 3 +++
package/Config.in | 1 +
package/vkmark/Config.in | 46 ++++++++++++++++++++++++++++++++++++++
package/vkmark/vkmark.hash | 2 ++
package/vkmark/vkmark.mk | 34 ++++++++++++++++++++++++++++
5 files changed, 86 insertions(+)
create mode 100644 package/vkmark/Config.in
create mode 100644 package/vkmark/vkmark.hash
create mode 100644 package/vkmark/vkmark.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index d75df5cc55..ee11ae3628 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -138,6 +138,9 @@ F: package/liblog4c-localtime/
N: Alexandre Belloni <alexandre.belloni@bootlin.com>
F: package/tz/
+N: Alex Bennée <alex.bennee@linaro.org>
+F: package/vkmark/
+
N: Alexandre Esse <alexandre.esse.dev@gmail.com>
F: package/kvazaar/
F: package/v4l2loopback/
diff --git a/package/Config.in b/package/Config.in
index 57578a7204..78cb67543b 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -342,6 +342,7 @@ comment "Graphic applications"
source "package/swaybg/Config.in"
source "package/tesseract-ocr/Config.in"
source "package/tinifier/Config.in"
+ source "package/vkmark/Config.in"
comment "Graphic libraries"
source "package/cegui/Config.in"
diff --git a/package/vkmark/Config.in b/package/vkmark/Config.in
new file mode 100644
index 0000000000..3e899225ed
--- /dev/null
+++ b/package/vkmark/Config.in
@@ -0,0 +1,46 @@
+config BR2_PACKAGE_VKMARK_FLAVOR_ANY
+ bool
+
+config BR2_PACKAGE_VKMARK_FLAVOR_KMS
+ bool
+ default y if BR2_PACKAGE_HAS_LIBGBM
+ select BR2_PACKAGE_VKMARK_FLAVOR_ANY
+
+config BR2_PACKAGE_VKMARK_FLAVOR_WAYLAND
+ bool
+ default y if BR2_PACKAGE_WAYLAND
+ select BR2_PACKAGE_VKMARK_FLAVOR_ANY
+
+config BR2_PACKAGE_VKMARK_FLAVOR_X11
+ bool
+ default y if BR2_PACKAGE_XORG7
+ select BR2_PACKAGE_VKMARK_FLAVOR_ANY
+
+config BR2_PACKAGE_VKMARK
+ bool "vkmark"
+ depends on BR2_PACKAGE_VKMARK_FLAVOR_ANY
+ select BR2_PACKAGE_VULKAN_HEADERS
+ select BR2_PACKAGE_VULKAN_LOADER
+ depends on !BR2_STATIC_LIBS # vulkan-loader
+ depends on BR2_TOOLCHAIN_HAS_THREADS # vulkan-loader
+ select BR2_PACKAGE_GLM
+ depends on BR2_USE_WCHAR # assimp
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # assimp
+ depends on BR2_INSTALL_LIBSTDCPP # vulkan-loader, glm, assimp, vkmark
+ select BR2_PACKAGE_ASSIMP
+ select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_VKMARK_FLAVOR_WAYLAND
+ select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_VKMARK_FLAVOR_X11
+ select BR2_PACKAGE_XCB_UTIL_WM if BR2_PACKAGE_VKMARK_FLAVOR_X11
+ select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_VKMARK_FLAVOR_KMS
+ help
+ vmmark is an Vulkan GPU benchmark.
+
+ https://github.com/vkmark/vkmark
+
+if BR2_PACKAGE_VKMARK_FLAVOR_ANY
+
+comment "vkmark needs a toolchain w/ C++, dynamic library, threads"
+comment "and some form of backend (wayland, xcb or drm)"
+ depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \
+ !BR2_TOOLCHAIN_HAS_THREADS
+endif
diff --git a/package/vkmark/vkmark.hash b/package/vkmark/vkmark.hash
new file mode 100644
index 0000000000..ee8241d7de
--- /dev/null
+++ b/package/vkmark/vkmark.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 d08143e8828d5b9ed005cb6dcef4d88a49df0ac4c9e1356ace739b449c165f54 vkmark-ab6e6f34077722d5ae33f6bd40b18ef9c0e99a15.tar.gz
diff --git a/package/vkmark/vkmark.mk b/package/vkmark/vkmark.mk
new file mode 100644
index 0000000000..d82fb42e43
--- /dev/null
+++ b/package/vkmark/vkmark.mk
@@ -0,0 +1,34 @@
+################################################################################
+#
+# vkmark
+#
+################################################################################
+
+VKMARK_VERSION = ab6e6f34077722d5ae33f6bd40b18ef9c0e99a15
+VKMARK_SITE = $(call github,vkmark,vkmark,$(VKMARK_VERSION))
+VKMARK_LICENSE = LGPL-2.1
+VKMARK_LICENSE_FILES = COPYING-LGPL2.1
+VKMARK_DEPENDENCIES = host-pkgconf vulkan-headers vulkan-loader glm assimp
+
+ifeq ($(BR2_PACKAGE_VKMARK_FLAVOR_KMS),y)
+VKMARK_DEPENDENCIES += libdrm libgbm
+VKMARK_CONF_OPTS += -Dkms=true
+else
+VKMARK_CONF_OPTS += -Dkms=false
+endif
+
+ifeq ($(BR2_PACKAGE_VKMARK_FLAVOR_WAYLAND),y)
+VKMARK_DEPENDENCIES += wayland wayland-protocols
+VKMARK_CONF_OPTS += -Dwayland=true
+else
+VKMARK_CONF_OPTS += -Dwayland=false
+endif
+
+ifeq ($(BR2_PACKAGE_VKMARK_FLAVOR_X11),y)
+VKMARK_DEPENDENCIES += libxcb xcb-util-wm
+VKMARK_CONF_OPTS += -Dxcb=true
+else
+VKMARK_CONF_OPTS += -Dxcb=false
+endif
+
+$(eval $(meson-package))
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH v2 4/4] support/testing: add test for vkmark package (PENDING!)
2024-12-05 17:36 [Buildroot] [PATCH v2 0/4] Enable venus vulkan encapsulation and add vkmark Alex Bennée
` (2 preceding siblings ...)
2024-12-05 17:36 ` [Buildroot] [PATCH v2 3/4] package/vkmark: add vkmark benchmarking tool Alex Bennée
@ 2024-12-05 17:36 ` Alex Bennée
2025-02-05 15:07 ` [Buildroot] [PATCH v2 0/4] Enable venus vulkan encapsulation and add vkmark Thomas Petazzoni via buildroot
4 siblings, 0 replies; 9+ messages in thread
From: Alex Bennée @ 2024-12-05 17:36 UTC (permalink / raw)
To: buildroot
To test vkmark we need a headless Weston compositor so we can run the
test without messing around with actual displays.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
Currently this won't work with the host QEMU. You will need QEMU 9.2.0
with a modern virglrenderer (as in Trixie) to expose the Vulkan GPU to
the guest.
---
support/testing/tests/package/test_vkmark.py | 75 ++++++++++++++++++++
1 file changed, 75 insertions(+)
create mode 100644 support/testing/tests/package/test_vkmark.py
diff --git a/support/testing/tests/package/test_vkmark.py b/support/testing/tests/package/test_vkmark.py
new file mode 100644
index 0000000000..9eebdd989b
--- /dev/null
+++ b/support/testing/tests/package/test_vkmark.py
@@ -0,0 +1,75 @@
+import os
+
+import infra.basetest
+
+VULKANINFO_TIMEOUT = 120
+
+
+class TestVkMark(infra.basetest.BRTest):
+ config = \
+ """
+ BR2_aarch64=y
+ BR2_cortex_a76=y
+ BR2_TOOLCHAIN_EXTERNAL=y
+ BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
+ BR2_ROOTFS_MERGED_USR=y
+ BR2_LINUX_KERNEL=y
+ BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+ BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
+ BR2_PACKAGE_GLMARK2=y
+ BR2_PACKAGE_VKMARK=y
+ BR2_PACKAGE_MESA3D=y
+ BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL=y
+ BR2_PACKAGE_MESA3D_VULKAN_DRIVER_VIRTIO=y
+ BR2_PACKAGE_MESA3D_OPENGL_GLX=y
+ BR2_PACKAGE_MESA3D_OPENGL_ES=y
+ BR2_PACKAGE_WESTON=y
+ BR2_PACKAGE_WESTON_HEADLESS=y
+ BR2_PACKAGE_WESTON_XWAYLAND=y
+ BR2_PACKAGE_XORG7=y
+ BR2_PACKAGE_DBUS=y
+ BR2_PACKAGE_LIBMD=y
+ BR2_PACKAGE_LIBSCRYPT=y
+ BR2_PACKAGE_LIBXCRYPT=y
+ BR2_PACKAGE_OPENSSL=y
+ BR2_PACKAGE_LIBDRM_INTEL=y
+ BR2_PACKAGE_LIBDRM_RADEON=y
+ BR2_PACKAGE_LIBEPOXY=y
+ BR2_PACKAGE_YAJL=y
+ BR2_PACKAGE_UTIL_LINUX_BINARIES=y
+ BR2_PACKAGE_UTIL_LINUX_AGETTY=y
+ BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+ BR2_TARGET_ROOTFS_EXT2=y
+ BR2_TARGET_ROOTFS_EXT2_SIZE="250M"
+ BR2_ROOTFS_OVERLAY="{}"
+ """.format(
+ infra.filepath("tests/package/test_vkmark/rootfs-overlay"))
+
+ def login(self):
+ img = os.path.join(self.builddir, "images", "rootfs.ext2")
+ kern = os.path.join(self.builddir, "images", "bzImage")
+ # glxinfo overallocate memory and the minimum that seemed to work was 512MB
+ self.emulator.boot(arch="aarch64",
+ kernel=kern,
+ kernel_cmdline=["root=/dev/vda console=ttyAMA0"],
+ options=["-M", "virt", "-cpu", "cortex-a76", "-m", "512",
+ "-drive",
+ "file={},if=virtio,format=raw".format(img),
+ "-device virtio-gpu-gl-pci,hostmem=4G"])
+
+ # when buildroot's QEMU gets Venus support "-device virtio-gpu-gl-pci,hostmem=4G,blob=on,venus=on"])
+ self.emulator.login()
+
+ def test_run(self):
+ self.login()
+
+ # The test case verifies that the xserver with GLX is working
+ cmd = "weston -B headless --renderer gl --shell kiosk -- vkmark"
+ output, exit_code = self.emulator.run(cmd, VULKANINFO_TIMEOUT)
+
+ self.assertEqual(exit_code, 0)
+ found_venus = False
+ for line in output:
+ found_venus |= "Virtio-GPU Venus" in line
+
+ self.assertEqual(found_venus, True)
--
2.39.5
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Buildroot] [PATCH v2 0/4] Enable venus vulkan encapsulation and add vkmark
2024-12-05 17:36 [Buildroot] [PATCH v2 0/4] Enable venus vulkan encapsulation and add vkmark Alex Bennée
` (3 preceding siblings ...)
2024-12-05 17:36 ` [Buildroot] [PATCH v2 4/4] support/testing: add test for vkmark package (PENDING!) Alex Bennée
@ 2025-02-05 15:07 ` Thomas Petazzoni via buildroot
2025-02-05 16:17 ` Alex Bennée
4 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-02-05 15:07 UTC (permalink / raw)
To: Alex Bennée; +Cc: buildroot
Hello Alex,
On Thu, 5 Dec 2024 17:36:39 +0000
Alex Bennée <alex.bennee@linaro.org> wrote:
> This is a respin of a series I sent out in August. This time it
> applies on top of the series Bernd has just sent out:
>
> Subject: [Buildroot] [PATCH 1/7] package/libdrm: add host variant
> Message-Id: <20241202174008.1134667-1-bernd@kuhls.net>
> Date: Mon, 2 Dec 2024 18:40:02 +0100
> From: Bernd Kuhls <bernd@kuhls.net>
Bernd has sent a new series at:
https://patchwork.ozlabs.org/project/buildroot/list/?series=440892
so I'm confused how this series of you fits with it.
In which commit should "support/testing: update tests for SOFTPIPE" be
squashed?
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Buildroot] [PATCH v2 3/4] package/vkmark: add vkmark benchmarking tool
2024-12-05 17:36 ` [Buildroot] [PATCH v2 3/4] package/vkmark: add vkmark benchmarking tool Alex Bennée
@ 2025-02-05 15:11 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-02-05 15:11 UTC (permalink / raw)
To: Alex Bennée; +Cc: buildroot, Eric Le Bihan
Hello,
I was working on vkmark, but ended up looking at your v1 that was still
in patchwork. This version fixes a number of issues, but I still have
questions/topics.
On Thu, 5 Dec 2024 17:36:42 +0000
Alex Bennée <alex.bennee@linaro.org> wrote:
> We build from the current master as we need fairly upto date bits for
> diff --git a/package/vkmark/Config.in b/package/vkmark/Config.in
> new file mode 100644
> index 0000000000..3e899225ed
> --- /dev/null
> +++ b/package/vkmark/Config.in
> @@ -0,0 +1,46 @@
This file still has a whole bunch of tab vs. spaces issues. You can run
"make check-package" to figure out these issues. They are also visible
in the diff below.
> +config BR2_PACKAGE_VKMARK_FLAVOR_ANY
> + bool
> +
> +config BR2_PACKAGE_VKMARK_FLAVOR_KMS
> + bool
> + default y if BR2_PACKAGE_HAS_LIBGBM
> + select BR2_PACKAGE_VKMARK_FLAVOR_ANY
> +
> +config BR2_PACKAGE_VKMARK_FLAVOR_WAYLAND
> + bool
> + default y if BR2_PACKAGE_WAYLAND
> + select BR2_PACKAGE_VKMARK_FLAVOR_ANY
> +
> +config BR2_PACKAGE_VKMARK_FLAVOR_X11
> + bool
> + default y if BR2_PACKAGE_XORG7
> + select BR2_PACKAGE_VKMARK_FLAVOR_ANY
> +
> +config BR2_PACKAGE_VKMARK
> + bool "vkmark"
> + depends on BR2_PACKAGE_VKMARK_FLAVOR_ANY
> + select BR2_PACKAGE_VULKAN_HEADERS
> + select BR2_PACKAGE_VULKAN_LOADER
> + depends on !BR2_STATIC_LIBS # vulkan-loader
> + depends on BR2_TOOLCHAIN_HAS_THREADS # vulkan-loader
> + select BR2_PACKAGE_GLM
> + depends on BR2_USE_WCHAR # assimp
> + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # assimp
> + depends on BR2_INSTALL_LIBSTDCPP # vulkan-loader, glm, assimp, vkmark
> + select BR2_PACKAGE_ASSIMP
> + select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_VKMARK_FLAVOR_WAYLAND
> + select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_VKMARK_FLAVOR_X11
> + select BR2_PACKAGE_XCB_UTIL_WM if BR2_PACKAGE_VKMARK_FLAVOR_X11
> + select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_VKMARK_FLAVOR_KMS
> + help
> + vmmark is an Vulkan GPU benchmark.
> +
> + https://github.com/vkmark/vkmark
> +
> +if BR2_PACKAGE_VKMARK_FLAVOR_ANY
> +
> +comment "vkmark needs a toolchain w/ C++, dynamic library, threads"
> +comment "and some form of backend (wayland, xcb or drm)"
> + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \
> + !BR2_TOOLCHAIN_HAS_THREADS
> +endif
Please replace this with:
+comment "vkmark needs a toolchain w/ dynamic library, threads, wchar, gcc >= 7, C++"
+ depends on BR2_STATIC_LIBS || \
+ !BR2_TOOLCHAIN_HAS_THREADS || \
+ !BR2_USE_WCHAR || \
+ !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
+ !BR2_INSTALL_LIBSTDCPP
+
+comment "vkmark needs a backend: gbm, wayland or xcb"
+ depends on !BR2_PACKAGE_VKMARK_FLAVOR_ANY
Indeed mentioning in your Config.in comment that it needs some form of
backend... and have the comment within a BR2_PACKAGE_VKMARK_FLAVOR_ANY
condition doesn't make much sense.
> diff --git a/package/vkmark/vkmark.hash b/package/vkmark/vkmark.hash
> new file mode 100644
> index 0000000000..ee8241d7de
> --- /dev/null
> +++ b/package/vkmark/vkmark.hash
> @@ -0,0 +1,2 @@
> +# Locally computed
> +sha256 d08143e8828d5b9ed005cb6dcef4d88a49df0ac4c9e1356ace739b449c165f54 vkmark-ab6e6f34077722d5ae33f6bd40b18ef9c0e99a15.tar.gz
The hash of the license file is missing.
> diff --git a/package/vkmark/vkmark.mk b/package/vkmark/vkmark.mk
> new file mode 100644
> index 0000000000..d82fb42e43
> --- /dev/null
> +++ b/package/vkmark/vkmark.mk
> @@ -0,0 +1,34 @@
> +################################################################################
> +#
> +# vkmark
> +#
> +################################################################################
> +
> +VKMARK_VERSION = ab6e6f34077722d5ae33f6bd40b18ef9c0e99a15
> +VKMARK_SITE = $(call github,vkmark,vkmark,$(VKMARK_VERSION))
> +VKMARK_LICENSE = LGPL-2.1
> +VKMARK_LICENSE_FILES = COPYING-LGPL2.1
> +VKMARK_DEPENDENCIES = host-pkgconf vulkan-headers vulkan-loader glm assimp
Minor nit: alphabetic ordering is preferred.
> +ifeq ($(BR2_PACKAGE_VKMARK_FLAVOR_KMS),y)
> +VKMARK_DEPENDENCIES += libdrm libgbm
So here, I don't understand how you are able to get a configuration
that produces libgbm. Indeed, BR2_PACKAGE_MESA3D_GBM can only be enable
if BR2_PACKAGE_MESA3D_GALLIUM_DRIVER is true (but the vulkan VirtIO
driver is not a Gallium driver) and BR2_PACKAGE_MESA3D_OPENGL_EGL is
set (and we don't have it because we're using Vulkan).
Could you clarify?
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Buildroot] [PATCH v2 2/4] package/mesa3d: add option to enable VIRTIO vulkan driver
2024-12-05 17:36 ` [Buildroot] [PATCH v2 2/4] package/mesa3d: add option to enable VIRTIO vulkan driver Alex Bennée
@ 2025-02-05 15:12 ` Thomas Petazzoni
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2025-02-05 15:12 UTC (permalink / raw)
To: Alex Bennée; +Cc: buildroot, Bernd Kuhls, Romain Naour
On Thu, 5 Dec 2024 17:36:41 +0000
Alex Bennée <alex.bennee@linaro.org> wrote:
> The support for Venus (the Vulkan VirtIO encapsulation) in MESA has
> been stable since 23.2 so add an option to enable it.
>
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Message-Id: <20240822181546.64900-6-bernd@kuhls.net>
>
> ---
> v2
> - re-based on Bernd's series
> - make clear Venus is the encapsulation for Vulkan
> - dropped python-pyyaml as merged in earlier bumps
> ---
> package/mesa3d/Config.in | 6 ++++++
> package/mesa3d/mesa3d.mk | 1 +
> 2 files changed, 7 insertions(+)
I have applied this patch, but the version posted by Bernd in his
latest mesa3d series.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Buildroot] [PATCH v2 0/4] Enable venus vulkan encapsulation and add vkmark
2025-02-05 15:07 ` [Buildroot] [PATCH v2 0/4] Enable venus vulkan encapsulation and add vkmark Thomas Petazzoni via buildroot
@ 2025-02-05 16:17 ` Alex Bennée
0 siblings, 0 replies; 9+ messages in thread
From: Alex Bennée @ 2025-02-05 16:17 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot
Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> Hello Alex,
>
> On Thu, 5 Dec 2024 17:36:39 +0000
> Alex Bennée <alex.bennee@linaro.org> wrote:
>
>> This is a respin of a series I sent out in August. This time it
>> applies on top of the series Bernd has just sent out:
>>
>> Subject: [Buildroot] [PATCH 1/7] package/libdrm: add host variant
>> Message-Id: <20241202174008.1134667-1-bernd@kuhls.net>
>> Date: Mon, 2 Dec 2024 18:40:02 +0100
>> From: Bernd Kuhls <bernd@kuhls.net>
>
> Bernd has sent a new series at:
>
> https://patchwork.ozlabs.org/project/buildroot/list/?series=440892
>
> so I'm confused how this series of you fits with it.
>
> In which commit should "support/testing: update tests for SOFTPIPE" be
> squashed?
The patch that bumps mesa where BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST
is deprecated for SOFTPIPE. This was reported as causing a number of the
buildroot test cases to have failed but I wasn't able to figure out why
they were.
If you have merged Bernd's series I can re-base and see what is left.
>
> Thomas
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-02-05 16:17 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-05 17:36 [Buildroot] [PATCH v2 0/4] Enable venus vulkan encapsulation and add vkmark Alex Bennée
2024-12-05 17:36 ` [Buildroot] [PATCH v2 1/4] support/testing: update tests for SOFTPIPE (squash!) Alex Bennée
2024-12-05 17:36 ` [Buildroot] [PATCH v2 2/4] package/mesa3d: add option to enable VIRTIO vulkan driver Alex Bennée
2025-02-05 15:12 ` Thomas Petazzoni
2024-12-05 17:36 ` [Buildroot] [PATCH v2 3/4] package/vkmark: add vkmark benchmarking tool Alex Bennée
2025-02-05 15:11 ` Thomas Petazzoni via buildroot
2024-12-05 17:36 ` [Buildroot] [PATCH v2 4/4] support/testing: add test for vkmark package (PENDING!) Alex Bennée
2025-02-05 15:07 ` [Buildroot] [PATCH v2 0/4] Enable venus vulkan encapsulation and add vkmark Thomas Petazzoni via buildroot
2025-02-05 16:17 ` Alex Bennée
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox