# nDisplay Nvidia Sync: SetMaximumLatency returns an error, missing Swaptchain flag DXGI\_SWAP\_CHAIN\_FLAG\_FRAME\_LATENCY\_WAITABLE\_OBJECT

**URL:** <https://forums.unrealengine.com/t/ndisplay-nvidia-sync-setmaximumlatency-returns-an-error-missing-swaptchain-flag-dxgi-swap-chain-flag-frame-latency-waitable-object/2746333>\
**Category:** Issues and Bug Reporting (Unreal Engine)\
**Tags:** ndisplay, directx, unreal-engine, nvidia, Rendering, dx12\
**Created:** [August 25, 2026, 12:38pm UTC](https://forums.unrealengine.com/t/ndisplay-nvidia-sync-setmaximumlatency-returns-an-error-missing-swaptchain-flag-dxgi-swap-chain-flag-frame-latency-waitable-object/2746333 "2026-08-25T12:38:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Gilbert](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@David\_Gilbert](https://forums.unrealengine.com/u/David_Gilbert)\
**Post date:** [August 25, 2026, 12:38pm UTC](https://forums.unrealengine.com/t/ndisplay-nvidia-sync-setmaximumlatency-returns-an-error-missing-swaptchain-flag-dxgi-swap-chain-flag-frame-latency-waitable-object/2746333/1 "2026-08-25T12:38:39Z")

</div>

### Summary

When running nDisplay with the Nvidia Sync Policy (Swap/Present barrier), the engine throws an error when trying to call `SetMaximumFrameLatency` (e.g. in this [line](https://github.com/EpicGames/UnrealEngine/blob/a8c4d6fc0ec0c6067ab5dab92c9641706ca7ed05/Engine/Plugins/Runtime/nDisplay/Source/DisplayCluster/Private/Render/Synchronization/Windows/DisplayClusterRenderSyncPolicyNvidiaPresentBarrierWindows.cpp#L157))

There is a further comment on the [`nDisplay.sync.nvidia.ForceLatencyUpdateEveryFrame` Cvar](https://github.com/EpicGames/UnrealEngine/blob/a8c4d6fc0ec0c6067ab5dab92c9641706ca7ed05/Engine/Plugins/Runtime/nDisplay/Source/DisplayCluster/Private/Render/Synchronization/DisplayClusterRenderSyncPolicyNvidiaBase.cpp#L82) which reads:

```C++
// In the recent logs (Nov-Dec, 2023), we see GetMaximumFrameLatency() and SetMaximumFrameLatency() don't work
// properly. This is something weird and may indicate there is an issue outside of UE. Those methods are called
// once during the policy initialization. To better understand the issue and probably see some correlation,
// this cvar allows to focribly call set/get frame latency every frame, and log the results.

```

Looking into the actual DXGI documentation, there is this remark:  
This method is only valid for use on swap chains created with [DXGI\_SWAP\_CHAIN\_FLAG\_FRAME\_LATENCY\_WAITABLE\_OBJECT](https://learn.microsoft.com/en-us/windows/win32/api/dxgi1_3/nf-dxgi1_3-idxgiswapchain2-setmaximumframelatency#remarks). Otherwise, the result will be DXGI\_ERROR\_INVALID\_CALL.

I’ve added the [`DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT`](https://github.com/EpicGames/UnrealEngine/blob/16d75d84714512edfb744e1fd0a59e9c74d57873/Engine/Source/Runtime/D3D12RHI/Private/Windows/WindowsD3D12Viewport.cpp#L108)flag to swapchain creation (unfortunately this happens outside of nDisplay and is completely hardcoded) here and the error goes away.

I would put up a PR, but as this actually adjusts the whole engine swapchain I’m not sure how to resolve this none-intrusively.

### What Type of Bug are you experiencing?

Virtual Production

### Steps to Reproduce

Use nDisplay with the Nvidia Sync Policy, check the logs. It should always happen.

### Expected Result

No error in logs and the call succeeds.

### Observed Result

An error is printed in the logs.

### Affects Versions

5.7

### Platform(s)

Windows
