Newer versions of the XML and headers don't play nice. In particular the
VK_LAYER_EXPORT macro was removed and the XML was reworked quite
significantly, so our generator no longer works.
I was able to port newer version of the generator scripts from Mesa
(where these were copied from originally), although these new scripts
don't work with the old XML.
Just drop the meson knobs and always use the subproject version. In
practical terms this is identical to what Mesa also does... So Debian
DFSG should not be _too_ upset.
Closes: https://github.com/flightlessmango/MangoHud/issues/927
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Currently we list the custom_target (aka vcs_tag() as part of the
sources. Although since it's not an explicit dependency meson/ninja are
free to compile the C/C++ files, before the file is generated.
Closes: https://github.com/flightlessmango/MangoHud/issues/862
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Currently the test is pulling an external reference to HUDElements,
which is unresolved so the test fails to link.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
This construct allows meson to check the argument in parallel, but more
importantly it also knows about the "-Wno-" workaround and applies it as
needed.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
GCC 7.5:
../../subprojects/imgui-1.81/imgui.h:1642:80: warning: assuming signed overflow does not occur when assuming that (X - c) <= X is always true [-Wstrict-overflow]
inline T& operator[](int i) { IM_ASSERT(i >= 0 && i < Size); return Data[i]; }
Otherwise we get a ton of warnings about unused function parameters.
The existing -Qunused-arguments seems to be clang specific.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
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