Cleanup of layer storage and enabling logic - #2031
charles-lunarg merged 6 commits into
Conversation
|
CI Vulkan-Loader build queued with queue ID 110868. |
|
CI Vulkan-Loader build # 3751 running. |
|
CI Vulkan-Loader build queued with queue ID 110886. |
|
CI Vulkan-Loader build # 3752 running. |
|
CI Vulkan-Loader build # 3752 failed. |
The loader_instance member variable app_activated_layer_list had one difference with expanded_activated_layer_list, which was that it contained enabled meta layers. It is simpler to have a single list of 'enabled' layers and skip over meta layers whenever necessary. It also removes confusion because "app_activated" is not what the list represented.
Move loader_getenv out of the loop so it is queried once at the start and use a local variable to store the VkExtensionProperties pointer so it is scoped only to where it is used.
loader_validate_instance_extensions() made all of the same calls to set up a list of enabled layers that loader_enable_instance_layers() did. By calling loader_validate_instance_extensions() after loader_enable_instance_layers(), we can re-use the list of enabled layers.
8370818 to
20375b2
Compare
|
CI Vulkan-Loader build queued with queue ID 114085. |
|
CI Vulkan-Loader build # 3755 running. |
|
CI Vulkan-Loader build queued with queue ID 114103. |
|
CI Vulkan-Loader build # 3756 running. |
|
CI Vulkan-Loader build # 3756 passed. |
|
CI Vulkan-Loader build queued with queue ID 114342. |
|
CI Vulkan-Loader build # 3757 running. |
|
CI Vulkan-Loader build queued with queue ID 114360. |
|
CI Vulkan-Loader build # 3758 running. |
|
CI Vulkan-Loader build # 3758 passed. |
|
CI Vulkan-Loader build queued with queue ID 114621. |
|
CI Vulkan-Loader build queued with queue ID 114638. |
|
CI Vulkan-Loader build # 3760 running. |
Various functions take the loader_layer_list and loader_pointer_layer_list parameters that live inside the loader_instance, meaning the lists are already accessible through the passed in loader_instance. Removing them also solves a clang-tidy false positive that was difficult to determine the root cause of, but likely originated because of passing the lists around as pointers.
eb350b1 to
3f48a00
Compare
|
CI Vulkan-Loader build queued with queue ID 114657. |
|
CI Vulkan-Loader build # 3761 running. |
|
CI Vulkan-Loader build # 3761 passed. |
Multiple commits that work together to clean up layer enabling and storage.
app_activated_layer_list is redundant as it stores almost the same list as expanded_activated_layer_list save for not holding meta layers. Combining them does require handling meta layers in certain places, but overall it removes the burden of remembering why they are two lists.
loader_validate_instance_extensions() created the list of enabled layers but then destroys it. This duplicates the logic loader_enable_instance_layers() does to create the actual list of enabled layers. By moving loader_validate_instance_extensions() below loader_enable_instance_layers(), the duplicate logic can be removed.
Also refactors the parameter passing of loader_layer_list and loader_pointer_layer_list to not pass them when a loader_instance is also being passed in.