protonscr

[d3d11] - CONTRA: ROGUE CORPS - Title fails with a "Cannot create shader resource view" error.

dxvkclosed appid 1020540d3d11
doitsujin/dxvk#1676 · opened 2020-06-26 by ZereoX · updated 2021-06-15 · 8 comments · github · game page · search this game
ZZereoX 2020-06-26 github

Description:

CONTRA: ROGUE CORPS (1020540) hangs on launch prior to showing the "Konami" splash screen when using DXVK. The following error is shown repeatedly in the log until the application crashes:

err:   D3D11: Cannot create shader resource view:
err:     Resource type:   3
err:     Resource usage:  72
err:     Resource format: 53
err:     View format:     5

This was confirmed to be occurring on both Windows 10 and Proton 5.0-9 using DXVK 1.7 (2e37825) / master (291f7e05). (Proton does require d3dcompiler_47 which can be installed by using the d3dcompiler_47 verb on Winetricks [ex: WINEPREFIX="/home/<USERNAME>/.local/share/Steam/steamapps/compatdata/1020540/pfx" winetricks d3dcompiler_47]).

DXVK Native
DXVK Native

Please let me know if any additional information is required or if additional testing is needed.

Software information

CONTRA: ROGUE CORPS (1020540)

System information

OS: Ubuntu 18.04.4 / Windows 10 Pro 1909
GPU: Radeon RX 580 / Nvidia GeForce GTX 1060
Driver: 20.1.2~kisak1~b / 440.100-0ubuntu0.18.04.1
Wine version: Proton 5.0-9
DXVK version: 1.7 / Master (291f7e05)

Apitrace file(s)

Log files

d3d11.log: contra_rc_d3d11.log
dxgi.log: contra_rc_dxgi.log

Tested froggi.es builds:

master - 291f7e05 (❌)
1.7 - 2e37825 (❌)
1.6 - 9c7945d9 (❌)
1.5.5 - 1e426cdb (❌)

Ddoitsujin maintainer 2020-06-26 github

Thanks for providing the trace, I can confirm it's a bug on our end that shouldn't be too hard to fix.

Ddoitsujin maintainer 2020-06-27 github

Actually - there is no useful way to fix this. The game tries to create an R16_FLOAT view on a D16_UNORM image, and there is no way to do this in Vulkan. To be perfectly honest, this seems like a game bug - even though D3D11 allows it, this seems unintended since the game cannot meaningfully reinterpret UNORM depth data as floats.

Ddoitsujin maintainer 2020-06-27 github

I made a hacky workaround in the contra branch. Please note that this is not a correct fix, but should get you past the crash.

VViNi-Arco 2020-07-06 github

@ZereoX please test Mr. Philip's correction, I intend to buy CONTRA: ROGUE CORPS on Steam, while in the promotion.

any doubt just use this command in the terminal to get this branch:
git clone https://github.com/doitsujin/dxvk.git -b contra --single-branch

ZZereoX 2020-07-06 github

Hi @doitsujin ,

I tested the contra branch with Proton 5.0-9 and can confirm that it does allow the game to proceed past the Konami screen, but now the title fails with an err: D3D11: Cannot create texture after the initial loading (directly after pressing start on the title screen):

err:   D3D11: Cannot create texture:
err:     Format:  103
err:     Extent:  1920x1080x1
err:     Samples: 1
err:     Layers:  1
err:     Levels:  1
err:     Usage:   400
err:     Flags:   0
err:   D3D11: Cannot create texture:
err:     Format:  103
err:     Extent:  1920x1080x1
err:     Samples: 1
err:     Layers:  1
err:     Levels:  1
err:     Usage:   400
err:     Flags:   0

The game appears to start the playback of a video (Microsoft Media Foundation), so I confirmed that the failure is also present with Proton-5.9-GE-3-ST and on Windows 10. I've attached an update log as well as a longer API trace that includes the beginning of the video playback.

DXVK-contra
DXVK-contra-branch

Trace:

Link: https://drive.google.com/file/d/1zBhmLJyqKhzyfn9e6HEq1fUhBLUpObwx/view?usp=sharing

Log:

contra_rc_d3d11.log
contra_rc_dxgi.log

Sorry for the delayed response, I was away last week.

KK0bin maintainer 2020-07-06 github

DXGI_FOMRAT 103 is DXGI_FORMAT_NV12 = 0x67

Ddoitsujin maintainer 2020-07-06 github

Yeah we don't support that. Considering how much of a mess YCbCr support is in both D3D11 and Vulkan, I don't think it's feasible to implement it in DXVK, especially since the whole project was not made with multiplanar formats in mind.

I'll take a look, but yeah, can't promise anything.

ZZereoX 2021-06-15 github

Hi @doitsujin,

I confirmed the issue is resolved on Windows in DXVK v1.9 without any of the changes from the contra branch. Title can now proceed past the Konami logo and video playback functions correctly.

Note: Proton-Experimental (and 6.3-4) is still crashing in Wine immediately after the title card with DXVK v1.9. It also still requires d3dcompiler_47 to launch. I'll investigate and file a ticket on the wine side of things for that.

Thanks.

Video Gameplay
image image

Proton versions