KhronosGroup / KhronosGroup/Vulkan-Docs
vkCreateDevice doesn't check features against enabled extensions
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 549
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 2
Description
Moved from https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/2818
To sum up the issue:
```cpp
VkPhysicalDevice16BitStorageFeaturesKHR ext_feature = {};
VkPhysicalDeviceFeatures2 physical_features2 = {};
physical_features2.pNext = &ext_feature;
// Assume VK_KHR_get_physical_device_properties2 enabled at instance level
vkGetPhysicalDeviceFeatures2(physical_device, &physical_features2);
assert(ext_feature.storagePushConstant16 == VK_TRUE);
VkDeviceCreateInfo device_info = {};
device_info.pNext = &physical_features2;
device_info.enabledExtensionCount = 0; // VK_KHR_16bit_storage NOT enabled
vkCreateDevice(&device_info);
```
In the case of a 1.0 Vulkan implementation, there seems to be no explicit VU saying
> If you enable the supported feature, the device version must support it OR the device extension must enable it
@rua pointed to spots in the spec, but currently the Validation Layers are not checking for this
Contributor guide
Assessment
This issue has not been assessed yet.