Missing Frames

Hi All!

I work for a company creating what is essentially a Cave display. We are rendering from a server computer containing 8 x RTX 4090 GPUs using a DX12 pipeline. We use a double buffer with V-Sync enabled, and call Present(1, 0), we also use DXGI_SWAP_EFFECT_FLIP_DISCARD. The displays are 4k x 120Hz each and we drive two each from 6 of the GPUs - for a total of 12 displays. Our display hardware does not tolerate missing frames - every frame we call Present on must be shown on the display for at least the V-Sync interval.

We are seeing missing frames on some of the displays, especially when the rendering load is high. We aren’t sure where the issue is (I’ve posted this same question in the DirectX Discord) but I thought I would ask here to check if anyone had any insight into how a frame may get lost between the GPU and the display.

Many thanks for reading, and please let me know if I posted this in the wrong channel so I can move it.

Tim

Hello @tim.smith1 and welcome to the NVIDIA developer forums.

The first thing to check would be if you even reach the required 4k at 240 frames per second (unless you are just duplicating on both displays) that you lock your application to. If the load is too high the GPU will simply sometimes miss updating the back buffer.

Maybe try triple buffering? Or experiment with DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT or DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING

To further analyse possible bottle-necks I recommend looking into NSIGHT Graphics.

Thanks Markus!

When you say “the load is too high the GPU will simply sometimes miss updating the back buffer.” Do you mean that the GPU will be delayed in rendering until the next V-sync signal.

Delays are actually ok for us, but what are seeing is that frames are going missing completely. We send an identifying number with each frame and we can analyze the frame that is received at the display to check the frames that were received there. What we see, when the GPU load is high, is that the display receives frame 1, 2, 3, 5, 6, 7. So frame 4 was completely lost somewhere between the Present call and arriving at the display.

Thanks for the suggestions, we will look into each of those options.

I am a bit rusty with my VSYNC and how the DXGI swapchain works, but the effect you see is the symptom of the GPU not rendering fast enough.

By forcing VSYNC it means that the system sends the framebuffer to the display on every V-Blank interval. If the present call comes too late it will be discarded since the current interval has passed. Which means the same frame will be displayed and synchronization only starts again with the next frame.

Again, this is just a suspicion, but with a tool to show you frame pacing like NSIGHT or also from Microsoft PIX, you should be able to get a better idea what goes on.

Hello again!

We were finally able to use Pix to get a capture of what I think is our issue. It seems that we occasionally have Present calls that are closer together than the V-Sync interval. The screenshot below shows two such calls. Here is some info about our setup:

  • The adapter is an NVIDIA RTX 6000 Ada Generation
  • The adapter is connected to a 120Hz display (Translating to a V-Sync interval of 8ms)
  • The total capture in PIX is about 20s, In the majority of cases the times between present calls are multiples of the V-Sync Interval (8ms, 16ms, etc) which is the expected behaviour. But there are regular cases where that is not the case.
  • We always call Present with a SyncInterval of 1 “HRESULT Result = SwapChain->Present(1, 0);”

Are there any ideas on how this could happen?

Many thanks for reading!

Tim