KhronosGroup / Vulkan-ValidationLayers

Vulkan Validation Layers (VVL)
https://vulkan.lunarg.com/doc/sdk/latest/linux/khronos_validation_layer.html
Other
761 stars 403 forks source link

Best Practices Layer tracking of used features/extensions #5785

Open MarkY-LunarG opened 1 year ago

MarkY-LunarG commented 1 year ago

Modify the best practices layer to track what extensions and features are enabled but not used by the time vkDestroyDevice and vkDestroyInstance are called. This could help the applications more narrowly request only the features they intend to use and for external applications like GFXReconstruct and RenderDoc to be more prepared for what is actually used by an application were they to follow the best practices request.

spencer-lunarg commented 6 months ago

Thinking about how this would be done, there are 4 parts

  1. commands

These are the simplest, just check the function call for the EXT/KHR/etc version

  1. structs

This really is just checking for the pNext structs (since if you are calling from the command, you already know) .. just checking the sType would be sufficient

  1. enum/flags

These are the hardest part as you need to now have a hook into every field... we do this already to validate if the extension/feature was not enabled


I realize what ever we do, it will be quite a bit of scripting code.

My biggest concern is trying to shove this in Best Practice as this logic is best to be as it's own layer/chassis as you are going to have to generate every end point