doitsujin / dxvk

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

Crysis 2 DX11: Menu is shown, black screen after loading map #15

Closed pingubot closed 6 years ago

pingubot commented 6 years ago

Hi ,

crysis 2 starts up fine into the menu, but i have only a black screen after loading a map. Logs attached.

System: Opensuse Tumbleweed, Intel 3570k, 16GB Ram, Nvidia GTX 970 390.12 drivers

If you need any additional logs/info, i will send all you need.

Cu, Christian

d3d11.log dxgi.log

doitsujin commented 6 years ago

Thanks for providing the logs. Actually I'm rather surprised that it renders anything at all on your GPU, something in the shader compiler causes trouble on Nvidia in most applications tested so far.

Anyway, with tessellation not being implemented at all and geometry shaders being incomplete, two of the more complicated D3D11 features, this game won't be running on DXVK any time soon.

pingubot commented 6 years ago

Thx for the info, hope you can get the nvidia issues sorted out :). AMD cards are so expensive atm :( . Will try again at a later development stage then .

pingubot commented 6 years ago

With the build from today, 20180125, the game even doesn't start anymore.

I get:

wine: Call from 0x7bc7a6e9 to unimplemented function dxgi.dll.CreateDXGIFactory, aborting wine: Unimplemented function dxgi.dll.CreateDXGIFactory called at address 0x4d430023:0x7bc7a6e9 (thread 0009), starting debugger...

backtrace-crysis2.txt

pingubot commented 6 years ago

Starts up fine again with version from today into the menu, but loading a game leeds to a black screen still due to missing features in dxvk. Will try again in a few weeks, as you are implementing new features crazily fast :) .

Crysis2_dxgi.log Crysis2_d3d11.log

I only found one reference to dx10 in the log:

err: DxgiAdapter::CheckInterfaceSupport: No D3D10 support

But the game started nonetheless..

pingubot commented 6 years ago

Hi,

fixing the shader files with the spir optimizer now let the savegame load sucessfully and something is rendered :) . It is not rendered correctly (i guess cause of tesselation).

Looks like this atm:

crysis2aftershaderfix

Actual logs:

Crysis2_dxgi.log Crysis2_d3d11.log

Many thanks for your great work !

pchome commented 6 years ago

Can confirm spirv-opt allows me to launch TW3 but it crashed during intro somewhere after savegame loaded. Maybe my fault due to heavily hacked dxvk build ( #60 ).

pingubot commented 6 years ago

Short Update: Crysis 2 works fine now with a build from today 0e9b7d7 ! The performance diff compared to wine-dev with dx11 is huge. In the level i tried, starring at a crowded place i get ~25 fps with wine and about 45fps with dxvk. Also dxvk is not enable to utilize my gpu ( ~ 45-60%), but it is already much much better than wine-dev. I am really looking forward how much fps growth is still possible with future optimizations in dxvk . But it is mighty impressive already !

ghost commented 6 years ago

@pingubot I know it's offtopic, but what DE/theme are you using? Like on your screenshots

pingubot commented 6 years ago

@Yardanico: It is a gnome 3 with osx-arc, dash-to-dock and a bunch of other gnome extensions.

ghost commented 6 years ago

@pingubot thanks a lot!

doitsujin commented 6 years ago

Closing the issue as it appears to be fixed.

pingubot commented 6 years ago

Just wanted to add that it is possible to set all options to ultra, except of objects and water which need wokring tesselation in ultra mode. Extreme mode works fine.

Beside that, the game runs super stable, fps gets down to 30 fps in some situations, when that happens the gpu utilization also drops to ~ 40% and less. If gpu utilizaton is 50-60%, the game ususlayy runs with ~ 40- 50fps.

Overall the game looks really great now, looking at some sreenshots it looks like on windows. Wine-dev was not able to achieve that. I really enjoy playing the game now. Keep up your fantastic work !

pingubot commented 6 years ago

@doitsujin : FYI. After your recent tesselation work i can set water to ultra :) . And i noticed a few new err in the log which i didn't notice before:

warn: DxbcCompiler: Unhandled opcode class: DxbcOpcode::DclHsMaxTessFactor err: DxbcCompiler: Unsupported operand type declaration: DxbcOperandType::InputPrimitiveId err: DxbcCompiler: Unhandled operand type: DxbcOperandType::InputPrimitiveId

doitsujin commented 6 years ago

Those are related to tessellation, it's still incomplete.

pingubot commented 6 years ago

@doitsujin : I just wanted to inform you that after your last night commits, the performance of Crysis 2 improved tremendously . I played yesterday evening with a build up to commit 1bad90a, and the performance was as usual, mostly in the range of 40-65 fps, with a gpu load of 50-65% .

I compiled the today version up to commit 5b9e4c1 and i now see 50 -100 fps, with gpu loads ranging from 60 - 100%. In many situation, mostly in buildings, i am gpu limited now, which never happend before. Most of the time the fps are between 60 and 70, even outside, with a gpu load of 90-100%. I guess your fix for the withcher 3 has caused the huge positive impact here. The only thing i noticed are a few micro-stutters, but i need to play more to see if that really is a new issue or not. Thank your very much for your hard work !!

@oscarbg : Can you also try on windows to see if performance also increased that much on your box ?

doitsujin commented 6 years ago

@pingubot thanks for the info, but sadly I had to revert that optimization again.

pingubot commented 6 years ago

@doitsujin : damn, thats sad. While you are searching for a way to get it safely re-enabled, do you think you could make the option available via an environment variable as the performance impact of the option is so massive ? So per default it is off, but you can enable it via an environment variable ?

doitsujin commented 6 years ago

Not going to happen.

pingubot commented 6 years ago

ok :(