microsoft / microsoft/DirectX-Graphics-Samples
D3D12RaytracingRealTimeDenoisedAmbientOcclusion - large per frame upload
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 6.8k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
m_hemisphereSamplesGPUBuffer.CopyStagingToGpu(frameIndex) in RTAO:Run takes about 8ms of CPU time on i74790K 4.4GHz 32GB RAM 2070 RTX driver 442.92 Win10 1909. The function performs a memcpy of 87031808 bytes per frame. This big upload is not even required. It is should be enough to upload it once on AO samples recreation. If I modify the source code to upload the buffer just for 3 first (in flight) frames then my framerate increases from 100 to 300fps.
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
Start at D3D12RaytracingRealTimeDenoisedAmbientOcclusion's RTAO::Run and inspect m_hemisphereSamplesGPUBuffer.CopyStagingToGpu(frameIndex). Confirm when AO samples are recreated and profile the per-frame upload. Done means the roughly 87 MB buffer is uploaded only when needed, while the sample continues to render correctly and avoids the reported CPU cost.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics, performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100