Vulkan support
cover Vulkan support
A starting point to add some/more Vulkan support to Buildroot.
Targeting towards the RPi Vulkan support (as announced e.g. [1]), but send as RFC as not (yet) functional:
- did only try to run standalone and/or with Qt EGLFS, but did not work out as the broadcom vulkan driver is only functional with X11/XCB
- the Qt Vulkan support seems only be functional with EGLFS/Vivante and/or X11/XCB
Tested with the following defconfig (and dtoverlay=vc4-kms-v3d-pi4):
BR2_aarch64=y BR2_cortex_a72=y BR2_ARM_FPU_VFPV4=y BR2_ENABLE_DEBUG=y BR2_OPTIMIZE_3=y BR2_TOOLCHAIN_BUILDROOT_GLIBC=y BR2_PACKAGE_GLIBC_UTILS=y BR2_BINUTILS_VERSION_2_35_X=y BR2_GCC_VERSION_10_X=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_INIT_SYSV=y BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y BR2_SYSTEM_DHCP="eth0" BR2_GENERATE_LOCALE="en_US" BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4-64/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4-64/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay --aarch64" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,967d45b29ca2902f031b867809d72e3b3d623e7a)/linux-967d45b29ca2902f031b867809d72e3b3d623e7a.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2711" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2711-rpi-4-b" BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_PACKAGE_DEJAVU=y BR2_PACKAGE_MESA3D=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4=y BR2_PACKAGE_MESA3D_VULKAN_DRIVER_BROADCOM=y BR2_PACKAGE_MESA3D_VULKAN_DRIVER_SWRAST=y BR2_PACKAGE_MESA3D_OPENGL_ES=y BR2_PACKAGE_VULKAN_TOOLS=y BR2_PACKAGE_QT5=y BR2_PACKAGE_QT5BASE_EXAMPLES=y BR2_PACKAGE_QT5BASE_GUI=y BR2_PACKAGE_QT5BASE_OPENGL_LIB=y BR2_PACKAGE_QT5BASE_VULKAN=y BR2_PACKAGE_QT5BASE_EGLFS=y BR2_PACKAGE_QT5BASE_FONTCONFIG=y BR2_PACKAGE_QT5BASE_HARFBUZZ=y BR2_PACKAGE_QT5BASE_GIF=y BR2_PACKAGE_QT5BASE_JPEG=y BR2_PACKAGE_QT5BASE_PNG=y BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="384M" # BR2_TARGET_ROOTFS_TAR is not set BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_MTOOLS=y
There are three vulkan ICDs installed
- /usr/lib/libvulkan_lvp.so: mesa3d/swrast
- /usr/lib/libvulkan_broadcom.so: mesa3d/broadcom
- /usr/lib/libVkICD_mock_icd.so: vulkan-tools/moc-ICD
Runtime test done:
- vulkan-tools/moc-ICD (works):
$ VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/VkICD_mock_icd.json vulkaninfo ========== VULKANINFO ==========
Vulkan Instance Version: 1.2.165
Instance Extensions: count = 19
===============================
VK_EXT_debug_report : extension revision 9 VK_EXT_debug_utils : extension revision 2 VK_EXT_direct_mode_display : extension revision 1 VK_EXT_display_surface_counter : extension revision 1 VK_EXT_headless_surface : extension revision 1 VK_EXT_swapchain_colorspace : extension revision 4 VK_EXT_validation_features : extension revision 4 VK_EXT_validation_flags : extension revision 2 VK_KHR_device_group_creation : extension revision 1 VK_KHR_display : extension revision 23 VK_KHR_external_fence_capabilities : extension revision 1 VK_KHR_external_memory_capabilities : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2 : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2 : extension revision 1
VK_KHR_surface : extension revision 25
VK_KHR_surface_protected_capabilities : extension revision 1
VK_NV_external_memory_capabilities : extension revision 1
Layers: count = 0
=================
Groups:
=======
No Device Groups Found
Device Properties and Extensions:
=================================
GPU0:
VkPhysicalDeviceProperties:
---------------------------
apiVersion = 4198400 (1.1.0) driverVersion = 1 (0x0001) vendorID = 0xba5eba11 deviceID = 0xf005ba11 deviceType = PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU deviceName = Vulkan Mock Device
[...]
- mesa3d/swrast:
$ VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.cortex-a72.json vulkaninfo WARNING: lavapipe is not a conformant vulkan implementation, testing use only. Segmentation fault
- mesa3d/broadcom:
$ VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/broadcom_icd.cortex-a72.json vulkaninfo ERROR at /home/seiderer/Work/Buildroot/build_rpi4_mesa_vc4_001/build/vulkan-tools-1.2.162/vulkaninfo/vulkaninfo.h:248:vkEnumerateInstanceExtensionProperties failed with ERROR_INITIALIZATION_FAILED
Next steps:
- enable Vulkan/X11/XCB support
- fix mesa3d/swrast stand-alone link failure
Regards,
Peter
[1] https://www.raspberrypi.org/blog/vulkan-update-were-conformant/
Peter Seiderer (6):
package/vulkan-headers: new package package/vulkan-loader: new package package/vulkan-tools: new package package/mesa3d: add vulkan broadcom driver support package/mesa3d: add vulkan swrast driver support package/qt5base: add vulkan option
package/Config.in | 3 ++ package/mesa3d/Config.in | 21 ++++++++++++ package/mesa3d/mesa3d.mk | 6 +++- package/qt5/qt5base/Config.in | 11 +++++++ package/qt5/qt5base/qt5base.mk | 7 ++++ package/vulkan-headers/Config.in | 7 ++++ package/vulkan-headers/vulkan-headers.hash | 3 ++ package/vulkan-headers/vulkan-headers.mk | 13 ++++++++ .../0001-loader-fix-asm_offset-call.patch | 32 +++++++++++++++++++ package/vulkan-loader/Config.in | 14 ++++++++ package/vulkan-loader/vulkan-loader.hash | 3 ++ package/vulkan-loader/vulkan-loader.mk | 22 +++++++++++++ package/vulkan-tools/Config.in | 17 ++++++++++ package/vulkan-tools/vulkan-tools.hash | 3 ++ package/vulkan-tools/vulkan-tools.mk | 25 +++++++++++++++ 15 files changed, 186 insertions(+), 1 deletion(-) create mode 100644 package/vulkan-headers/Config.in create mode 100644 package/vulkan-headers/vulkan-headers.hash create mode 100644 package/vulkan-headers/vulkan-headers.mk create mode 100644 package/vulkan-loader/0001-loader-fix-asm_offset-call.patch create mode 100644 package/vulkan-loader/Config.in create mode 100644 package/vulkan-loader/vulkan-loader.hash create mode 100644 package/vulkan-loader/vulkan-loader.mk create mode 100644 package/vulkan-tools/Config.in create mode 100644 package/vulkan-tools/vulkan-tools.hash create mode 100644 package/vulkan-tools/vulkan-tools.mk
Signature · 1 line
2.29.2
RFC 1/6 package/vulkan-headers: new package
--- package/Config.in | 1 + package/vulkan-headers/Config.in | 7 +++++++ package/vulkan-headers/vulkan-headers.hash | 3 +++ package/vulkan-headers/vulkan-headers.mk | 13 +++++++++++++ 4 files changed, 24 insertions(+) create mode 100644 package/vulkan-headers/Config.in create mode 100644 package/vulkan-headers/vulkan-headers.hash create mode 100644 package/vulkan-headers/vulkan-headers.mk
package/Config.in +1 -0
@@ -334,6 +334,7 @@ comment "Graphic libraries" source "package/sdl2_net/Config.in" source "package/sdl2_ttf/Config.in" source "package/tk/Config.in" + source "package/vulkan-headers/Config.in" comment "Other GUIs" source "package/qt5/Config.in"
package/vulkan-headers/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_VULKAN_HEADERS + bool "vulkan-headers" + help + The Khronos official Vulkan header files and API + registry. + + https://github.com/KhronosGroup/Vulkan-Headers
package/vulkan-headers/vulkan-headers.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 3f9435a93ba13d94d0c3265a47e0436579e46bb9ca085e9b16a753458e4d79d2 vulkan-headers-1.2.165.tar.gz +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE.txt
package/vulkan-headers/vulkan-headers.mk new file +13 -0
@@ -0,0 +1,13 @@ +################################################################################ +# +# vulkan-headers +# +################################################################################ + +VULKAN_HEADERS_VERSION = 1.2.165 +VULKAN_HEADERS_SITE = $(call github,KhronosGroup,Vulkan-Headers,v$(VULKAN_HEADERS_VERSION)) +VULKAN_HEADERS_LICENSE = Apache-2.0 License +VULKAN_HEADERS_LICENSE_FILES = LICENSE.txt +VULKAN_HEADERS_INSTALL_STAGING = YES + +$(eval $(cmake-package))
Signature · 1 line
2.29.2
RFC 1/6 package/vulkan-headers: new package
Peter, All,
On 2020-12-23 23:45 +0100, Peter Seiderer spake thusly:
Quoted 2 lines
Signed-off-by Peter Seiderer <[email protected]>---
[--SNIP--]
package/vulkan-headers/vulkan-headers.mk line 7
Quoted 13 lines
package/vulkan-headers/vulkan-headers.mk new file +7
-0@@ -0,0 +1,13 @@ +################################################################################ +# +# vulkan-headers +# +################################################################################ + +VULKAN_HEADERS_VERSION = 1.2.165
As stated in there READ:E:
Marked version releases have undergone thorough testing but do not imply the same quality level as SDK tags. SDK tags follow the sdk-<version>.<patch> format (e.g., sdk-1.1.92.0).
Shouldn't we use SDK tags, rather than mere versions?
(Comment valid for the three Vulkan-related packages in your series).
Regards,
Yann E. MORIN.
Quoted 13 lines
package/vulkan-headers/vulkan-headers.mk new file +6
-0+VULKAN_HEADERS_SITE = $(call github,KhronosGroup,Vulkan-Headers,v$(VULKAN_HEADERS_VERSION)) +VULKAN_HEADERS_LICENSE = Apache-2.0 License +VULKAN_HEADERS_LICENSE_FILES = LICENSE.txt +VULKAN_HEADERS_INSTALL_STAGING = YES + +$(eval $(cmake-package))Signature · 6 lines
2.29.2 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
RFC 1/6 package/vulkan-headers: new package
Hello Yann,
Quoted 22 lines · Yann E. MORIN
Peter, All,
On 2020-12-23 23:45 +0100, Peter Seiderer spake thusly:
Quoted 2 lines
Signed-off-by Peter Seiderer <[email protected]>---
[--SNIP--]
package/vulkan-headers/vulkan-headers.mk line 7
Quoted 13 lines
package/vulkan-headers/vulkan-headers.mk new file +7
-0@@ -0,0 +1,13 @@ +################################################################################ +# +# vulkan-headers +# +################################################################################ + +VULKAN_HEADERS_VERSION = 1.2.165As stated in there READ:E:
Quoted 5 lines
Marked version releases have undergone thorough testing but do not imply the same quality level as SDK tags. SDK tags follow the sdk-<version>.<patch> format (e.g., sdk-1.1.92.0).
Shouldn't we use SDK tags, rather than mere versions?
One reason why this patch series is sent as RFC ;-), but will update/or downgrade to an SDK tag (if it works) on next patch series iteration...
Regards,
Peter
Quoted 20 lines
(Comment valid for the three Vulkan-related packages in your series).
Regards,
Yann E. MORIN.Quoted 13 lines
package/vulkan-headers/vulkan-headers.mk new file +6
-1+VULKAN_HEADERS_SITE = $(call github,KhronosGroup,Vulkan-Headers,v$(VULKAN_HEADERS_VERSION)) +VULKAN_HEADERS_LICENSE = Apache-2.0 License +VULKAN_HEADERS_LICENSE_FILES = LICENSE.txt +VULKAN_HEADERS_INSTALL_STAGING = YES + +$(eval $(cmake-package)) --2.29.2
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
RFC 2/6 package/vulkan-loader: new package
In reply to Peter Seiderer--- package/Config.in | 1 + .../0001-loader-fix-asm_offset-call.patch | 32 +++++++++++++++++++ package/vulkan-loader/Config.in | 14 ++++++++ package/vulkan-loader/vulkan-loader.hash | 3 ++ package/vulkan-loader/vulkan-loader.mk | 22 +++++++++++++ 5 files changed, 72 insertions(+) create mode 100644 package/vulkan-loader/0001-loader-fix-asm_offset-call.patch create mode 100644 package/vulkan-loader/Config.in create mode 100644 package/vulkan-loader/vulkan-loader.hash create mode 100644 package/vulkan-loader/vulkan-loader.mk
package/Config.in +1 -0
@@ -335,6 +335,7 @@ comment "Graphic libraries" source "package/sdl2_ttf/Config.in" source "package/tk/Config.in" source "package/vulkan-headers/Config.in" + source "package/vulkan-loader/Config.in" comment "Other GUIs" source "package/qt5/Config.in"
package/vulkan-loader/0001-loader-fix-asm_offset-call.patch new file +32 -0
@@ -0,0 +1,32 @@ +From 45098898f7fa25dfd12d2c4f1aed889f678aa870 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Wed, 23 Dec 2020 14:46:02 +0100 +Subject: [PATCH] loader: fix asm_offset call + +Disable assembler usage (not cross compile capable): + + [ 21%] Generating gen_defines.asm + /bin/sh: asm_offset: command not found + make[3]: *** [loader/CMakeFiles/loader_asm_gen_files.dir/build.make:80: loader/gen_defines.asm] Error 127 + +Signed-off-by: Peter Seiderer <[email protected]> +--- + loader/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt +index ba9f460f1..dbebfb058 100644 +--- a/loader/CMakeLists.txt ++++ b/loader/CMakeLists.txt +@@ -187,7 +187,7 @@ else(UNIX AND NOT APPLE) # i.e.: Linux + endif() + set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) + try_compile(ASSEMBLER_WORKS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/asm_test.S) +- if(ASSEMBLER_WORKS) ++ if(FALSE) + set(OPT_LOADER_SRCS ${OPT_LOADER_SRCS} unknown_ext_chain_gas.S) + add_executable(asm_offset asm_offset.c) + target_link_libraries(asm_offset Vulkan::Headers) +-- +2.29.2 +
package/vulkan-loader/Config.in new file +14 -0
@@ -0,0 +1,14 @@ +config BR2_PACKAGE_VULKAN_LOADER + bool "vulkan-loader" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS # dlfcn.h + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_VULKAN_HEADERS + help + The Khronos official Vulkan ICD desktop loader. + + https://github.com/KhronosGroup/Vulkan-Loader + +comment "vulkan-loader needs a toolchain w/ C++, dynamic library, threads" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_HAS_THREADS
package/vulkan-loader/vulkan-loader.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 e582dce35051a34af82db2a8fcd38fbc5837b4506e76e6cda685dca02dee01c7 vulkan-loader-1.2.162.tar.gz +sha256 43c0a37e6a0fa7ff3c843b3ec5a4fac84b712558ddac103fbd4c1649662a9ece LICENSE.txt
package/vulkan-loader/vulkan-loader.mk new file +22 -0
@@ -0,0 +1,22 @@ +################################################################################ +# +# vulkan-loader +# +################################################################################ + +VULKAN_LOADER_VERSION = 1.2.162 +VULKAN_LOADER_SITE = $(call github,KhronosGroup,Vulkan-Loader,v$(VULKAN_LOADER_VERSION)) +VULKAN_LOADER_LICENSE = Apache-2.0 License +VULKAN_LOADER_LICENSE_FILES = LICENSE.txt +VULKAN_LOADER_INSTALL_STAGING = YES + +VULKAN_LOADER_DEPENDENCIES = vulkan-headers + +VULKAN_LOADER_CONF_OPTS += \ + -DBUILD_WSI_XCB_SUPPORT=OFF \ + -DBUILD_WSI_XLIB_SUPPORT=OFF \ + -DBUILD_WSI_WAYLAND_SUPPORT=OFF \ + -DBUILD_WSI_DIRECTFB_SUPPORT=OFF \ + -DUSE_CCACHE=OFF + +$(eval $(cmake-package))
Signature · 1 line
2.29.2
RFC 2/6 package/vulkan-loader: new package
Peter, All,
On 2020-12-23 23:45 +0100, Peter Seiderer spake thusly:
Quoted 1 line
---
[--SNIP--]
package/vulkan-loader/0001-loader-fix-asm_offset-call.patch line 6
Quoted 12 lines
package/vulkan-loader/0001-loader-fix-asm_offset-call.patch new file +6
-0@@ -0,0 +1,32 @@ +From 45098898f7fa25dfd12d2c4f1aed889f678aa870 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Wed, 23 Dec 2020 14:46:02 +0100 +Subject: [PATCH] loader: fix asm_offset call + +Disable assembler usage (not cross compile capable):
In fact, for cross-compilation to another arch, this is already properly detected, and asm_offset is not even built or run, and a fallback code is used.
package/vulkan-loader/0001-loader-fix-asm_offset-call.patch line 10
Quoted 3 lines
package/vulkan-loader/0001-loader-fix-asm_offset-call.patch new file +3
-0+ [ 21%] Generating gen_defines.asm + /bin/sh: asm_offset: command not found + make[3]: *** [loader/CMakeFiles/loader_asm_gen_files.dir/build.make:80: loader/gen_defines.asm] Error 127
In fact, the issue arises when the target arch is similar to that of the build machine (i.e. x86_64), but CMake fails to be able to call an executable it just built, even as asm_offset does not link to much except the C library.
I think the real reason is that CMake detects cross-compilation, so does not add the directory with the generated executable in the PATH, and thus running asm_offset fails, whereas for a pure native build, I would expect CMake to add that directory in the PATH...
And anyway, upstream is very undecided and confused to some degree:
https://github.com/KhronosGroup/Vulkan-Loader/issues/249
If we wanted to push an upstreamable patch, then maybe we could add an option to drive the use of asm_offset, e.g.: -DUSE_ASM_OFFSET=ON/OFF
Regards,
Yann E. MORIN.
Quoted 85 lines
package/vulkan-loader/0001-loader-fix-asm_offset-call.patch new file +21
-0+Signed-off-by: Peter Seiderer <[email protected]> +--- + loader/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt +index ba9f460f1..dbebfb058 100644 +--- a/loader/CMakeLists.txt ++++ b/loader/CMakeLists.txt +@@ -187,7 +187,7 @@ else(UNIX AND NOT APPLE) # i.e.: Linux + endif() + set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) + try_compile(ASSEMBLER_WORKS ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/asm_test.S) +- if(ASSEMBLER_WORKS) ++ if(FALSE) + set(OPT_LOADER_SRCS ${OPT_LOADER_SRCS} unknown_ext_chain_gas.S) + add_executable(asm_offset asm_offset.c) + target_link_libraries(asm_offset Vulkan::Headers) +-- +2.29.2 +package/vulkan-loader/Config.in new file +14
-0@@ -0,0 +1,14 @@ +config BR2_PACKAGE_VULKAN_LOADER + bool "vulkan-loader" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS # dlfcn.h + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_VULKAN_HEADERS + help + The Khronos official Vulkan ICD desktop loader. + + https://github.com/KhronosGroup/Vulkan-Loader + +comment "vulkan-loader needs a toolchain w/ C++, dynamic library, threads" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_HAS_THREADSpackage/vulkan-loader/vulkan-loader.hash new file +3
-0@@ -0,0 +1,3 @@ +# Locally calculated +sha256 e582dce35051a34af82db2a8fcd38fbc5837b4506e76e6cda685dca02dee01c7 vulkan-loader-1.2.162.tar.gz +sha256 43c0a37e6a0fa7ff3c843b3ec5a4fac84b712558ddac103fbd4c1649662a9ece LICENSE.txtpackage/vulkan-loader/vulkan-loader.mk new file +22
-0@@ -0,0 +1,22 @@ +################################################################################ +# +# vulkan-loader +# +################################################################################ + +VULKAN_LOADER_VERSION = 1.2.162 +VULKAN_LOADER_SITE = $(call github,KhronosGroup,Vulkan-Loader,v$(VULKAN_LOADER_VERSION)) +VULKAN_LOADER_LICENSE = Apache-2.0 License +VULKAN_LOADER_LICENSE_FILES = LICENSE.txt +VULKAN_LOADER_INSTALL_STAGING = YES + +VULKAN_LOADER_DEPENDENCIES = vulkan-headers + +VULKAN_LOADER_CONF_OPTS += \ + -DBUILD_WSI_XCB_SUPPORT=OFF \ + -DBUILD_WSI_XLIB_SUPPORT=OFF \ + -DBUILD_WSI_WAYLAND_SUPPORT=OFF \ + -DBUILD_WSI_DIRECTFB_SUPPORT=OFF \ + -DUSE_CCACHE=OFF + +$(eval $(cmake-package))Signature · 6 lines
2.29.2 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
RFC 3/6 package/vulkan-tools: new package
In reply to Peter Seiderer---
Notes:
- BUILD_ICD/INSTALL_ICD should be disabled (or get an own option for testig purpouse as it is only a mock ICD)
--- package/Config.in | 1 + package/vulkan-tools/Config.in | 17 +++++++++++++++++ package/vulkan-tools/vulkan-tools.hash | 3 +++ package/vulkan-tools/vulkan-tools.mk | 25 +++++++++++++++++++++++++ 4 files changed, 46 insertions(+) create mode 100644 package/vulkan-tools/Config.in create mode 100644 package/vulkan-tools/vulkan-tools.hash create mode 100644 package/vulkan-tools/vulkan-tools.mk
package/Config.in +1 -0
@@ -336,6 +336,7 @@ comment "Graphic libraries" source "package/tk/Config.in" source "package/vulkan-headers/Config.in" source "package/vulkan-loader/Config.in" + source "package/vulkan-tools/Config.in" comment "Other GUIs" source "package/qt5/Config.in"
package/vulkan-tools/Config.in new file +17 -0
@@ -0,0 +1,17 @@ +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_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 + + 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" + 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 new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 98a3a00471da65df833b4ffeb1ab29ec1d169d5feab54270cf4cd8f50f82e682 vulkan-tools-1.2.162.tar.gz +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE.txt
package/vulkan-tools/vulkan-tools.mk new file +25 -0
@@ -0,0 +1,25 @@ +################################################################################ +# +# vulkan-tools +# +################################################################################ + +VULKAN_TOOLS_VERSION = 1.2.162 +VULKAN_TOOLS_SITE = $(call github,KhronosGroup,Vulkan-Tools,v$(VULKAN_TOOLS_VERSION)) +VULKAN_TOOLS_LICENSE = Apache-2.0 License +VULKAN_TOOLS_LICENSE_FILES = LICENSE.txt + +VULKAN_TOOLS_DEPENDENCIES = vulkan-headers vulkan-loader + +VULKAN_TOOLS_CONF_OPTS += \ + -DBUILD_CUBE=OFF \ + -DBUILD_VULKANINFO=ON \ + -DBUILD_ICD=ON \ + -DINSTALL_ICD=ON \ + -DBUILD_WSI_XCB_SUPPORT=OFF \ + -DBUILD_WSI_XLIB_SUPPORT=OFF \ + -DBUILD_WSI_WAYLAND_SUPPORT=OFF \ + -DBUILD_WSI_DIRECTFB_SUPPORT=OFF \ + -DUSE_CCACHE=OFF + +$(eval $(cmake-package))
Signature · 1 line
2.29.2
RFC 3/6 package/vulkan-tools: new package
Peter, All,
On 2020-12-23 23:45 +0100, Peter Seiderer spake thusly:
Quoted 1 line
Signed-off-by Peter Seiderer <[email protected]>
[--SNIP--]
Quoted 6 lines
package/vulkan-tools/vulkan-tools.mk new file +0
-0
package/vulkan-tools/vulkan-tools.mk line 9
Quoted 9 lines
package/vulkan-tools/vulkan-tools.mk new file +9
-0@@ -0,0 +1,25 @@ +################################################################################ +# +# vulkan-tools +# +################################################################################ + +VULKAN_TOOLS_VERSION = 1.2.162 +VULKAN_TOOLS_SITE = $(call github,KhronosGroup,Vulkan-Tools,v$(VULKAN_TOOLS_VERSION)) +VULKAN_TOOLS_LICENSE = Apache-2.0 License
Something I forgot to comment on on the other Vulkan packages: the SPDX short identifier is: Apache-2.0
package/vulkan-tools/vulkan-tools.mk line 22
Quoted 13 lines
package/vulkan-tools/vulkan-tools.mk new file +13
-0+VULKAN_TOOLS_LICENSE_FILES = LICENSE.txt + +VULKAN_TOOLS_DEPENDENCIES = vulkan-headers vulkan-loader + +VULKAN_TOOLS_CONF_OPTS += \ + -DBUILD_CUBE=OFF \ + -DBUILD_VULKANINFO=ON \ + -DBUILD_ICD=ON \ + -DINSTALL_ICD=ON \ + -DBUILD_WSI_XCB_SUPPORT=OFF \ + -DBUILD_WSI_XLIB_SUPPORT=OFF \ + -DBUILD_WSI_WAYLAND_SUPPORT=OFF \ + -DBUILD_WSI_DIRECTFB_SUPPORT=OFF \
I guess those will be conditional on the udnerlying libraries, e.g. when libxcb is enabled, we enable WSI_XCB, and so on, right?
Regards,
Yann E. MORIN.
Quoted 10 lines
package/vulkan-tools/vulkan-tools.mk new file +3
-0+ -DUSE_CCACHE=OFF + +$(eval $(cmake-package))Signature · 6 lines
2.29.2 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
RFC 3/6 package/vulkan-tools: new package
Hello Yann,
Quoted 15 lines · Yann E. MORIN
Peter, All,
On 2020-12-23 23:45 +0100, Peter Seiderer spake thusly:
Quoted 1 line
Signed-off-by Peter Seiderer <[email protected]>[--SNIP--]
Quoted 10 lines
package/vulkan-tools/vulkan-tools.mk new file +4
-0@@ -0,0 +1,25 @@ +################################################################################ +# +# vulkan-tools +#
Quoted 8 lines
package/vulkan-tools/vulkan-tools.mk line 9
Quoted 5 lines
package/vulkan-tools/vulkan-tools.mk new file +5
-0+################################################################################ + +VULKAN_TOOLS_VERSION = 1.2.162 +VULKAN_TOOLS_SITE = $(call github,KhronosGroup,Vulkan-Tools,v$(VULKAN_TOOLS_VERSION)) +VULKAN_TOOLS_LICENSE = Apache-2.0 LicenseSomething I forgot to comment on on the other Vulkan packages: the SPDX short identifier is: Apache-2.0
O.k, will fix it on next patch iteration...
Quoted 17 lines
Quoted 4 lines
package/vulkan-tools/vulkan-tools.mk new file +3
-0+VULKAN_TOOLS_LICENSE_FILES = LICENSE.txt + +VULKAN_TOOLS_DEPENDENCIES = vulkan-headers vulkan-loaderpackage/vulkan-tools/vulkan-tools.mk line 22
Quoted 10 lines
package/vulkan-tools/vulkan-tools.mk new file +10
-0+ +VULKAN_TOOLS_CONF_OPTS += \ + -DBUILD_CUBE=OFF \ + -DBUILD_VULKANINFO=ON \ + -DBUILD_ICD=ON \ + -DINSTALL_ICD=ON \ + -DBUILD_WSI_XCB_SUPPORT=OFF \ + -DBUILD_WSI_XLIB_SUPPORT=OFF \ + -DBUILD_WSI_WAYLAND_SUPPORT=OFF \ + -DBUILD_WSI_DIRECTFB_SUPPORT=OFF \I guess those will be conditional on the udnerlying libraries, e.g. when libxcb is enabled, we enable
WSI_XCB, and so on, right?
Yes, stuff for follow-up patches...
Regards,
Peter
Quoted 15 lines
Regards,
Yann E. MORIN.Quoted 10 lines
package/vulkan-tools/vulkan-tools.mk new file +3
-1+ -DUSE_CCACHE=OFF + +$(eval $(cmake-package)) --2.29.2
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
RFC 4/6 package/mesa3d: add vulkan broadcom driver support
In reply to Peter Seiderer---
Notes:
- compiles, but is not only functional in case
v3d simulator or X11/XCB is enabled (see
e.g. physical_device_init() in file
src/broadcom/vulkan/v3dv_device.c)
--- package/mesa3d/Config.in | 8 ++++++++ package/mesa3d/mesa3d.mk | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-)
package/mesa3d/Config.in +8 -0
@@ -388,6 +388,14 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON comment "Vulkan drivers" +config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_BROADCOM + bool "Vulkan broadcom driver" + depends on BR2_arm || BR2_aarch64 + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_MESA3D_VULKAN_DRIVER + help + Vulkan broadcom driver. + config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL bool "Vulkan Intel driver" depends on BR2_i386 || BR2_x86_64
package/mesa3d/mesa3d.mk +4 -1
@@ -110,6 +110,7 @@ MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I965) += i965 MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU) += nouveau MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += r100 # Vulkan Drivers +MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_BROADCOM) += broadcom MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL) += intel ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),)
@@ -143,9 +144,11 @@ ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),) MESA3D_CONF_OPTS += \ -Dvulkan-drivers= else +ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL),y) MESA3D_DEPENDENCIES += xlib_libxshmfence +MESA3D_CONF_OPTS += -Ddri3=enabled +endif MESA3D_CONF_OPTS += \ - -Ddri3=enabled \ -Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y)) endif
Signature · 1 line
2.29.2
RFC 4/6 package/mesa3d: add vulkan broadcom driver support
Peter, All,
On 2020-12-23 23:45 +0100, Peter Seiderer spake thusly:
Quoted 6 lines
Signed-off-by Peter Seiderer <[email protected]>package/mesa3d/Config.in +0
-0
package/mesa3d/Config.in config BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON · line 397
Quoted 10 lines
package/mesa3d/Config.in +7
-0@@ -388,6 +388,14 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON comment "Vulkan drivers" +config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_BROADCOM + bool "Vulkan broadcom driver" + depends on BR2_arm || BR2_aarch64 + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_MESA3D_VULKAN_DRIVER + help + Vulkan broadcom driver.
I guess this is where we would introduce the select BR2_PACKAGE_PROVIDES_LIBVULKAN of that other series I pointed earlier:
https://patchwork.ozlabs.org/project/buildroot/list/?series=157522
Regards,
Yann E. MORIN.
Quoted 16 lines
package/mesa3d/Config.in +0
-0config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL bool "Vulkan Intel driver" depends on BR2_i386 || BR2_x86_64package/mesa3d/mesa3d.mk +1
-0@@ -110,6 +110,7 @@ MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I965) += i965 MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU) += nouveau MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += r100 # Vulkan Drivers +MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_BROADCOM) += broadcom MESA3D_VULKAN_DRIVERS-$(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL) += intel ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),)
package/mesa3d/mesa3d.mk ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),) · line 148
Quoted 9 lines
package/mesa3d/mesa3d.mk +3
-1@@ -143,9 +144,11 @@ ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),) MESA3D_CONF_OPTS += \ -Dvulkan-drivers= else +ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL),y) MESA3D_DEPENDENCIES += xlib_libxshmfence +MESA3D_CONF_OPTS += -Ddri3=enabled +endif MESA3D_CONF_OPTS += \ - -Ddri3=enabled \
Meh... dri3 is already driven by BR2_PACKAGE_MESA3D_DRI_DRIVER, and this is going to be quite another mess if we drive it in a second place (not the fault of your patch, it's already the case before, but tstill, a bit of cleanup is probably in order...)
Regards,
Yann E. MORIN.
Quoted 10 lines
package/mesa3d/mesa3d.mk +0
-0-Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y)) endifSignature · 6 lines
2.29.2 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
RFC 5/6 package/mesa3d: add vulkan swrast driver support
In reply to Peter Seiderer---
Notes:
- link failure when selected stand alone, fine in case vulkan-broadcom is selected too
--- package/mesa3d/Config.in | 13 +++++++++++++ package/mesa3d/mesa3d.mk | 1 + 2 files changed, 14 insertions(+)
package/mesa3d/Config.in +13 -0
@@ -416,6 +416,19 @@ comment "intel vulkan depends on X.org and needs a glibc toolchain w/ headers >= depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 || \ !BR2_TOOLCHAIN_USES_GLIBC || !BR2_PACKAGE_XORG7 +config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_SWRAST + bool "Vulkan swrast driver" + depends on !BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST + select BR2_PACKAGE_MESA3D_VULKAN_DRIVER + help + Vulkan swrast driver. + +comment "Vulkan swrast: Only one swrast provider can be built" + depends on BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST + comment "Off-screen Rendering" config BR2_PACKAGE_MESA3D_OSMESA_CLASSIC
package/mesa3d/mesa3d.mk +1 -0
@@ -112,6 +112,7 @@ MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += r100 # Vulkan Drivers 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 ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),) MESA3D_CONF_OPTS += \
Signature · 1 line
2.29.2
RFC 5/6 package/mesa3d: add vulkan swrast driver support
Peter, All,
On 2020-12-23 23:45 +0100, Peter Seiderer spake thusly:
Quoted 5 lines
Signed-off-by Peter Seiderer <[email protected]>---
Notes:
- link failure when selected stand alone, fine in case vulkan-broadcom is selected too
Is it just vulkan-broadcom that fixes it, or would enabling the intel vulkan fix it too?
Regards,
Yann E. MORIN.
Quoted 48 lines
--- package/mesa3d/Config.in | 13 +++++++++++++ package/mesa3d/mesa3d.mk | 1 + 2 files changed, 14 insertions(+)package/mesa3d/Config.in +13
-0@@ -416,6 +416,19 @@ comment "intel vulkan depends on X.org and needs a glibc toolchain w/ headers >= depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 || \ !BR2_TOOLCHAIN_USES_GLIBC || !BR2_PACKAGE_XORG7 +config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_SWRAST + bool "Vulkan swrast driver" + depends on !BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST + select BR2_PACKAGE_MESA3D_VULKAN_DRIVER + help + Vulkan swrast driver. + +comment "Vulkan swrast: Only one swrast provider can be built" + depends on BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST + comment "Off-screen Rendering" config BR2_PACKAGE_MESA3D_OSMESA_CLASSICpackage/mesa3d/mesa3d.mk +1
-0@@ -112,6 +112,7 @@ MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += r100 # Vulkan Drivers 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 ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),) MESA3D_CONF_OPTS += \Signature · 6 lines
2.29.2 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
RFC 6/6 package/qt5base: add vulkan option
In reply to Peter Seiderer---
Notes:
- eglfs/vulkan is only implemented for eglfs_viv
(see stub implementation for QEglFSDeviceIntegration::createPlatformVulkanInstance() in src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp and real implementation for QEglFSVivIntegration::createPlatformVulkanInstance() in src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/qeglfsvivintegration.cpp)
- or for xcb (see QXcbIntegration::createPlatformVulkanInstance()
in src/plugins/platforms/xcb/qxcbintegration.cpp)
--- package/qt5/qt5base/Config.in | 11 +++++++++++ package/qt5/qt5base/qt5base.mk | 7 +++++++ 2 files changed, 18 insertions(+)
package/qt5/qt5base/Config.in +11 -0
@@ -175,6 +175,17 @@ config BR2_PACKAGE_QT5BASE_OPENGL_LIB endif +config BR2_PACKAGE_QT5BASE_VULKAN + bool "Vulkan support" + # all vulkan-loader introduced dependencies superseeded by qt5 own ones + # depends on BR2_INSTALL_LIBSTDCPP # vulkan-loader + # depends on !BR2_STATIC_LIBS # vulkan-loader + # depends on BR2_TOOLCHAIN_HAS_THREADS # vulkan-loader + select BR2_PACKAGE_VULKAN_HEADERS + select BR2_PACKAGE_VULKAN_LOADER + help + This option enables Vulkan support. + config BR2_PACKAGE_QT5BASE_LINUXFB bool "linuxfb support"
package/qt5/qt5base/qt5base.mk +7 -0
@@ -196,6 +196,13 @@ else QT5BASE_CONFIGURE_OPTS += -no-opengl endif +ifeq ($(BR2_PACKAGE_QT5BASE_VULKAN),y) +QT5BASE_CONFIGURE_OPTS += -feature-vulkan +QT5BASE_DEPENDENCIES += vulkan-headers vulkan-loader +else +QT5BASE_CONFIGURE_OPTS += -no-feature-vulkan +endif + QT5BASE_DEFAULT_QPA = $(call qstrip,$(BR2_PACKAGE_QT5BASE_DEFAULT_QPA)) QT5BASE_CONFIGURE_OPTS += $(if $(QT5BASE_DEFAULT_QPA),-qpa $(QT5BASE_DEFAULT_QPA))
Signature · 1 line
2.29.2
cover Vulkan support
In reply to Peter SeidererPeter, All,
On 2020-12-23 23:45 +0100, Peter Seiderer spake thusly:
Quoted 11 lines
A starting point to add some/more Vulkan support to Buildroot.
Targeting towards the RPi Vulkan support (as announced e.g. [1]), but send as RFC as not (yet) functional:
- did only try to run standalone and/or with Qt EGLFS, but did not work out as the broadcom vulkan driver is only functional with X11/XCB
- the Qt Vulkan support seems only be functional with EGLFS/Vivante and/or X11/XCB
Speaking of which: have you seen this series:
https://patchwork.ozlabs.org/project/buildroot/list/?series=157522
package/opengl/libopenvx: new virtual package package/opengl/libvulkan: new virtual package package/freescale-imx/imx-gpu-viv: add options for new feture
The last one introduces imx-gpu-viv as a provider for libvulkan, so at least it does not seem to contradict your assumptions that Vulkan is possible with Vivante. ;-)
Regards,
Yann E. MORIN.
Quoted 173 lines
Tested with the following defconfig (and dtoverlay=vc4-kms-v3d-pi4):
BR2_aarch64=y BR2_cortex_a72=y BR2_ARM_FPU_VFPV4=y BR2_ENABLE_DEBUG=y BR2_OPTIMIZE_3=y BR2_TOOLCHAIN_BUILDROOT_GLIBC=y BR2_PACKAGE_GLIBC_UTILS=y BR2_BINUTILS_VERSION_2_35_X=y BR2_GCC_VERSION_10_X=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_INIT_SYSV=y BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y BR2_SYSTEM_DHCP="eth0" BR2_GENERATE_LOCALE="en_US" BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi4-64/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi4-64/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="--add-miniuart-bt-overlay --aarch64" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,raspberrypi,linux,967d45b29ca2902f031b867809d72e3b3d623e7a)/linux-967d45b29ca2902f031b867809d72e3b3d623e7a.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2711" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2711-rpi-4-b" BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y BR2_PACKAGE_DEJAVU=y BR2_PACKAGE_MESA3D=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D=y BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4=y BR2_PACKAGE_MESA3D_VULKAN_DRIVER_BROADCOM=y BR2_PACKAGE_MESA3D_VULKAN_DRIVER_SWRAST=y BR2_PACKAGE_MESA3D_OPENGL_ES=y BR2_PACKAGE_VULKAN_TOOLS=y BR2_PACKAGE_QT5=y BR2_PACKAGE_QT5BASE_EXAMPLES=y BR2_PACKAGE_QT5BASE_GUI=y BR2_PACKAGE_QT5BASE_OPENGL_LIB=y BR2_PACKAGE_QT5BASE_VULKAN=y BR2_PACKAGE_QT5BASE_EGLFS=y BR2_PACKAGE_QT5BASE_FONTCONFIG=y BR2_PACKAGE_QT5BASE_HARFBUZZ=y BR2_PACKAGE_QT5BASE_GIF=y BR2_PACKAGE_QT5BASE_JPEG=y BR2_PACKAGE_QT5BASE_PNG=y BR2_PACKAGE_RPI_FIRMWARE=y BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_EXT2_SIZE="384M" # BR2_TARGET_ROOTFS_TAR is not set BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_MTOOLS=yThere are three vulkan ICDs installed
-/usr/lib/libvulkan_lvp.so: mesa3d/swrast
-/usr/lib/libvulkan_broadcom.so: mesa3d/broadcom
-/usr/lib/libVkICD_mock_icd.so: vulkan-tools/moc-ICDRuntime test done:
- vulkan-tools/moc-ICD (works):
$ VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/VkICD_mock_icd.json vulkaninfo ========== VULKANINFO ==========Vulkan Instance Version: 1.2.165
Instance Extensions: count = 19
===============================VK_EXT_debug_report : extension revision 9 VK_EXT_debug_utils : extension revision 2 VK_EXT_direct_mode_display : extension revision 1 VK_EXT_display_surface_counter : extension revision 1 VK_EXT_headless_surface : extension revision 1 VK_EXT_swapchain_colorspace : extension revision 4 VK_EXT_validation_features : extension revision 4 VK_EXT_validation_flags : extension revision 2 VK_KHR_device_group_creation : extension revision 1 VK_KHR_display : extension revision 23 VK_KHR_external_fence_capabilities : extension revision 1 VK_KHR_external_memory_capabilities : extension revision 1
VK_KHR_external_semaphore_capabilities: extension revision 1
VK_KHR_get_display_properties2: extension revision 1
VK_KHR_get_physical_device_properties2: extension revision 2
VK_KHR_get_surface_capabilities2: extension revision 1
VK_KHR_surface: extension revision 25
VK_KHR_surface_protected_capabilities: extension revision 1
VK_NV_external_memory_capabilities: extension revision 1Layers: count = 0
=================
Groups:
=======
No Device Groups FoundDevice Properties and Extensions:
=================================
GPU0:
VkPhysicalDeviceProperties:
---------------------------apiVersion = 4198400 (1.1.0) driverVersion = 1 (0x0001) vendorID = 0xba5eba11 deviceID = 0xf005ba11 deviceType = PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU deviceName = Vulkan Mock Device[...]
- mesa3d/swrast:
$ VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.cortex-a72.json vulkaninfo WARNING: lavapipe is not a conformant vulkan implementation, testing use only. Segmentation fault- mesa3d/broadcom:
$ VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/broadcom_icd.cortex-a72.json vulkaninfo ERROR at /home/seiderer/Work/Buildroot/build_rpi4_mesa_vc4_001/build/vulkan-tools-1.2.162/vulkaninfo/vulkaninfo.h:248:vkEnumerateInstanceExtensionProperties failed with ERROR_INITIALIZATION_FAILEDNext steps:
- enable Vulkan/X11/XCB support
- fix mesa3d/swrast stand-alone link failureRegards,
Peter[1] https://www.raspberrypi.org/blog/vulkan-update-were-conformant/
Peter Seiderer (6):
package/vulkan-headers: new package package/vulkan-loader: new package package/vulkan-tools: new package package/mesa3d: add vulkan broadcom driver support package/mesa3d: add vulkan swrast driver support package/qt5base: add vulkan optionpackage/Config.in | 3 ++ package/mesa3d/Config.in | 21 ++++++++++++ package/mesa3d/mesa3d.mk | 6 +++- package/qt5/qt5base/Config.in | 11 +++++++ package/qt5/qt5base/qt5base.mk | 7 ++++ package/vulkan-headers/Config.in | 7 ++++ package/vulkan-headers/vulkan-headers.hash | 3 ++ package/vulkan-headers/vulkan-headers.mk | 13 ++++++++ .../0001-loader-fix-asm_offset-call.patch | 32 +++++++++++++++++++ package/vulkan-loader/Config.in | 14 ++++++++ package/vulkan-loader/vulkan-loader.hash | 3 ++ package/vulkan-loader/vulkan-loader.mk | 22 +++++++++++++ package/vulkan-tools/Config.in | 17 ++++++++++ package/vulkan-tools/vulkan-tools.hash | 3 ++ package/vulkan-tools/vulkan-tools.mk | 25 +++++++++++++++ 15 files changed, 186 insertions(+), 1 deletion(-) create mode 100644 package/vulkan-headers/Config.in create mode 100644 package/vulkan-headers/vulkan-headers.hash create mode 100644 package/vulkan-headers/vulkan-headers.mk create mode 100644 package/vulkan-loader/0001-loader-fix-asm_offset-call.patch create mode 100644 package/vulkan-loader/Config.in create mode 100644 package/vulkan-loader/vulkan-loader.hash create mode 100644 package/vulkan-loader/vulkan-loader.mk create mode 100644 package/vulkan-tools/Config.in create mode 100644 package/vulkan-tools/vulkan-tools.hash create mode 100644 package/vulkan-tools/vulkan-tools.mkSignature · 6 lines
2.29.2 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'