Add vkmark graphics benchmarking tool
v7 cover Add vkmark graphics benchmarking tool
Hi,
Now that the Mesa bits have been merged the series is considerably shorter. I've up-revved a vulkan-header/loader/tools library which also seems to have solved some of the cross building bits so I no longer need the hacky patch.
I've also simplified the TestVkMark test so it will work with an un-accelerated display and simply test vkmark works.
For v7
- rebase
- drop patches now merged upstream
- address test-pkg failures with more deps
- drop mesa3d bump
For v5
- rebase
- drop unneeded patches
- drop already merged patches
- tweak the test
- include https://github.com/vkmark/vkmark/pull/76 patches
For v4
- new patch to vkmark to run under VirtIO
- see individual patches for other updates
For v3
- re-based on current master
- new vulkan-sdk package (for volk loader)
- bump vulkan support to 1.4.307
- include isystem patch (maybe squash with ^?)
- vkmark now has a tagged release (2025.01)
- addressed review comments (see individual patches)
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
While the vkmark test will happily run with lvpipe sw rendering you will need a recent QEMU 9.2.0+ (released 11/12/2024) built with an upto date virglrenderer (available in Debian Trixie/Testing).
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):
package/vulkan-sdk: new package package/vulkan-[headers|loader|tools]: bump to 1.4.317 release package/vkmark: add vkmark benchmarking tool support/testing: add test for vkmark package
DEVELOPERS | 3 + package/Config.in | 2 + package/vkmark/Config.in | 48 +++++++++++ package/vkmark/vkmark.hash | 3 + package/vkmark/vkmark.mk | 34 ++++++++ package/vulkan-headers/vulkan-headers.hash | 2 +- package/vulkan-headers/vulkan-headers.mk | 2 +- package/vulkan-loader/vulkan-loader.hash | 2 +- package/vulkan-sdk/Config.in | 12 +++ package/vulkan-sdk/vulkan-sdk.hash | 3 + package/vulkan-sdk/vulkan-sdk.mk | 18 +++++ package/vulkan-tools/Config.in | 5 +- package/vulkan-tools/vulkan-tools.hash | 2 +- package/vulkan-tools/vulkan-tools.mk | 3 +- support/testing/infra/emulator.py | 4 +- support/testing/tests/package/test_vkmark.py | 80 +++++++++++++++++++ .../etc/profile.d/10-xdg-runtime.sh | 1 + 17 files changed, 216 insertions(+), 8 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 package/vulkan-sdk/Config.in create mode 100644 package/vulkan-sdk/vulkan-sdk.hash create mode 100644 package/vulkan-sdk/vulkan-sdk.mk create mode 100644 support/testing/tests/package/test_vkmark.py create mode 100644 support/testing/tests/package/test_vkmark/rootfs-overlay/etc/profile.d/10-xdg-runtime.sh
Signature · 6 lines
2.47.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v7 1/4 package/vulkan-sdk: new package
The principle component of this is the new volk meta-loader which is required for more recent versions of vulkan-tools. There does seem to be a little confusion with github Releases lagging behind tagged versions of the sdk. I've gone for the latest SDK version to stay as closely aligned to the rest of the system as I can.
---
v7
- add depends on !BR2_STATIC_LIBS # dlfcn.h
- add depends on BR2_INSTALL_LIBSTDCPP for C++
v6
- bump to vulkan-sdk-1.4.313.0
--- package/Config.in | 1 + package/vulkan-sdk/Config.in | 12 ++++++++++++ package/vulkan-sdk/vulkan-sdk.hash | 3 +++ package/vulkan-sdk/vulkan-sdk.mk | 18 ++++++++++++++++++ 4 files changed, 34 insertions(+) create mode 100644 package/vulkan-sdk/Config.in create mode 100644 package/vulkan-sdk/vulkan-sdk.hash create mode 100644 package/vulkan-sdk/vulkan-sdk.mk
package/Config.in +1 -0
@@ -375,6 +375,7 @@ comment "Graphic libraries" source "package/tk/Config.in" source "package/vulkan-headers/Config.in" source "package/vulkan-loader/Config.in" + source "package/vulkan-sdk/Config.in" source "package/vulkan-tools/Config.in" comment "Other GUIs"
package/vulkan-sdk/Config.in new file +12 -0
@@ -0,0 +1,12 @@ +config BR2_PACKAGE_VULKAN_SDK + bool "vulkan-sdk" + depends on !BR2_STATIC_LIBS # dlfcn.h + depends on BR2_INSTALL_LIBSTDCPP # C++ + select BR2_PACKAGE_VULKAN_HEADERS + help + The Vulkan meta-loader + + https://github.com/zeux/volk + +comment "Vulkan-SDK need toolchain w/ C++, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS
package/vulkan-sdk/vulkan-sdk.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 d86bcf1aff499f41a3e445b55df5e393a5ce49b1bda689eb7335b0a0a54a3c0b vulkan-sdk-1.4.313.0.tar.gz +sha256 33c831f76b79501665e66c23ac8f876020457c216d44526a8f747da897999b35 LICENSE.md
package/vulkan-sdk/vulkan-sdk.mk new file +18 -0
@@ -0,0 +1,18 @@ +################################################################################ +# +# vulkan-sdk +# +################################################################################ + +VULKAN_SDK_VERSION = 1.4.313.0 +VULKAN_SDK_SITE = https://github.com/zeux/volk/archive/refs/tags +VULKAN_SDK_SOURCE= vulkan-sdk-$(VULKAN_SDK_VERSION).tar.gz +VULKAN_SDK_LICENSE = MIT +VULKAN_SDK_LICENSE_FILES = LICENSE.md +VULKAN_SDK_INSTALL_STAGING = YES + +VULKAN_SDK_DEPENDENCIES = vulkan-headers + +VULKAN_SDK_CONF_OPTS += -DVOLK_INSTALL=ON + +$(eval $(cmake-package))
Signature · 6 lines
2.47.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v7 1/4] package/vulkan-sdk: new package
Quoted 7 lines · Alex Bennée
The principle component of this is the new volk meta-loader which is required for more recent versions of vulkan-tools. There does seem to be a little confusion with github Releases lagging behind tagged versions of the sdk. I've gone for the latest SDK version to stay as closely aligned to the rest of the system as I can.
Signed-off-by Alex Bennée <[email protected]>
Patch applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v7 2/4 package/vulkan-[headers|loader|tools]: bump to 1.4.317 release
In reply to Alex BennéeUpdate to the current release. We now need the recently added vulkan-sdk to have access to the volk loader. Update the depends comments appropriately.
---
v7
- depends on !BR2_STATIC_LIBS # vulkan-loader, vulkan-sdk
v5
- 1.4.316 -> 1.4.317
v4
- 1.4.306 -> 1.4.316
- doesn't seem to need isystem patch now
v3
- fix up comment, properly select the SDK package
--- package/vulkan-headers/vulkan-headers.hash | 2 +- package/vulkan-headers/vulkan-headers.mk | 2 +- package/vulkan-loader/vulkan-loader.hash | 2 +- package/vulkan-tools/Config.in | 5 +++-- package/vulkan-tools/vulkan-tools.hash | 2 +- package/vulkan-tools/vulkan-tools.mk | 3 ++- 6 files changed, 9 insertions(+), 7 deletions(-)
package/vulkan-headers/vulkan-headers.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 317e467a5fb2eaa6a18b984ec70fdbfaccd93595a3e6f4bcceca7d3fab280505 vulkan-headers-1.3.262.tar.gz +sha256 78665959d10b09061d8c3e21db8bf3e8b699e2d3d532fce850a32312dba7228b vulkan-headers-1.4.317.tar.gz sha256 ac24e5ea920e4318e4d02c4086ae51f53cfb03feed06c18df1019e7ada1ec7bc LICENSE.md
package/vulkan-headers/vulkan-headers.mk +1 -1
@@ -6,7 +6,7 @@ # Note: changing this version will also affect vulkan-loader and # vulkan-tools, so please update those packages as well. -VULKAN_HEADERS_VERSION = 1.3.262 +VULKAN_HEADERS_VERSION = 1.4.317 VULKAN_HEADERS_SITE = $(call github,KhronosGroup,Vulkan-Headers,v$(VULKAN_HEADERS_VERSION)) VULKAN_HEADERS_LICENSE = Apache-2.0, MIT VULKAN_HEADERS_LICENSE_FILES = LICENSE.md
package/vulkan-loader/vulkan-loader.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 3bbaa5ee64058a89949eb777de66ce94bfe3141892514172cfc9451c756802d5 vulkan-loader-1.3.262.tar.gz +sha256 e4e18585fe902ee04e86c1cdb2996b686bffef2cab02cb6079221fe69df05af8 vulkan-loader-1.4.317.tar.gz sha256 43c0a37e6a0fa7ff3c843b3ec5a4fac84b712558ddac103fbd4c1649662a9ece LICENSE.txt
package/vulkan-tools/Config.in +3 -2
@@ -1,17 +1,18 @@ config BR2_PACKAGE_VULKAN_TOOLS bool "vulkan-tools" depends on BR2_INSTALL_LIBSTDCPP # vulkan-loader - depends on !BR2_STATIC_LIBS # vullan-loader + depends on !BR2_STATIC_LIBS # vulkan-loader, vulkan-sdk depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11 depends on BR2_TOOLCHAIN_HAS_THREADS # vulkan-loader select BR2_PACKAGE_VULKAN_HEADERS select BR2_PACKAGE_VULKAN_LOADER + select BR2_PACKAGE_VULKAN_SDK help The Khronos official Vulkan Tools and Utilities. https://github.com/KhronosGroup/Vulkan-Tools -comment "vulkan-tools needs a toolchain w/ C++, dynamic library, threads, gcc >= 4.9" +comment "vulkan-tools needs a toolchain w/ C++, dynamic library, threads, gcc >= 4.9, vulkan-sdk" depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
package/vulkan-tools/vulkan-tools.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 8c77d02694d0516ae2ba3f3718745647e87e788ef93faabb2e3674ff32608010 vulkan-tools-1.3.262.tar.gz +sha256 4586309ab5b2a9584fde62fd85b0ef5bb98b4cdbca9cb1ba3a2b4978dc2f355c vulkan-tools-1.4.317.tar.gz sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE.txt
package/vulkan-tools/vulkan-tools.mk +2 -1
@@ -11,7 +11,8 @@ VULKAN_TOOLS_LICENSE_FILES = LICENSE.txt VULKAN_TOOLS_DEPENDENCIES = \ vulkan-headers \ - vulkan-loader + vulkan-loader \ + vulkan-sdk VULKAN_TOOLS_CONF_OPTS += \ -DBUILD_CUBE=OFF \
Signature · 6 lines
2.47.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v7 2/4] package/vulkan-[headers|loader|tools]: bump to 1.4.317 release
Quoted 5 lines · Alex Bennée
Update to the current release. We now need the recently added vulkan-sdk to have access to the volk loader. Update the depends comments appropriately.
Signed-off-by Alex Bennée <[email protected]>
Patch applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v7 3/4 package/vkmark: add vkmark benchmarking tool
In reply to Alex BennéeWe build from a recent HEAD to ensure we have the fixes to better handle the missing KHR_display extension.
---
v7
- cross compile fixes now upstream, bump to 101be30
- drop .checkpackageignore changes
v6
- add patches from https://github.com/vkmark/vkmark/pull/76
- sort Kconfig symbols
- update .checkpackageignore
v5
- move from 2025.1 to HEAD (36e7d9b build: Enable precompiled headers)
- drop old patch (see adf1aa3 for final fix)
v4
- fix tab vs space damage
- don't if BR2_PACKAGE_VKMARK_FLAVOR_ANY
- make comments properly depend
- use the new 2025.01 release
- add sha256sum of COPYING-LGPL2.1
- alphabetic sort of initial VKMARK_DEPENDENCIES
- add vulkan error probing patch
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 | 48 ++++++++++++++++++++++++++++++++++++++ package/vkmark/vkmark.hash | 3 +++ package/vkmark/vkmark.mk | 34 +++++++++++++++++++++++++++ 5 files changed, 89 insertions(+) create mode 100644 package/vkmark/Config.in create mode 100644 package/vkmark/vkmark.hash create mode 100644 package/vkmark/vkmark.mk
DEVELOPERS +3 -0
@@ -141,6 +141,9 @@ F: package/liblog4c-localtime/ N: Alexandre Belloni <[email protected]> F: package/tz/ +N: Alex Bennée <[email protected]> +F: package/vkmark/ + N: Alexandre Esse <[email protected]> F: package/kvazaar/ F: package/v4l2loopback/
package/Config.in +1 -0
@@ -339,6 +339,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"
package/vkmark/Config.in new file +48 -0
48 lines not on this page · raw message
package/vkmark/vkmark.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally computed +sha256 a866caee5c73a64be6328480df367dfd254191e01b875c40361811dde4c12f33 vkmark-101be30c1a039eab08886919a8065d728b4bd1f0.tar.gz +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING-LGPL2.1
package/vkmark/vkmark.mk new file +34 -0
@@ -0,0 +1,34 @@ +################################################################################ +# +# vkmark +# +################################################################################ + +VKMARK_VERSION = 101be30c1a039eab08886919a8065d728b4bd1f0 +VKMARK_SITE = $(call github,vkmark,vkmark,$(VKMARK_VERSION)) +VKMARK_LICENSE = LGPL-2.1 +VKMARK_LICENSE_FILES = COPYING-LGPL2.1 +VKMARK_DEPENDENCIES = assimp glm host-pkgconf vulkan-headers vulkan-loader + +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))
Signature · 6 lines
2.47.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v7 3/4] package/vkmark: add vkmark benchmarking tool
Hi Alex,
Quoted 4 lines · Alex Bennée
We build from a recent HEAD to ensure we have the fixes to better handle the missing
KHR_displayextension.Signed-off-by Alex Bennée <[email protected]>
This patch still has the "vl.xml" issue reported in the previous version. See:
https://lore.kernel.org/buildroot/[email protected]/
You can reproduce the issue by running the runtime test in the Buildroot docker reference image. For example, using the command:
utils/docker-run support/testing/run-tests \
-k -d dl -o output_folder tests.package.test_vkmark
I see that the PR [1] has been merged upstream. So maybe you could just update to a commit including this fix?
Best regards,
Julien.
[1] https://github.com/vkmark/vkmark/pull/76
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v7 3/4] package/vkmark: add vkmark benchmarking tool
Quoted 10 lines · Julien Olivain
Hi Alex,
Quoted 3 lines · Alex Bennée
We build from a recent HEAD to ensure we have the fixes to better handle the missing
KHR_displayextension.Signed-off-by Alex Bennée <[email protected]>This patch still has the "vl.xml" issue reported in the previous version. See:
https://lore.kernel.org/buildroot/[email protected]/
This version is based on the commits:
https://github.com/vkmark/vkmark/commit/101be30c1a039eab08886919a8065d728b4bd1f0
Quoted 9 lines
You can reproduce the issue by running the runtime test in the Buildroot docker reference image. For example, using the command:
utils/docker-run support/testing/run-tests \
-k -d dl -ooutput_foldertests.package.test_vkmarkI see that the PR [1] has been merged upstream. So maybe you could just update to a commit including this fix?
VKMARK_VERSION = 101be30c1a039eab08886919a8065d728b4bd1f0 VKMARK_SITE = $(call github,vkmark,vkmark,$(VKMARK_VERSION))
During the upstream review I was asked to squash the meson.get_external_property('sys_root', ''), into the join_paths statement but I didn't think that would break anything.
Lets me check what happened.
Quoted 6 lines
Best regards,
Julien.
Signature · 6 lines
Alex Bennée Virtualisation Tech Lead @ Linaro _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v7 4/4 support/testing: add test for vkmark package
In reply to Alex BennéeTo test vkmark we need a headless Weston compositor so we can run the test without messing around with actual displays. Because to run proper accelerated Vulkan pass-through you need a modern QEMU we also enabled the VULKAN_DRIVER_SWRAST driver. This will allow us to run vkmark under CI and other places where we don't have a very modern host system.
---
v5
- simplify package list
- add SWRAST driver for fall-back
- don't use accelerated device in test, document the difference
v4
- add BR2_PACKAGE_WESTON_SHELL_KIOSK=y
v3
- fix ordering of select/depend as suggested by check-package
- fix some flake8 complaints
v2
- add overlay image
- ensure we expose DISPLAY/DBUS env vars
- shorten runtime of vkmark
--- support/testing/infra/emulator.py | 4 +- support/testing/tests/package/test_vkmark.py | 80 +++++++++++++++++++ .../etc/profile.d/10-xdg-runtime.sh | 1 + 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 support/testing/tests/package/test_vkmark.py create mode 100644 support/testing/tests/package/test_vkmark/rootfs-overlay/etc/profile.d/10-xdg-runtime.sh
support/testing/infra/emulator.py +3 -1
@@ -121,7 +121,9 @@ class Emulator(object): host_bin = os.path.join(self.builddir, "host", "bin") br_path = host_bin + os.pathsep + os.environ["PATH"] qemu_env = {"QEMU_AUDIO_DRV": "none", - "PATH": br_path} + "PATH": br_path, + "DBUS_SESSION_BUS_ADDRESS": os.environ["DBUS_SESSION_BUS_ADDRESS"], + "DISPLAY": os.environ["DISPLAY"]} pexpect.run(f"{qemu_cmd[0]} --version", encoding='utf-8', logfile=self.logfile,
support/testing/tests/package/test_vkmark.py new file +80 -0
80 lines not on this page · raw message
support/testing/tests/package/test_vkmark/rootfs-overlay/etc/profile.d/10-xdg-runtime.sh new file +1 -0
@@ -0,0 +1 @@ +export XDG_RUNTIME_DIR=/tmp
Signature · 6 lines
2.47.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v7 4/4] support/testing: add test for vkmark package
Hi Alex,
Quoted 8 lines · Alex Bennée
To test vkmark we need a headless Weston compositor so we can run the test without messing around with actual displays. Because to run proper accelerated Vulkan pass-through you need a modern QEMU we also enabled the
VULKAN_DRIVER_SWRASTdriver. This will allow us to run vkmark under CI and other places where we don't have a very modern host system.Signed-off-by Alex Bennée <[email protected]>
My comments on the previous version from [1] are still applying to this version.
Could you isolate emulator.py in a separate patch?
Running the test as is on a headless server (and fixing the vk.xml issue) fails with output:
support/testing/run-tests \
-d dl -o output_folder \
tests.package.test_vkmark
Traceback (most recent call last):
File "/buildroot/support/testing/tests/package/test_vkmark.py", line 68, in test_run
self.login()
File "/buildroot/support/testing/tests/package/test_vkmark.py",
line 55, in login
self.emulator.boot(arch="aarch64",
File "/buildroot/support/testing/infra/emulator.py", line 126, in
boot
"DISPLAY": os.environ["DISPLAY"]}
~~~~~~~~~~^^^^^^^^^^^
File "<frozen os>", line 679, in __getitem__
KeyError: 'DISPLAY'You should make sure the test succeed in the Buildroot reference docker image, when executed with:
utils/docker-run support/testing/run-tests \
-k -d dl -o output_folder tests.package.test_vkmark
Could you also consider moving this vulkan swrast test to test_mesa3d.py?
Best regards,
Julien.
[1] https://lore.kernel.org/buildroot/[email protected]/
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot