Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ZereoX opened this issue Jun 26, 2020 · 8 comments
Labels

Comments

@ZereoX
Copy link
Contributor

ZereoX commented Jun 26, 2020

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 (291f7e0). (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 (291f7e0)

Apitrace file(s)

Log files

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

Tested froggi.es builds:

master - 291f7e0 (❌)
1.7 - 2e37825 (❌)
1.6 - 9c7945d (❌)
1.5.5 - 1e426cd (❌)

@doitsujin
Copy link
Owner

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

@doitsujin
Copy link
Owner

doitsujin commented Jun 27, 2020

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.

@doitsujin
Copy link
Owner

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.

@ViNi-Arco
Copy link

@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

@ZereoX
Copy link
Contributor Author

ZereoX commented Jul 6, 2020

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.

@K0bin
Copy link
Collaborator

K0bin commented Jul 6, 2020

DXGI_FOMRAT 103 is DXGI_FORMAT_NV12 = 0x67

@doitsujin
Copy link
Owner

doitsujin commented Jul 6, 2020

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.

@ZereoX
Copy link
Contributor Author

ZereoX commented Jun 15, 2021

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

@ZereoX ZereoX closed this as completed Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants