KhronosGroup / KhronosGroup/Vulkan-ValidationLayers
Missing index offset alignment validation for opacity micromaps
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1k
- Forks
- 505
- Avg merge
- 11h 25m
- Merged PRs (30d)
- 229
Description
When using VK_EXT_opacity_micromap, it seems that VkAccelerationStructureTrianglesOpacityMicromapEXT::indexBuffer device address should be aligned according to the indexType alignment (e.g. to 4 bytes if indexType is UINT32).
I don't see an obvious VUID for this, but I do see a GPU crash when the addresses are misaligned (on NVIDIA 590 drivers; I'd guess the issue is that the driver uses aligned reads and ends up getting incorrect index values if the data is misaligned). The crash goes away if the index data is aligned properly. I'd expect the validation layers to flag this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with validation handling for VkAccelerationStructureTrianglesOpacityMicromapEXT::indexBuffer and its indexType alignment requirements. Reproduce the misaligned-address case described in the issue, then add coverage so validation reports the invalid alignment and confirm that correctly aligned index data remains accepted.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100