Skip to content
This repository was archived by the owner on Jul 19, 2018. It is now read-only.
This repository was archived by the owner on Jul 19, 2018. It is now read-only.

Validation layers print errors when creating a device using supported device features from extensions #2670

@Whenning42

Description

@Whenning42

Creating a device with supported physical device features added by extensions prints errors. It looks like the validation layers are currently only tracking physical device features returned from a call to vkGetPhysicalDeviceFeatures, and so the layers think any physical device features added by extensions are unsupported.

An example of this is that running the following code using the testing framework:

ASSERT_NO_FATAL_FAILURE(InitFramework(myDbgFunc, m_errorMonitor));
auto indexingFeatures = lvl_init_struct<VkPhysicalDeviceDescriptorIndexingFeaturesEXT>();
auto features2 = lvl_init_struct<VkPhysicalDeviceFeatures2KHR>(&indexingFeatures);
vkGetPhysicalDeviceFeatures2(gpu(), &features2);
ASSERT_NO_FATAL_FAILURE(InitState(nullptr, &features2));

prints the following errors:

Unexpected: Object: VK_NULL_HANDLE (Type = 2) | While calling vkCreateDevice(), requesting feature 'textureCompressionETC2' in VkPhysicalDeviceFeatures struct, which is not available on this device.
Unexpected: Object: VK_NULL_HANDLE (Type = 2) | While calling vkCreateDevice(), requesting feature 'textureCompressionASTC_LDR' in VkPhysicalDeviceFeatures struct, which is not available on this device.
Unexpected: Object: VK_NULL_HANDLE (Type = 2) | You requested features that are unavailable on this device. You should first query feature availability by calling vkGetPhysicalDeviceFeatures().

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions