KhronosGroup / Vulkan-Utility-Libraries

Utility libraries for Vulkan developers
Other
56 stars 25 forks source link

environment variable to save configured settings in a file #188

Open lunarpapillo opened 7 months ago

lunarpapillo commented 7 months ago

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.

spencer-lunarg commented 7 months ago

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

charles-lunarg commented 7 months ago

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

spencer-lunarg commented 6 months ago

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

christophe-lunarg commented 6 months ago

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?

spencer-lunarg commented 6 months ago

Does it sounds good to you?

Sounds good to me, @lunarpapillo good for you?

Should we move this issue in the VulkanUtility repository?

done