microsoft / microsoft/DirectX-Graphics-Samples

WaitForGpu() method in D3D12nBodyGravity sample

Open
#806 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

samples
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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.