microsoft / microsoft/DirectX-Graphics-Samples
MiniEngine fences and synchronisation
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 6.8k
- Forks
- 2.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hi, after a lot of back and forth around the MiniEngine source code, particularly on the fence and frame synchronisation part, I'm not sure about something.
Does the frame synchronisation of MiniEngine entirely relies on GpuTimeManager::BeginReadBack ? After adding a breakpoint on CommandQueue::WaitForFence, the only call done once per frame after all resource initialisation come from GpuTimeManager::BeginReadBack
From what I've read, waiting for a fence to be completed guaranties that every fence value beforehand are completed too, but I'm might be wrong.
If it is the case, why does GpuTimeManager has the responsability for frame sync ? Why there isn't any similar case than D3D12HelloFrameBuffering usage of fences for MiniEngine, like waiting for a fence only its buffer need to be accessed over again ?
And in general, why MiniEngine seems to care about multiple frame buffers only in Display, where there is the only usage of g_CurrentBuffer ? (even though it doesn't wait for fences here neither).
I hope it'll help me have a better understanding of multiple frame buffering and fences usage.
Thank you
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 with MiniEngine/Core/CommandListManager.cpp at CommandQueue::WaitForFence and trace the call from GpuTimeManager::BeginReadBack. Compare that flow with D3D12HelloFrameBuffering, then inspect Display and g_CurrentBuffer usage. Done means documenting how MiniEngine’s frame synchronization and multiple frame buffers relate to these paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100