microsoft / microsoft/DirectX-Graphics-Samples

MiniEngine fences and synchronisation

Open
#902 2 comments 0 reactions 0 assignees View on GitHub

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

  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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.