KhronosGroup / KhronosGroup/Vulkan-ValidationLayers

VkMemoryAllocateInfo dedicated allocation related VUs are incorrectly validated at vkBind*Memory time

Open
#10,507 2 comments 0 reactions 0 assignees View on GitHub
Bug
Dominant language
C++
Stars
1k
Forks
504
Avg merge
11h 35m
Merged PRs (30d)
224

Description

There are certain VUs, such as `VUID-VkMemoryAllocateInfo-pNext-00639` that are validated at `vkBind*Memory` time even though they should be validated in `vkAllocateMemory`, because the VUs belong to `VkMemoryAllocateInfo`.

The validation code even "justifies it" in comments:

```c
// Validate VkExportMemoryAllocateInfo's VUs that can't be checked during vkAllocateMemory
// because they require buffer information.
```

However, that is not really true, certainly not for `VUID-VkMemoryAllocateInfo-pNext-00639`, because buffer information is readily available during `vkAllocateMemory`, as the `VkMemoryDedicatedAllocateInfo` structure includes the buffer/image handles the dedicated allocations are created for.

Contributor guide

Open the contributing guide

Research direction

Locate the validation code that handles VUID-VkMemoryAllocateInfo-pNext-00639 and the related dedicated-allocation checks at vkAllocateMemory and vkBind*Memory. Compare the available VkDedicatedAllocationInfo buffer or image handles at allocation time with the current validation comments. Done means these VkMemoryAllocateInfo VUs are validated at vkAllocateMemory rather than incorrectly deferred to binding.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.