KhronosGroup / KhronosGroup/Vulkan-Docs

vkCreateDevice doesn't check features against enabled extensions

Open
#1,534 9 comments 0 reactions 1 assignee Assigned to @spencer-lunarg View on GitHub
Resolving Inside Khronos Validity
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.