Closed SaschaWillems closed 1 month ago
One could introduce a new function vkb::PhysicalDevice::get_extension_features<ExtensionFeatureStruct>
that could be used like this:
if (gpu.get_extension_features<VkPhysicalDeviceHostQueryResetFeaturesEXT>().hostQueryReset)
{
gpu.request_extension_features<VkPhysicalDeviceHostQueryResetFeaturesEXT>().hostQueryReset= VK_TRUE;
}
... and would need to adjust all usages of request_extension_features
accordingly!
... and modify request_extension_features
such that it returns either an empty features struct, or the one already requested before.
In a lot of samples we do something like this:
But the call to
gpu.request_extension_features
already sets all supported features to true by callingvkGetPhysicalDeviceFeatures2KHR
, which makes the second line (enabling a feature) superfluous.This doesn't do any harm, but it might confuse people trying to write or debug samples.