You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
auto &requested_extension_features = gpu.request_extension_features<VkPhysicalDeviceSomeExtensionFeaturesKHR>(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SOME_EXTENSION_FEATURES_KHR);
requested_extension_features.someFeature = VK_TRUE;
But the call to gpu.request_extension_features already sets all supported features to true by calling vkGetPhysicalDeviceFeatures2KHR, 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.
The text was updated successfully, but these errors were encountered:
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:
auto &requested_extension_features = gpu.request_extension_features<VkPhysicalDeviceSomeExtensionFeaturesKHR>(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SOME_EXTENSION_FEATURES_KHR); requested_extension_features.someFeature = VK_TRUE;
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.
The text was updated successfully, but these errors were encountered: