HansKristian-Work / vkd3d-proton

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

Control (RT) Nvidia GPU utilization #2155

Open shelterx opened 1 month ago

shelterx commented 1 month ago

I thought I'd create a separate, more detalied issue about this, even tho' I mentioned it. When ReBar is on and RT is enabled in Control, the game doesn't utilize the full GPU. Disabling ReBar in vkd3d-proton does not fix it, see below.

This is with vkd3d-proton defaults:

> nvidia-smi dmon -s m
# gpu     fb   bar1   ccpm 
# Idx     MB     MB     MB 
    0   7475   1907      0 
    0   7473   1907      0 
    0   7472   1907      0 
    0   7472   1907      0 
    0   7472   1907      0 

Enabling no_upload_hvv does not fix it, seems like it still using BAR memory anyway?

> nvidia-smi dmon -s m
# gpu     fb   bar1   ccpm 
# Idx     MB     MB     MB 
    0   7708   1908      0 
    0   7693   1908      0 
    0   7689   1908      0 
    0   7689   1908      0 

What does fix it is VKD3D_CONFIG=force_host_cached.

> nvidia-smi dmon -s m
# gpu     fb   bar1   ccpm 
# Idx     MB     MB     MB 
    0   5900     37      0 
    0   5903     37      0 
    0   5901     37      0 
    0   5899     37      0 
    0   5930     37      0 

With force_host_cached GPU usage is 100% and FPS increases in some areas of the game where it was low before but that seems like an odd workaround. What also serves as a workaround is to disable ReBar in BIOS but that's a bit of a hassle.

I know ReBar can cause issues sometimes but why does the game totally ignore no_upload_hvv? Isn't that a hard vkd3d-proton setting?

doitsujin commented 1 month ago

Is this a recent regression or does this happen with 2.13 too?

The only thing we always put in HVV regardless of the option is descriptor buffers, but those shouldn't be almost 2GB in size...

shelterx commented 1 month ago

It goes back to vkd3d-proton 2.9 at least. However I don't recall my RTX 3060Ti was doing this, at least not when it comes to GPU utilization, I have RTX 4070 now.

Update, attached memory budget log default vkd3d-proton settings, ReBar on. Tell me if you want memory logs with other settings too. memory.log