Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan Loader environment variables and vk_loader_settings.json log improvements #1595

Open
christophe-lunarg opened this issue Nov 14, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@christophe-lunarg
Copy link
Contributor

christophe-lunarg commented Nov 14, 2024

  • It would be very useful to get a Loader log information for each layers located and enabled by the Vulkan applications and each env variables. Currently, we don't have any feedback which could be useful for example typos the environment variable. "Could not find "VK_LAYER_KHRONOS_enable_raytracing"

Actually, we do get: WARNING | LAYER: env var 'VK_INSTANCE_LAYERS' defined and adding layers: VK_LAYER_KHRONOS_validation

But if both 'VK_INSTANCE_LAYERS' and 'VK_LOADER_LAYERS_ENABLE' are set, we get only the values for 'VK_INSTANCE_LAYERS' even if the layers in 'VK_LOADER_LAYERS_ENABLE' are also enabled.

  • It would be useful to log whether a layer is enabled from vk_loader_settings.json of from using Vulkan API or environment variable.
  • When there is a parsing issue of the vk_loader_settings.json file as trivial as unordered_layer_location_ahhhh instead of unordered_layer_location, we are still getting no feedback in the log, the file seems discarded.
  • If layers are disabled with VK_LOADER_LAYERS_DISABLE, we are not getting any notification.
@christophe-lunarg christophe-lunarg added the enhancement New feature or request label Nov 14, 2024
@christophe-lunarg christophe-lunarg changed the title Environment variables to enable layers log improvements Vulkan Loader environment variables and vk_loader_settings.json log improvements Nov 14, 2024
@charles-lunarg
Copy link
Collaborator

But if both 'VK_INSTANCE_LAYERS' and 'VK_LOADER_LAYERS_ENABLE' are set, we get only the values for 'VK_INSTANCE_LAYERS' even if the layers in 'VK_LOADER_LAYERS_ENABLE' are also enabled.

That is to be expected - if a layer is activated by VK_INSTANCE_LAYERS, the loader doesn't bother checking if VK_LOADER_LAYERS_ENABLE would also have enabled it.

It would be useful to log whether a layer is enabled from vk_loader_settings.json of from using Vulkan API or environment variable.

I have a branch for this. It adds logging to indicate what caused each layer to be active. #1608

When there is a parsing issue of the vk_loader_settings.json file as trivial as unordered_layer_location_ahhhh instead of unordered_layer_location, we are still getting no feedback in the log, the file seems discarded.

Yes, that would be a good thing to add. I will try to add more log messages indicating why a settings file failed to be used.

If layers are disabled with VK_LOADER_LAYERS_DISABLE, we are not getting any notification.

Yep, I can confirm this behavior for any layer which is NOT listed in the settings file. Seems that the logging of whether the layer is enabled/disabled by environment variables is not being run when the layer is listed in the settings file. I'll have to investigate this further to see where the logging is coming from.

@charles-lunarg
Copy link
Collaborator

charles-lunarg commented Nov 21, 2024

#1608 fixes what mechanism layers are enabled by - and is in.

The fix for the lack of logging of VK_LOADER_LAYERS_DISABLE & VK_LOADER_LAYERS_ENABLE is in:
#1609

And some more logging of incorrect vk_loader_settings.json is in this PR: #1610 - which is now merged as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants