jp7677 / dxvk-nvapi

Alternative NVAPI implementation on top of DXVK.
MIT License
353 stars 32 forks source link

Enabling DLSS in War Thunder freezes the game #171

Open brokeDude2901 opened 2 months ago

brokeDude2901 commented 2 months ago

Hello I'm reporting War Thunder problem with DLSS enabled ( will play fine without DLSS ): Proton Experimental / X11 / Nvidia RTX 2080 / Ubuntu 23.10 Launch command: PROTON_LOG=1 PROTON_FORCE_NVAPI=1 DXVK_NVAPI_LOG_LEVEL=info DXVK_NVAPI_LOG_PATH=/home/user/ %command% dxvk-nvapi.log

jp7677 commented 2 months ago

Thanks for the report and sorry for the late response. I'm awaiting feedback from another source regarding your report, that takes a bit longer, hence the delay. The nvapi log file looks quite normal, I don't think the unimplemented functions would cause a hang, but not sure though. Do you also have a proton log available?

brokeDude2901 commented 2 months ago

Thanks for the report and sorry for the late response. I'm awaiting feedback from another source regarding your report, that takes a bit longer, hence the delay. The nvapi log file looks quite normal, I don't think the unimplemented functions would cause a hang, but not sure though. Do you also have a proton log available?

Here is the recent logs: Proton Experimental / X11 / Nvidia RTX 2080 / Ubuntu 24.04 Beta PROTON_LOG=1 PROTON_FORCE_NVAPI=1 DXVK_NVAPI_LOG_LEVEL=info DXVK_NVAPI_LOG_PATH=/home/user/ %command% Nvidia Driver 550.67 Open Kernel dxvk-nvapi.log steam-236390.zip Game freeze at Loading screen if DLSS is enabled on my configuration. Not sure if other people are having the same issue

jp7677 commented 2 months ago

Not sure if other people are having the same issue

Unfortunately yes, also trying a few obvious things didn't mitigate this. What we can do, is preventing DLSS from getting enabled, so that it at least no longer hangs/crashes. https://github.com/jp7677/dxvk-nvapi/pull/172 should do this. Are you able to test that PR (see binaries from CI) and report back?

jp7677 commented 1 month ago

Just for reference, I've looked again from the nvapi side of things. Installing nvml doesn't help and also faking the Reflex calls (this is a D3D11 title, we only have Reflex for D3D12/VKD3D-P) also didn't made any difference, the title still crashes. Adding the remaining missing functions (https://github.com/jp7677/dxvk-nvapi/pull/176), as far as known to us, also made no difference.

SveSop commented 2 weeks ago

I did some tests with the WIP/Test PR for reflex in DXVK https://github.com/doitsujin/dxvk/pull/3690 and it seems to work fine for this game - meaning no errors or crashes. Not really possible (for me) to determine if it improves latency.

Enabling DLSS still crashes with the same D3D11 texture error, so i would say it has nothing to do with the Reflex settings.

err:   D3D11: Cannot create texture:
err:     Format:  39
err:     Extent:  1280x800x1
err:     Samples: 1
err:     Layers:  1
err:     Levels:  1
err:     Usage:   e8
err:     Flags:   0

Seems to possible point to DXGI_FORMAT_R32_TYPELESS = 0x27, which in turn is this i guess:

// DXGI_FORMAT_R32_TYPELESS
{ VK_FORMAT_R32_UINT,
  VK_FORMAT_D32_SFLOAT,
  VK_FORMAT_R32_UINT },

So.. some shenanigans going on in DXVK 😄

doitsujin commented 2 weeks ago

Looks like something sets D3D11_BIND_UNORDERED_ACCESS | D3D11_BIND_DEPTH_STENCIL | D3D11_BIND_RENDER_TARGET, which is illegal and expected to fail.