add VK_LOADER_FORCE_LAYER_ORDER to allow forced layer ordering
For debugging, sometimes it's useful to be able to force a certain layer to load before (closest to the application) any other layer. Currently, the only way to do this is through vkconfig, but this is cumbersome to be toggling constantly during a debug session. There should be an environment variable to enable this sort of ordering.
Hi @zmike,
I am trying to understand exactly what's your feature request.
We introduce in Vulkan Configurator 3 the capability to decouple ordering layers from enabling them. My understanding of a VK_LOADER_FORCE_LAYER_ORDER would be to specify the layer ordering without necessarilly enabling (loading) them.
However, here it seems you want to load first a layer, so ordering and enabling layers at the same time. Isn't VK_LOADER_LAYERS_ENABLE enough for this? I guess not considering your request, but what's missing?
If we look at:

Then it implies to list the implicit layers in VK_LOADER_LAYERS_ENABLE for them to be explicitly ordered.
And if I am totally missing something, how would you expect VK_LOADER_FORCE_LAYER_ORDER to work?
And maybe finally, what so annoying with controlling this with Vulkan Configurator compared with doing this with an environment variable? (except maybe that you generally prefer environment variable than a UI)
I don't think VK_LOADER_LAYERS_ENABLE is sufficient for managing the order of both implicit layers and explicit layers.
The configurator tool is intended for general purpose use, but it is not suitable for use in debug sessions where layer settings may change on every application run.
@zmike As discussed elsewhere, I have gone forward with the VK_INSTANCE_LAYERS approach such that putting an implicit layer in the env-var causes it to be ordered with other env-var enabled layers. So VK_INSTANCE_LAYERS=foo:bar will have the bar layer be enabled after foo, regardless of whether they are implicit or explicit.
Sounds great!