KhronosGroup / Vulkan-ValidationLayers

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

[NVIDIA BPA] False positive BestPractices-BindMemory-NoPriority when priority is set via VK_EXT_memory_priority.VkMemoryPriorityAllocateInfoEXT #8276

Closed HildarTheDorf closed 2 months ago

HildarTheDorf commented 2 months ago

Environment:

Describe the Issue

Enable VK_EXT_pageable_device_local_memory for a device. Create a VkDeviceMemory with VkMemoryPriorityAllocateInfoEXT in the pNext chain. Attempt to bind that memory to an object. BestPractices-NVIDIA-BindMemory-NoPriority is raised as it only checks for usage of vkSetDeviceMemoryPriorityEXT when VK_EXT_pageable_device_local_memory is enabled.

Expected behavior

Setting a priority via VkMemoryPriorityAllocateInfoEXT has identical behavior to calling vkSetDeviceMemoryPriorityEXT exactly once immediately after creation of a VkDeviceMemory.

Valid Usage ID BestPractices-NVIDIA-BindMemory-NoPriority

Related checks: BestPractices-CreateDevice-PageableDeviceLocalMemory BestPractices-AllocateMemory-SetPriority

Additional context

VMA currently has no support for vkSetDeviceMemoryPriorityEXT, which is how I encountered this BPA warning.

spencer-lunarg commented 2 months ago

note - the current VUID was renamed to BestPractices-NVIDIA-BindMemory-NoPriority recently

spencer-lunarg commented 2 months ago

@rlocatti-nv is going to take a look at this (github won't let me assign it directly)