Created attachment 473558 [details] Example of a vulkan loader ebuild that supports building layers and demos From the current ebuild, we can see that it sets: multilib_src_configure() { local mycmakeargs=( -DCMAKE_SKIP_RPATH=True -DBUILD_TESTS=False -DBUILD_LAYERS=False -DBUILD_DEMOS=False -DBUILD_VKJSON=False -DBUILD_LOADER=True -DBUILD_WSI_MIR_SUPPORT=False -DBUILD_WSI_WAYLAND_SUPPORT=$(usex wayland) -DBUILD_WSI_XCB_SUPPORT=$(usex X) -DBUILD_WSI_XLIB_SUPPORT=$(usex X) ) cmake-utils_src_configure } It would be great if you could also build DEMOS and LAYERS (perhaps controllable via USE flags). These are extremely important for vulkan development, since the layers allow you to debug vulkan code and the ‘demos’ include tools such as `vulkaninfo`. It's worth pointing out that some of the ebuilds I found online support this. In particular, the one I'm using right now (attached) builds both.
Instead of my attachment, a better reference would be the `gentoo-gpu` overlay, which has versions of `media-libs/vulkan-loader` packaged that support building vulkaninfo + layers. It also has SPIRV-Tools and glslang packaged separately.
Hi I want to have vulkaninfo to check the capabilities of a vulkan driver. I think vulkaninfo is part of DEMOS Can you create something like vulkaninfo package that force a USE flag "DEMOS" in vulkan-loader? Thanks for your awesome work!
I also think that this bug is a very good request. I'm lacking the layers and utilities as a Vulkan developer.
I have had a PR open for this for a very long time. Hopefully a developer can take a look and give me feedback. https://github.com/gentoo/gentoo/pull/6300 Thanks Sarnex
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8bf0ace101e40ed165cb86bd0d1998da966a62bf commit 8bf0ace101e40ed165cb86bd0d1998da966a62bf Author: Nick Sarnie <commendsarnex@gmail.com> AuthorDate: 2017-11-25 21:36:10 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2018-03-12 17:41:02 +0000 media-libs/vulkan-loader: Add demos USE flag USE=demos builds vulkaninfo and vulkan demos. Bug: https://bugs.gentoo.org/619124 Closes: https://github.com/gentoo/gentoo/pull/6300 Signed-off-by: Nick Sarnie <commendsarnex@gmail.com> .../vulkan-loader-9999-no-external-sources.patch | 33 ++++++++++++++++++++++ media-libs/vulkan-loader/metadata.xml | 3 ++ media-libs/vulkan-loader/vulkan-loader-9999.ebuild | 7 +++-- 3 files changed, 41 insertions(+), 2 deletions(-)}
Hi all, The demos USE has been added, which includes vulkaninfo. I have submitted another PR today to package SPIRV-Headers and SPIRV-Tools which are required for the layers USE. Once those are in tree, I will submit another PR for the layers USE. Thanks, Sarnex
Just tried to emerge vulkan-loader-9999 and got the following error CMake Error at demos/CMakeLists.txt:29 (message): Selected XCB for demos build but not building Xcb support -- Configuring incomplete, errors occurred! Any chance the demo USE flag could be added to one of the releases? I'm actually only interested in vulkaninfo, so a separate USE flag for that (or just enabling it by default) would also work :)
(In reply to Simon from comment #7) > Just tried to emerge vulkan-loader-9999 and got the following error > > CMake Error at demos/CMakeLists.txt:29 (message): > Selected XCB for demos build but not building Xcb support > > > -- Configuring incomplete, errors occurred! > > > Any chance the demo USE flag could be added to one of the releases? > I'm actually only interested in vulkaninfo, so a separate USE flag for that > (or just enabling it by default) would also work :) Hi Simon, You need to enable the X USE flag. I will send a patch to make it required to have X if you enable demos. I have an open PR to add layers, which also adds version 1.1.70 with the demos USE. I'm waiting for someone to take a look. Thanks, Sarnex
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b7094dde1494d5a38fdc6b8bdb207e8a2d8a0d3 commit 7b7094dde1494d5a38fdc6b8bdb207e8a2d8a0d3 Author: Nick Sarnie <commendsarnex@gmail.com> AuthorDate: 2018-03-24 01:57:37 +0000 Commit: Matt Turner <mattst88@gentoo.org> CommitDate: 2018-04-14 19:50:21 +0000 media-libs/vulkan-loader: Add layers USE Closes: https://bugs.gentoo.org/619124 ...e-a-file-to-get-the-spirv-tools-commit-ID.patch | 42 ++++++++++++++++++++++ media-libs/vulkan-loader/metadata.xml | 1 + media-libs/vulkan-loader/vulkan-loader-9999.ebuild | 12 +++++-- 3 files changed, 52 insertions(+), 3 deletions(-)
media-libs/vulkan-loader-1.1.70.0 installs layers into wrong directory. When building vulkan-loaders with layers useflag enabled the config files for the layers gets installed under /usr/etc/vulkan/explicit_layer.d. This is a wrong directory. The problem is that by default src_install installs all under /usr. y default CMAKE_INSTALL_SYSCONFDIR is set to "etc". But /usr/src/vulkan doesn't work it must be /usr/share/vulkan A quick fix is to change CMAKE_INSTALL_SYSCONFDIR to /usr
Created attachment 528118 [details, diff] fix for wrong install folder for vulkan loader conf files
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89e57fb8b4db589e811846dd108f1076842b66bd commit 89e57fb8b4db589e811846dd108f1076842b66bd Author: Nick Sarnie <sarnex@gentoo.org> AuthorDate: 2018-04-22 22:58:35 +0000 Commit: Nick Sarnie <sarnex@gentoo.org> CommitDate: 2018-04-22 23:03:30 +0000 media-libs/vulkan-loader: Fix the installation directory of the layers Upstream installs them into ${prefix}/etc, but these are not configuration files. They should be in the data root directory. This change is based on an idea from stephan wezel <s.wezel@web.de> Bug: https://bugs.gentoo.org/619124 Package-Manager: Portage-2.3.31, Repoman-2.3.9 ...ulkan-loader-Fix-layers-install-directory.patch | 26 +++++++++ .../vulkan-loader/vulkan-loader-1.1.70.0-r1.ebuild | 65 ++++++++++++++++++++++ media-libs/vulkan-loader/vulkan-loader-9999.ebuild | 5 +- 3 files changed, 95 insertions(+), 1 deletion(-)}
(In reply to stephan wezel from comment #11) > Created attachment 528118 [details, diff] [details, diff] > fix for wrong install folder for vulkan loader conf files Hi Stephan, Thank you for the report. I decided to fix this in a patch because the upstream directory is incorrect. Please try out 1.1.70.0-r1. Thanks, Sarnex