doitsujin / dxvk

Vulkan-based implementation of D3D8, 9, 10 and 11 for Linux / Wine
zlib License
13.04k stars 836 forks source link

Skyrim Upscaler Crash #3132

Open draculatheweak opened 1 year ago

draculatheweak commented 1 year ago

Recently a pretty revolutionary mod came out for Skyrim SE, but is limited in Proton due to resource sharing between dxvk and vk3d.

[info] Loaded plugin [info] Installed upscaler hooks [info] Calling original D3D11CreateDeviceAndSwapChain [info] SettingGUI::InitIMGUI Success! [info] Cpp Message:Log has initialized [info] Detouring virtual function tables [info] Transparent Buffer Found : 1920 x 1080 [info] Opaque Buffer Found : 1920 x 1080 [info] Motion Vertor Found : 1920 x 1080 [info] Depth Buffer Found : 1920 x 1080 [info] Depth Buffer Found : 1920 x 1080 [info] Depth Buffer Found : 1920 x 1080 [info] Transparent Buffer Found : 1920 x 1080 [info] Registered class MenuOpenCloseEventHandler [info] Creating DX11WrapperForDX12 [info] Creating XeSSRuntime [info] DX11WrapperForDX12 Resource Created! [info] Create D3D11 Texture2D Success : 0x00000000 [info] m_RecommendedSettingsMap[0].OptimalRenderSizeX = 960 [info] m_RecommendedSettingsMap[0].OptimalRenderSizeY = 540 [info] GetD3D12Device()->CreateSharedHandle Failed ErrorCode: 0x80004001 [info] Failed to Create Shared Fence ErrorCode: 0x80004001

Both FSr2 and XESS crash, I am unable to test DLAA/DLSS, I dont have an nvdia card.

mbriar commented 1 year ago

Is this actually running on proton? Shared resources only work on proton's wine and when using vkd3d-proton as well as dxvk. Also, just attach the whole proton log and dxvk log.

Blisto91 commented 1 year ago

What mbriar said above. And note its limited to proton experimental for now.

draculatheweak commented 1 year ago

Also, just attach the whole proton log and dxvk log.

Where do I find the logs, if the game is running through steam?

Blisto91 commented 1 year ago

dxvk logs should appear either next to the games exe or in its main folder and the proton log in your users home folder by default. The proton log will include the games steam id in the name.

If you haven't enabled logging then that can be done by launching the game with PROTON_LOG=1 %command% in it's steam launch options. I'm assuming you are on Linux here.

gibsonjareds commented 1 year ago

I seem to have it working with the following configuration (some may be unnecessary as I am an idiot):

GPU is AMD RX6700

Launching MO2 directly through Lutris (not using MO2 rockerbacon workaround)

GE-Proton 7.41 DXVK 1.10.3 (SkyrimSE won't launch with 2.0 with or without Upscaler due to failed swapchain or something) vkd3d-proton 2.7

WineDLL overrides: d3d11 - native,builtin d3d12 - native,builtin dxgi - native,builtin d3dcompiler_47 - native (from ReShade) dxcompiler - native dxil - native ffx_fsr2_api_dxd12_x64 - native ffx_fsr2_api_x64 - native

With these settings, I was able to boot into the game and change settings on the Upscaler with FSR2, and they are actually reflected. I am playing in Fullscreen using SSE Display Tweaks.

I'm not sure I have any other relevant info to add.

EDIT: I exited the game and restarted, and for some reason it is now no longer working. Before this working setup, I had an issue where it froze at the main menu, and this seems to have returned. I wonder what would cause the issue to only happen occasionally

draculatheweak commented 1 year ago

EDIT: I exited the game and restarted, and for some reason it is now no longer working. Before this working setup, I had an issue where it froze at the main menu, and this seems to have returned. I wonder what would cause the issue to only happen occasionally

I have only been able to get in game once with it, it dumped my FPS to 20 and before and since then Ive only ever gotten the freeze at the main menu. Im also using display tweaks but with the rockerbacon install.

I'm assuming you are on Linux here.

Yes, I will get back to testing tomorrow and post logs then

gibsonjareds commented 1 year ago

Alright, I have a reliably working setup via Lutris to boot with Skyrim Upscaler and ReShade. It seems the key for me was disabling Esync and Fsync, both of which were enabled in my Lutris config. Something in Esync must break the rendering.

I no longer have the DXVK dll in the directory, but rather just have the toggle for dxvk 1.10.3 enabled in Lutris. Otherwise my settings are identical to my previous comment.

EDIT AGAIN: It seems you also need to start with the effect set to disabled. I can enable it in-game via GUI, but starting with it enabled in the config seems to cause the main menu freeze.

draculatheweak commented 1 year ago

steam-489830.log Even with esync and fsync disabled I cant get past the menu freeze using FSR2 or XeSS

draculatheweak commented 1 year ago

image

gibsonjareds commented 1 year ago

What version of vkd3d are you using? I'm using vkd3d-proton 2.7 with the d3d12 dll directly in the game directory, and the overrides set to native,builtin. I also have d3d11 set to native,builtin and have that installed globally in the prefix

draculatheweak commented 1 year ago

Whatever the default that comes with experimental is whats running

ecbfry commented 1 year ago

I'm getting a freeze as soon as I enable FSR2. I have the same log errors as dracula (Failed to open shared ID3D12Resource).

This is using GE-Proton7-41. Have also tried with vkd3d-proton 2.8 with d3d12.dll added to game directory. Winedll overrides are all as reported by gibsonjareds. Fsync / Esync seem to make no difference.

I am on NVIDIA (1660 Super, so no DLSS for me).

llde commented 1 year ago

It seems it's failing to validate resources flag. In this case d3d12_validate_resource_flags is probably returning an error blocking resource loading as it is seeing ALLOW_SIMULTANEOUS_ACCESS And ALLOW_DEPTH_STENCIL. Whatever this is a wine/proton issue in vkd3d or in the winevulkan shared gpu resource (but I didn't see relevant things when I was rebasing the patchset for wine 7.20) is to be seen (but I think it's the first). Doesn't seem an issue with DXVK honestly (unless these flags or one of them is setted on DXVK/D3D11 side)

draculatheweak commented 1 year ago

Ok, should I open an issue in the vkd3d git then?

vitalikyarina commented 9 months ago

Hi, I using Skyrim Upscaler and dxvk and also have crash

OS Windows 11

Do you have solution of this problem? If not, how can I help to fix it?

Blisto91 commented 9 months ago

No if it needs shared resources then it will not work on Windows as the implementation is dependent on work done in Wine.

Edit: actually I see it might have a dx11 fsr2 implementation without the need for dx12 now but haven't tested.