KhronosGroup / Vulkan-ValidationLayers

Vulkan Validation Layers (VVL)
https://vulkan.lunarg.com/doc/sdk/latest/linux/khronos_validation_layer.html
Other
745 stars 399 forks source link

VK_NV_low_latency2 extension requirements incorrect #8308

Closed tycho closed 1 month ago

tycho commented 1 month ago

Environment:

Describe the Issue

If creating a Vulkan device with a VK 1.1 instance with VK_NV_low_latency2 enabled, it complains:

VUID-vkCreateDevice-ppEnabledExtensionNames-01387(ERROR / SPEC): msgNum: 307460652 - Validation Error: [ VUID-vkCreateDevice-ppEnabledExtensionNames-01387 ] Object 0: handle = 0x2057cbe40d0, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0x12537a2c | vkCreateDevice(): pCreateInfo->ppEnabledExtensionNames[40] Missing extension required by the device extension VK_NV_low_latency2: VK_VERSION_1_2. The Vulkan spec states: All required device extensions for each extension in the VkDeviceCreateInfo::ppEnabledExtensionNames list must also be present in that list (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCreateDevice-ppEnabledExtensionNames-01387) Objects: 1 [0] 0x2057cbe40d0, type: 1, name: NULL

Expected behavior

The extension is documented as requiring Vulkan 1.2 or VK_KHR_timeline_semaphore:

https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_NV_low_latency2.html

Extension and Version Dependencies Version 1.2 or VK_KHR_timeline_semaphore

It seems like it should be sufficient to pass validation when using it in a VK 1.1 context where VK_KHR_timeline_semaphore is enabled.

Valid Usage ID VUID-vkCreateDevice-ppEnabledExtensionNames-01387 for VK_NV_low_latency2

spencer-lunarg commented 1 month ago

thanks for reporting this, was able to easily reproduce

the core issue is the vk.xml is depends="VK_VERSION_1_2,VK_KHR_timeline_semaphore" but changing it to depends="VK_KHR_timeline_semaphore,VK_VERSION_1_2" fixes it... I assume this is just because things were always in that order and this one flipped it and the VVL never caught it... will get a fix in quick