Vulkan-Utility-Libraries icon indicating copy to clipboard operation
Vulkan-Utility-Libraries copied to clipboard

environment variable to save configured settings in a file

Open lunarpapillo opened this issue 1 year ago • 5 comments

Some application vendors configure the validation layer programmatically (i.e. via switches like -vulkan_enable_validation -vulkan_enable_sync_validation etc.).

For local analysis, it would be very helpful to know exactly how the validation layer is actually being configured in these cases.

Defining an environment variable VK_VALIDATION_SAVE_SETTINGS=/path/to/file/to/save/settings that caused VVL to write a settings file to the given location would make it easy.

lunarpapillo avatar Mar 18 '24 20:03 lunarpapillo

agree, this is also nice in general as sometimes I myself am concern I do/don't have certain settings enabled... VK_LAYER_VALIDATION_SAVE_SETTINGS would be a good debug env variable

spencer-lunarg avatar Mar 19 '24 02:03 spencer-lunarg

Would this be something to add to the settings library instead of being specific to validation?

charles-lunarg avatar Mar 19 '24 05:03 charles-lunarg

@christophe-lunarg this is something we really want for other layers too, is this something Layer Settings can take care of?

spencer-lunarg avatar Mar 21 '24 02:03 spencer-lunarg

This looks great to me and yes the layer settings library is a good place for this to generalize to all layers. We could also have a VK_VALIDATION_LOAD_SETTINGS env variable.

Probably a bit tricky to handle correcly the interaction of multiple layers on that file. I think we should go for a single environment variable VK_LAYERS_LOAD_SETTINGS and VK_LAYERS_SAVE_SETTINGS shared across layers.

Does it sounds good to you?

Should we move this issue in the VulkanUtility repository?

christophe-lunarg avatar Mar 21 '24 12:03 christophe-lunarg

Does it sounds good to you?

Sounds good to me, @lunarpapillo good for you?

Should we move this issue in the VulkanUtility repository?

done

spencer-lunarg avatar Mar 21 '24 13:03 spencer-lunarg