8

My development machine has Steam installed on it, which installed SteamOverlayVulkanLayer64 as an implicit layer.

This is all fine and dandy, but it seems a recent update made a change that made it incompatible with LunarG's VKLayer_unique_objects. (at least as far as swap chain creation goes on windows).

Is there a sane way to disable just that one implicit layer without making a system-wide change on my machine?

For reference, I'm using the 1.1.77.0 SDK in case that's relevant in any way.

Edit: On the off-chance that someone else runs into this and lands here, the steam overlay can be controlled with an environment variable:

if (!validation_layers.empty()) {
#ifdef WIN32
  // Steam's overlay is incompatible with LunarG's
  SetEnvironmentVariable("DISABLE_VK_LAYER_VALVE_steam_overlay_1", "1");
#endif
  [...]
}

However, I'd still be interested in knowing wether or not there is a way to control implicit layers in general.

krOoze
  • 12,301
  • 1
  • 20
  • 34
  • You can disable just that one layer in the registry, but that's a system-wide change. – Ekzuzy Jul 28 '18 at 16:25
  • Implicit layers are intended to be "system-wide", so this approach is appropriate, even though you are debugging a single app. Another approach would be to disable the unique objects layer, but keep the other validation layers active. See this [information](https://vulkan.lunarg.com/doc/sdk/1.1.77.0/windows/validation_layers.html) to see how to enable just the other validation layers. Doing this instead of disabling the implicit layer affects only the application under test. – Karl Schultz Jul 30 '18 at 15:23
  • There's currently no way to disable all implicit layers (might be nice though to implement in loader). Steam should declare `Enable` variable in the first place, and so be off by default; it is IMO Steam's bug. – krOoze Jul 30 '18 at 17:04
  • 2
    @krOoze, well, disabling all implicit layers would be a non-starter as well because RenderDoc relies on one as well so some granularity would be needed. –  Jul 30 '18 at 17:09
  • I thought that was your edited Q. Just saying it could be useful option for debugging though. ;; Generally all implicit layers have a safe-word, as you already found out. And the can (optionally) have enable-keyword, which makes them off by default. So what else do you mean by "way to control implicit layers in general"? – krOoze Jul 30 '18 at 17:45
  • 1
    I don't think it can be made per application basis, it's system-wide. You could try `vkconfig` as it's GUI tool. There is always an option called "Undo changes on exit" enabled by default in every run thus use case might be open `vkconfig` then disable a target implicit layer as needed, then leave it running while you do per-application stuff basis. Upon exit `vkconfig`, things will return to normal. More info regarding `vkconfig` and where its configuration file is can be found [here](https://vulkan.lunarg.com/doc/view/1.2.135.0/mac/vkconfig.html). – haxpor Apr 24 '20 at 10:00
  • @haxpor, yes, I've been using vkconfig to handle this fairly comfortably for a while now. It simply wasn't a thing when I originally asked the question. –  Apr 29 '20 at 18:22
  • You can disable all implicit layers using the environment variable `VK_LOADER_LAYERS_DISABLE=~implicit~`. You can also specify wildcards like `*OBS*` to disable all OBS related layers for example. More info can be found in the [vulkan loader documentation](https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderInterfaceArchitecture.md#filter-environment-variable-behaviors). This feature was only just added in 1.3.236.0 – TitusKap May 06 '23 at 21:42

0 Answers0