This option enables using system Vulkan headers when it doesn't share
the same datadir as MangoHud. This is specifically an issue in NixOS
where packages are built into their own isolated directories in
/nix/store.
For example:
/nix/store/9g28nz6zh484144mzw670bx82y1ka49a-vulkan-headers-1.2.162.0/share/vulkan/registry/vk.xml
This is currently worked around in the Nix package, by symlinking the
vulkan-headers into MangoHud's install directory:
5debc57760/pkgs/tools/graphics/mangohud/default.nix (L66-L70)
Although, this hack causes the vulkan-headers to be included as a
runtime dependency when they're only needed at build time.
I tried to figure out a way to resolve the datadir automatically, but
found that just adding a new option is probably the best solution for
the following reasons:
- The vulkan.pc file used to resolve dep_vulkan doesn't contain any
information about the datadir.
- The share directory could be resolved relative to the vulkan include
directory and that would solve the specific issue for Nix, but the
datadir could be installed anywhere and that wouldn't be a general
solution.
- I couldn't find a way to resolve the data dir using the XDG Base
Directory Specification because meson doesn't provide a way to access
the necessary environment variables.
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Some distros (Gentoo) support multiple versions of python3 and mako may
not be built for all of the implementations. Testing for the module
early will make sure meson bails out if the module cannot be
found.
This commit replaces the git submodule for the Vulkan headers with meson subproject using wrap.
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com>
vk_dispatch_table_helper.h and vk_layer_dispatch_table.h headers
are not used anymore by mesa layer, remove their generation.
Remove git modules required only for the generation of above headers.