Page 1 of 2

How to reduce input latency in DX12 rendered games?

Posted: 19 Apr 2023, 10:10
by Walk
I've read through numerous threads but not found a definitive answer or solution(and none that were recent).

DX12 renderer is advertised to have the full benefit of Full Screen Exclusive mode with regards to performance and input latency, similar to DX9-DX11 FSE with "disable full screen optimizations" checked. However, every single DX12 rendered game I have tried feels as if it has input latency and increased stutters / performance hitches, despite high average FPS - to me, it feels exactly as borderless mode does for DX11(which is awful as I prefer multiplayer FPS games).

The primary culprit is usually said to be DWM.

Is there any definitive way to disable DWM for DX12 games, so that they run exactly as full screen exclusive would? Or to disable DWM when DX12 games are running? Or to force full screen exclusive in DX12? Or some other fix/setting that would give DX12 games the same performance input latency that I've gotten used to for DX11 FSE?

The most recent game I've tried is XDefiant. I've also tried halo infinite, Apex(dx12 mode), and all of them perform worse(more stutters, input latency) than any DX11 FSE game I've played. There are many more DX12 games I've tried that I can't remember off the top of my head, but usually the first thing I do anytime I launch one is notice the issues and start trying to fix it, only to fail every time :(

My setup is pretty solid, it's a 10900k(OC to 4.8ghz), 3090(OC'd), 3600mhz ram(correct profile enabled ofc, 18 cas latency), NVME SSD. I use 1440p ROG XG27AQM with correct low latency settings(to the best of my knowledge) at 270 hz. All overclocked and lots of windows/other tweaks to improve performance and reduce input latency.

Most games run flawlessly, the only exception is Apex legends(DX11 FSE and DX12) and DX12 games. They have stutters or uneven frame pacing.

I usually run FPS uncapped, otherwise use RTSS for specific games(I'm aware it gives 1 frame of input lag)which don't have a good FPS cap option or have high variance in FPS.

Re: How to reduce input latency in DX12 rendered games?

Posted: 19 Apr 2023, 13:13
by jorimt
Walk wrote:
19 Apr 2023, 10:10
All I know is DX12 fullscreen/borderless flip model is effectively the same as exclusive fullscreen when focused, and it only uses DWM composition when unfocused to allow external overlays to appear, along with quicker alt+tab. It's basically exclusive fullscreen mode with adaptive DWM support.

As such, any additional perceived frametime performance issues or extra latency over traditional exclusive fullscreen mode are probably misattributed and/or due to factors not directly related to the new flip model, and more to do with the differences between the DX12 and DX11 APIs at the engine-level.

Further, I have also noticed DX12 is typically more stuttery than DX11 in the same games. The main reason for this in UE4/UE5 titles specifically is how DX12 handles shader compilation compared to older APIs, but low-level APIs like DX12 also tend to be more stutter-prone in some cases due to the fact that they take much more work at the development-level to optimize vs older APIs like DX11, which rely much more heavily on driver-level optimizations.

Re: How to reduce input latency in DX12 rendered games?

Posted: 19 Apr 2023, 13:40
by Walk
jorimt wrote:
19 Apr 2023, 13:13
Walk wrote:
19 Apr 2023, 10:10
All I know is DX12 fullscreen/borderless flip model is effectively the same as exclusive fullscreen when focused, and it only uses DWM composition when unfocused to allow external overlays to appear, along with quicker alt+tab. It's basically exclusive fullscreen mode with adaptive DWM support.

As such, any additional perceived frametime performance issues or extra latency over traditional exclusive fullscreen mode are probably misattributed and/or due to factors not directly related to the new flip model, and more to do with the differences between the DX12 and DX11 APIs at the engine-level.

Further, I have also noticed DX12 is typically more stuttery than DX11 in the same games. The main reason for this in UE4/UE5 titles specifically is how DX12 handles shader compilation compared to older APIs, but low-level APIs like DX12 also tend to be more stutter-prone in some cases due to the fact that they take much more work at the development-level to optimize vs older APIs like DX11, which rely much more heavily on driver-level optimizations.
So are we basically just stuck with garbage games anytime they use DX12? :(

Apex for example, is (modified) source engine, and I don't think halo infinite was unreal engine, either. It seems like not a single engine so far has produced any half decent or stutter free experience using DX12.

Re: How to reduce input latency in DX12 rendered games?

Posted: 19 Apr 2023, 14:55
by jorimt
Walk wrote:
19 Apr 2023, 13:40
So are we basically just stuck with garbage games anytime they use DX12? :(
Depends on the development team and engine being used.

Again, with low-level APIs like DX12 and Vulkan, overall performance/resource-allocation optimization at the engine-level is much more dependent on development know-how and quality than driver-support now, unfortunately.
Walk wrote:
19 Apr 2023, 13:40
Apex for example, is (modified) source engine, and I don't think halo infinite was unreal engine, either.
Right, which is why I specifically mentioned UE4/5 has distinct shader-related stutter on top of any of the other stutter DX12 has in both UE4/5 and non UE-engine games.

Re: How to reduce input latency in DX12 rendered games?

Posted: 19 Apr 2023, 15:50
by Walk
jorimt wrote:
19 Apr 2023, 14:55
Right, which is why I specifically mentioned UE4/5 has distinct shader-related stutter on top of any of the other stutter DX12 has in both UE4/5 and non UE-engine games.
Ah got it, went back and re-read and makes sense now. Originally read incorrectly.

Re: How to reduce input latency in DX12 rendered games?

Posted: 20 Apr 2023, 03:43
by Tuhin Lavania
Ive playd a lot of Halo Infinite, infact i play it everyday. Ive playd it on two systems ( One AMD 5950x and 3080Ti, other is 13900k and a 4090 with 6400mhz DDR 5 ) I have 3 monitors ( Asus PG259QNR 360hz, Alienware AW3423DW 175hz, Samsung Odyssey G7 240hz ) I mostly play on 360hz but i also find no difference in performance between 360hz and 175hz on the Alienware and that is weird. The Alienware has lower input lag when Gsync enabled so i usually cap it to 172hz, not tried RTSS fps cap though on it )
The Intel system is definitely more responsive. Ive done almost every tweak that is available on the Internet, didnt seem to help. Ive never noticed stutters on any of my systems on Halo.
The two things which made a huge huge difference in my gameplay i will list it down

1. Switching to FTTH connection from FTTN. And tweaking network settings in windows and settings in router helped so much in this game.

2. RTSS Framerate cap. I never used RTSS in Halo before. I had only used ingame fps cap and the fps cap in driver. Not much difference between the two untill i tried RTSS fps cap. This was so huge that i had to reduce my controller sensitivity to 3.5 ( out of 10 ) earlier i was on 9 ( almost maxxed out ) At those sensitivities i couldnt aim and so i had to reduce it down to 3.5 ( horizontal and vertical ) The game is super smooth now, not that it was not before, but it definitely runs very amazing now.

Dont bother with DWM crap. Time waste.

Re: How to reduce input latency in DX12 rendered games?

Posted: 20 Apr 2023, 05:43
by Tiberiusmoon
I have some performance stats for Apex to hand, ill share:

Image

Image

Re: How to reduce input latency in DX12 rendered games?

Posted: 20 Apr 2023, 12:48
by Tiberiusmoon
Also good news!
I have found out that disabling CFG for those Dx12 specific apps improves FPS by about 5%.

Image
Image

How to:
Type exploit protection in windows search, navigate to Program settings.
Click Add program and search for the game file exe.
Then scroll down to CFG and click override and switch to off.
Apply and test the difference.

Re: How to reduce input latency in DX12 rendered games?

Posted: 06 Aug 2023, 16:46
by Prolific
Deleted.

Re: How to reduce input latency in DX12 rendered games?

Posted: 07 Aug 2023, 01:43
by sherifmagdy32
Prolific wrote:
06 Aug 2023, 16:46
I think I finally found a fix for DX12 games. I set DPI Scaling to application controlled for ALL APPS I have running in the background while playing. In my case that was these 5 apps:
-Steam
-Halo Infinite (In the Games main file directory)
-Halo Infinite (In Game's Sub Folder) This game has two .exes
-Discord
-NVIDIA Container

For NVIDIA Container just open up task manager, right click NVIDIA Container and click Open File location to open the folder containing the app. After making these changes it finally feels like I am getting similar performance to DX11 titles in full screen mode.
You change that to the same as the pic ?