protonscr

worse frame time consistency in Hitman 2 vs. native D3D12 in high resolutions

vkd3dclosed
HansKristian-Work/vkd3d-proton#626 · opened 2021-04-18 by aufkrawall · updated 2021-04-19 · 6 comments · github
Aaufkrawall 2021-04-18 github

(I mentioned this in #299 , but probably worth an extra ticket)
When cranking up render resolution via the game's own resolution scale slider, frame time consistency gets noticeably worse vs. native D3D12 on Windows or lower CPU bound resolutions with VKD3D-Proton. This especially happens when rotating the camera a lot. I assume that this applies to the game in general (any level or rendered scene) with any settings, as long it's GPU bound and resolution is high.

This is VKD3D-Proton with 1440p 170% resolution scale (vsync off, set WINEDLLOVERRIDES="dxgi=n" to make it start with D3D12):
Screenshot_20210418_151105

This is on Windows with 170% resolution as well and native D3D12 (the default RTSS frame time graph should be more sensitive than MangoHUD's default, it would probably be almost a flat line in MangoHUD):
hitman2_2021_04_18_14_02_12_762

Totally uneducated guess: Perhaps uploads to VRAM somehow stall the GPU?

In World of Warcraft, this issue doesn't exist and the frame time graph stays flat even in 5k render resolution:
Screenshot_20210418_150402

RX 6800, mesa git-master a1653854f50aa429cb1a5e0ece063900cc988554, Linux 5.12-rc7 (futex2 enabled), intel_pstate performance CPU clock governor, latest Proton Experimental, VKD3D-Proton c7eb6fdf617e2ec2b46c662f32f308f14a306f81

DDadSchoorse 2021-04-18 github

You could try VKD3D_CONFIG=multi_queue, but that might reduce gpu bound perf because it disables image compression. RADV_DEBUG=dccstores should recover some of that tho.

Aaufkrawall 2021-04-18 github

Wow, VKD3D_CONFIG=multi_queue solves the issue entirely and reduces GPU bound performance by perhaps ~1fps :o (RADV_DEBUG=dccstores doesn't seem to affect frame rate in this case):
Screenshot_20210418_181342

I should also give Strange Brigade and Shadow of the Tomb Raider a try, as they showed a similar (if not exactly the same) issue.

Aaufkrawall 2021-04-18 github

It also helps Strange Brigade D3D12 a lot, though it's not perfect like Hitman 2:
Screenshot_20210418_185158
It'd be a flat line on Windows (or with native Vulkan). Though maybe there is something else wrong, as turning off the game's latency reduction (CPU prerender limit 1?) option also has a negative effect, which is not the case with native D3D12:
Screenshot_20210418_185440
Screenshot_20210418_185436

Of course no big deal, since there is a native Vulkan path. No idea if it would make sense to specifically optimize for this.
Shadow of the Tomb Raider D3D12 crashes in Proton, so I couldn't test that (D3D11 -> DXVK works).

I wonder if it would make sense to already enable VKD3D_CONFIG=multi_queue for Hitman 1-3 by default? I've tested a few levels in Hitman 2 and it really runs fantastically well.

DDadSchoorse 2021-04-18 github

I think the plan is to make multi_queue the default at some point.

DDadSchoorse 2021-04-19 github

I guess this can be closed now that #629 is merged.

Aaufkrawall 2021-04-19 github

Ok. Great that this could make it for the next release. :)

Proton versions

Launch options