HansKristian-Work / vkd3d-proton

Fork of VKD3D. Development branches for Proton's Direct3D 12 implementation.
GNU Lesser General Public License v2.1
1.8k stars 185 forks source link

Low FPS on DX12 only on Unreal Engine 4 Games #1882

Closed Haorelian closed 6 months ago

Haorelian commented 6 months ago

Alright, my problem is that in certain games uses Unreal Engine 4 I have frame rate issues. On DX11 mode they have no problem whatsoever, but on DX12 they just get stuck to 12 fps. Furthermore, in Ready or Not, game's textures doesn't load (low poly low res). If any information is missing, I'm sorry, I'm not too technically inclined on Linux. Games: Ready or Not and Squad Settings: Squad (High Preset with FSR 2 enabled) Ready or Not (High Preset, Shadows lowered to Medium with FSR2 enabled)

System information

steam-1144200.log

doitsujin commented 6 months ago

From the log, lots of this:

41341.103:0134:0238:warn:vkd3d-proton:vkd3d_allocate_device_memory: Memory allocation failed, falling back to system memory.

Which suggests very high VRAM utilization by the game, which would also explain why the texture streaming nopes out and renders everything at low res. You can see actual VRAM usage with something like radeontop and check if that is the problem.

That said, UE4 isn't generally known to be problematic with this, but if you're actually seeing (close to) the full 8GB of usage then your only real options are to lower settings or keep using D3D11 for those, we can't really do much about scuffed memory management.

Haorelian commented 6 months ago

From the log, lots of this:

41341.103:0134:0238:warn:vkd3d-proton:vkd3d_allocate_device_memory: Memory allocation failed, falling back to system memory.

Which suggests very high VRAM utilization by the game, which would also explain why the texture streaming nopes out and renders everything at low res. You can see actual VRAM usage with something like radeontop and check if that is the problem.

That said, UE4 isn't generally known to be problematic with this, but if you're actually seeing (close to) the full 8GB of usage then your only real options are to lower settings or keep using D3D11 for those, we can't really do much about scuffed memory management.

In Squad, the VRAM usage gradually climbs up to 8GB, which is the maximum capacity I have. However, in Ready or Not, it tends to hover around 6.6-7GB of VRAM. I'm observing these figures through GOverlay, although I can't confirm their accuracy with certainty.

Haorelian commented 6 months ago

I've conducted thorough testing to pinpoint the conditions that trigger this phenomenon. Apparently, even when using DX11, this issue occurs under specific circumstances. To replicate it with DX12, it's quite straightforward: simply launch the game, where the main menu operates smoothly (at 65-70FPS), then load into the game and experience a drastic drop to 12FPS. Meanwhile, I'm monitoring VRAM usage in radeontop, which never exceeds 6.5GB with FSR2 disabled. However, when enabled, it reaches around 7.5GB. The same problem occurs with DX11, but only when toggling FSR2 on or off, causing the game to exceed 8GB of VRAM and revert to memory fallback. I'm not entirely sure why this is happening.

Just a quick edit for the Fix: The issue was Resizablebar. I've disabled it on UEFI and problem literally fixed itself.