doitsujin / dxvk

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

[D3D9] Silent Hill 2 crash to desktop #1422

Open DaRkL3AD3R opened 4 years ago

DaRkL3AD3R commented 4 years ago

In a specific room in Silent Hill 2, pausing the game triggers a crash to desktop with DXVK, presumably because of a specific shader only present in this room. The rest of the game can be played fine with DXVK without issue.

System information

Apitrace file(s)

http://www.mediafire.com/file/mfe0lvah08md7vg/sh2pc.zip/file

Log files

misyltoad commented 4 years ago

I can't replicate the crash on AMD or NV using that trace. Can you provide a save file at all?

DaRkL3AD3R commented 4 years ago

Sure here's the save (structure is ".\Silent Hill 2\data\save" and in case you have your own saves move your Folder01 to desktop temporarily: https://www.mediafire.com/file/x26n64wcllwx2v4/save.rar/file

I doubt it's relevant since apitrace should have covered the bases but this is SH2 using the enhanced edition comminity fixes, not a native and vanilla install of the game. I am pretty sure that should be irrelevant since apitrace d3d9.dll is not conflicting with any mods so the game ran as expected when saving that trace.

DaRkL3AD3R commented 4 years ago

Update: Crash does not occur when the game is running in windowed mode. Only in exclusive fullscreen.

DaRkL3AD3R commented 3 years ago

Now Silent Hill 2 crashes if DXVK is installed at all. Here's the log file: https://drive.google.com/file/d/1UNipf8l4c313EafRacF5JsgPJmSp877G/view?usp=sharing

The final line seems to be of importance: warn: D3D9DeviceEx::SetRenderState: Unhandled render state D3DRS_ADAPTIVETESS_Y

K0bin commented 3 years ago

Seems to miss format converter support for D3DFMT_W11V11U10 = 65, which is missing for the docs here: https://docs.microsoft.com/en-us/windows/win32/direct3d9/d3dformat but listed in the Win CE one: https://docs.microsoft.com/en-us/previous-versions/ms886236%28v=msdn.10%29

K0bin commented 2 years ago

I've installed the game, the enhanced edition mod and your save game. Which room is it thats supposed to crash?

The only thing that's noticable to me is the extremely overdone film grain and the utterly terrible performance.

DaRkL3AD3R commented 2 years ago

Are you sure you configured the game to run in exclusive fullscreen instead of borderless windowed mode? If you're on Linux, it's possible that Linux doesn't have such a mode so it doesn't make a difference.

K0bin commented 2 years ago

There isn't even a fullscreen option:

image

DaRkL3AD3R commented 2 years ago

It's in the d3d8.ini that comes with Enhanced Edition.

Regardless of that setting (borderless windowed or exclusive fullscreen) the game crashes on bootup for me so that option doesn't even matter anymore. I just tested it and it crashes with the same error log as before about this:

warn: ConvertFormat: Unknown format encountered: 65 warn: ConvertFormat: Unknown format encountered: 65 warn: ConvertFormat: Unknown format encountered: 65 warn: ConvertFormat: Unknown format encountered: 65 warn: D3D9DeviceEx::SetRenderState: Unhandled render state 181

To be clear I'm on Windows. It looks like you're testing on Linux.

K0bin commented 2 years ago

If it crashes on Windows but works on Linux, the issue is most likely out of our control anyway.

The game seems to work fine without support for that specific texture format and render state 181 is pretty meaningless.

AlpyneDreams commented 1 year ago

For what it's worth, render state 181 (t. D3DRS_ADAPTIVETESS_Y): sh2ee appears to be trying to disable or enable transparency SSAA.

Not sure if NVIDIA drivers actually respond to this as I would not expect it to be done this way.

mirh commented 1 year ago

That comes from https://github.com/elishacloud/Silent-Hill-2-Enhancements/commit/79357608c84b83b4b3f0ab081b02d5f6c8356449. And from the wording it seems like they are "accommodating to SSAA being enabled", as opposed to enabling themselves the effect in the first place (in turn, presumably to fix https://github.com/elishacloud/Silent-Hill-2-Enhancements/issues/227).