charles-lunarg/vk-bootstrap

Enable calling `PhysicalDeviceSelector::add_required_extension_features` with same struct multiple times.

Closed this issue · 0 comments

Example:

VkPhysicalDeviceDescriptorIndexingFeatures descriptor_indexing_features{};
descriptor_indexing_features.<features_used> = true;

phys_device_selector.add_required_extension_features(descriptor_indexing_features);

// ... in another part of the code
VkPhysicalDeviceDescriptorIndexingFeatures other_descriptor_indexing_features{};
other_descriptor_indexing_features.<features_used> = true;

phys_device_selector.add_required_extension_features(other_descriptor_indexing_features);

This is useful for requiring the same feature in unrelated parts of the codebase. Like a plugin system, where each plugin is allowed to request its own features.