KhronosGroup / KhronosGroup/Vulkan-ValidationLayers
BestPractices-SyncObjects-HighNumberOfFences : off by one error
- Dominant language
- C++
- Stars
- 1k
- Forks
- 504
- Avg merge
- 11h 35m
- Merged PRs (30d)
- 224
Description
**Environment:**
- OS: Windows
- GPU and driver version: NVidia
- SDK or header version if building from repo: 1.3.290.0
- Options enabled (synchronization, best practices, etc.): best practices
**Describe the Issue**
The BestPractices-SyncObjects-HighNumberOfFences warning triggers after creating the fifth fence and not after creating the fourth (the limit is defined as 3).
The check is done in a PreCallValidateCreateFence so maybe before the count is updated...
Side note: would be nice if the warning message included the limit and the current count.
PS: other such checks might have the same issue.
Contributor guide
Research direction
Start at PreCallValidateCreateFence and trace how the fence count is updated relative to the BestPractices-SyncObjects-HighNumberOfFences check. Reproduce the warning at the fourth and fifth fences, then verify the boundary and warning details, including the limit and current count; inspect similar checks for the reported off-by-one pattern.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100