Is there a way to install implicit Vulkan layers "globally"?

Guilherme oguilherme at protonmail.com
Mon Feb 3 15:00:57 UTC 2020


Hey, everyone.

I'm learning about Flatpak and I have a couple of questions regarding installing implicit Vulkan layers in Flatpak, on a "global scale", if that makes sense. First, a quick explanation of what Vulkan layers are:

> Layers are optional components that augment the Vulkan system. They can intercept, evaluate, and modify existing Vulkan functions on their way from the application down to the hardware.
> Layers are packaged as shared libraries that get dynamically loaded in by the loader and inserted between it and the application.
> Source: https://github.com/KhronosGroup/Vulkan-Guide/blob/master/chapters/layers.md

In my use case, let's say I want to install and enable these two Vulkan layers on Steam and Lutris:

> MangoHud: A modification of the Mesa Vulkan overlay. Including GUI improvements, temperature reporting, and logging capabilities.
> Source: https://github.com/flightlessmango/MangoHud

> vkBasalt: vkBasalt is a Vulkan post processing layer to enhance the visual graphics of games.
> Source: https://github.com/DadSchoorse/vkBasalt

In my limited understanding of Flatpak, there are two ways of making it work:

Create an extension namespace for the Flatpak app you want to use these layers on, which would allow for other third-party Vulkan layers to be enabled too. This option is not that bad, but not ideal either, because in this example we would have duplicated layers: one for Steam and another one for Lutris.

The second method, would be by simply building and installing these layers directly for each Flatpak app (via their manifest), which is the worse option, in my opinion.

If my assumptions are correct, I really don't think any of those approaches are good enough. In my humble opinion, Vulkan layers should be installed/enabled in the video driver namespace, as an extension. Doing that, would allow us to enable these Vulkan layers in multiple Flatpak apps (again, Steam and Lutris come to mind) would be MUCH easier and less fragmented.

Correct me if I'm wrong, but currently that's not possible? So... I want to know if that could be done, at all, or if it violates some Flatpak guideline I'm not aware of.

Thank you very much!
Guilherme
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/flatpak/attachments/20200203/a6a23a43/attachment.htm>


More information about the Flatpak mailing list