microsoft / microsoft/DirectX-Graphics-Samples
WaitForGpu() method in D3D12nBodyGravity sample
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 6.8k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
I might be wrong but it seems like the m_renderContextFenceValues array is not indexed correctly in the WaitForGpu() function. m_renderContextFenceValues is an array of size ThreadCount but it is indexed using frame-index which might lead to access violation. I couldn't reproduce the issue as the WaitForGpu is only called when DXGI_ERROR_DEVICE_REMOVED or DXGI_ERROR_DEVICE_RESET but I thought it might worth someone double checking it.
Contributor guide
No contributing guide indexed for this repository
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
Search the D3D12nBodyGravity sample for the WaitForGpu() function and the m_renderContextFenceValues declaration. Check whether frame-index is used against the ThreadCount-sized array, then trace the device-removed and device-reset paths that call WaitForGpu(). Done means the indexing is safe and the relevant sample behavior remains valid.
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
- 38/100