P M
P M

Reputation: 21

Vulkan validation failure promoted device extension dependency

vkCreateDevice validation is failing because a dependency of an included extension is not also included. However, this dependency has been promoted to Vulkan 1.1 and that is the version I am using. If I try to include the dependency, the system complains that the extension is not available, which does not make sense. I want to understand if this failure is legitimate.

I am trying to include the external memory Android hardware buffer extension: https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VK_ANDROID_external_memory_android_hardware_buffer . I am including the following elements to the device extension names:

I get the following errors from validation:

ERROR: (INSTANCE 0x0) [Validation]  [ VUID-vkCreateDevice-ppEnabledExtensionNames-01387 ] Object: VK_NULL_HANDLE (Type = 1) | Missing extension required by the device extension VK_ANDROID_external_memory_android_hardware_buffer: VK_KHR_external_memory. The Vulkan spec states: All required extensions for each extension in the VkDeviceCreateInfo::ppEnabledExtensionNames list must also be present in that list. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkCreateDevice-ppEnabledExtensionNames-01387)
ERROR: (INSTANCE 0x0) [Validation]  [ VUID-vkCreateDevice-ppEnabledExtensionNames-01387 ] Object: VK_NULL_HANDLE (Type = 1) | Missing extensions required by the device extension VK_KHR_sampler_ycbcr_conversion: VK_KHR_maintenance1, VK_KHR_bind_memory2, VK_KHR_get_memory_requirements2, VK_KHR_get_physical_device_properties2. The Vulkan spec states: All required extensions for each extension in the VkDeviceCreateInfo::ppEnabledExtensionNames list must also be present in that list. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkCreateDevice-ppEnabledExtensionNames-01387)
ERROR: (INSTANCE 0x0) [Validation]  [ VUID-vkCreateDevice-ppEnabledExtensionNames-01387 ] Object: VK_NULL_HANDLE (Type = 1) | Missing extension required by the device extension VK_EXT_queue_family_foreign: VK_KHR_external_memory. The Vulkan spec states: All required extensions for each extension in the VkDeviceCreateInfo::ppEnabledExtensionNames list must also be present in that list. (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkCreateDevice-ppEnabledExtensionNames-01387)

VK_KHR_external_memory has been promoted to 1.1 and when I query vkEnumerateInstanceVersion I get a 1.1 version. If I add VK_KHR_external_memory it in turn requests VK_KHR_external_memory_capabilities, and when I add VK_KHR_external_memory_capabilities the system complains that the extension is not available, although it has also been promoted to 1.1 .

Upvotes: 0

Views: 1222

Answers (1)

P M
P M

Reputation: 21

I mistakenly was adding VK_KHR_external_memory_capabilities as a device extension when in fact it is an instance extension, even though it is a dependency of a device extension. Once I added all the dependencies correctly, I didn't have any failures or validation errors.

Additionally, I was not requesting the 1.1 API version correctly. Once I did that, I no longer needed to explicitly specify the 1.1 promoted extensions.

Upvotes: 0

Related Questions