GPUOpen-Tools / GPU-Reshape

GPU Reshape (GRS) is an API & vendor agnostic instrumentation framework, with instruction level validation.
Other
374 stars 12 forks source link

Launching a Vulkan application that has a VkPhysicalDeviceVulkan12Features in the devices pNext chain causes a validation error #58

Closed peter1745 closed 7 months ago

peter1745 commented 8 months ago

Currently launching an application through GPU Reshape that creates a VkDevice with a VkPhysicalDeviceVulkan12Features in the pNext chain of feature structs will result in a validation error, and device creation failure.

Here is the validation error:

Validation Error: [ VUID-VkDeviceCreateInfo-pNext-02830 ] Object 0: handle = 0x1b35e807c90, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0x211e533b | vkCreateDevice(): If the pNext chain includes a VkPhysicalDeviceVulkan12Features structure, then it must not include a VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES structure. The Vulkan spec states: If the pNext chain includes a VkPhysicalDeviceVulkan12Features structure, then it must not include a VkPhysicalDevice8BitStorageFeatures, VkPhysicalDeviceShaderAtomicInt64Features, VkPhysicalDeviceShaderFloat16Int8Features, VkPhysicalDeviceDescriptorIndexingFeatures, VkPhysicalDeviceScalarBlockLayoutFeatures, VkPhysicalDeviceImagelessFramebufferFeatures, VkPhysicalDeviceUniformBufferStandardLayoutFeatures, VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures, VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures, VkPhysicalDeviceHostQueryResetFeatures, VkPhysicalDeviceTimelineSemaphoreFeatures, VkPhysicalDeviceBufferDeviceAddressFeatures, or VkPhysicalDeviceVulkanMemoryModelFeatures structure (https://vulkan.lunarg.com/doc/view/1.3.275.0/windows/1.3-extensions/vkspec.html#VUID-VkDeviceCreateInfo-pNext-02830)

From what I can tell it's happening because GPU Reshape tries to add an instance of a VkPhysicalDeviceDescriptorIndexingFeatures struct to the pNext chain (seen here), however this isn't allowed if there's a VkPhysicalDeviceVulkan12Features struct in the pNext chain as well, since descriptor indexing was promoted to Core in Vulkan 1.2

miguel-petersen commented 8 months ago

Hi Peter,

This has also been reported in another issue, I'll get a fix out for it soon.

miguel-petersen commented 8 months ago

Should be fixed now in the issue/52-vk-validation-errors branch.

miguel-petersen commented 7 months ago

@peter1745 Would it be possible to check if it's fixed on your end?

miguel-petersen commented 7 months ago

I'm closing this as completed. Feel free to reopen it if the issue persists.