protonscr

Horizon Zero Dawn freezes after loading if force_static_cbv is set

vkd3dclosed
HansKristian-Work/vkd3d-proton#933 · opened 2021-11-30 by T9000000 · updated 2023-11-09 · 5 comments · github
TT9000000 2021-11-30 github

Description

Horizon Zero Dawn will unrecoverably freeze right after loading a save if force_static_cbv is set. The freeze occurs when the load bar is complete, presumably as the level is about to be loaded.

Without force_static_cbv saves load normally and the game is playable at 25-30 fps.

Setup Details

Game: Horizon Zero Dawn
GPU: NVIDIA GeForce GTX 1070 Ti:
Driver: 470.86.0
Vulkan: 1.2.175
Vkd3d-proton application version: 2.5.0
Wine: lutris-fshack-6.21-5-x86_64

Steps to Reproduce

Set environment variable VK_CONFIG=force_static_cbv, launch HZD and start a new game or load a save. Wait until load screen finishes

Log files

log file setting VKD3D_DEBUG to trace is too large for github apparently (38 mb) but here is the preamble and tail, if there is a work around let me know and I will submit the full log

0104:info:vkd3d_config_flags_init_once: VKD3D_CONFIG='force_static_cbv, vk_debug'.
0104:info:vkd3d_get_vk_version: vkd3d-proton - applicationVersion: 2.5.0.
0104:info:vkd3d_instance_init: vkd3d-proton - build: db89d403d630f22.
0104:info:vkd3d_memory_info_init_budgets: Applying resizable BAR budget to memory types: 0x0.
0104:warn:vkd3d_is_linear_tiling_supported: Attempting to create linear image, but not supported.
usage: 0x1f, flags: 0, fmt: 37, image_type: 1
0104:info:vkd3d_bindless_state_get_bindless_flags: Device does not support VK_VALVE_mutable_descriptor_type.
0104:fixme:d3d12_device_caps_init_feature_options1: TotalLaneCount = 2432, may be inaccurate.
0104:info:vkd3d_get_vk_version: vkd3d-proton - applicationVersion: 2.5.0.
0104:info:vkd3d_instance_init: vkd3d-proton - build: db89d403d630f22.
0104:info:vkd3d_memory_info_init_budgets: Applying resizable BAR budget to memory types: 0x0.
0104:warn:vkd3d_is_linear_tiling_supported: Attempting to create linear image, but not supported.
usage: 0x1f, flags: 0, fmt: 37, image_type: 1
0104:info:vkd3d_bindless_state_get_bindless_flags: Device does not support VK_VALVE_mutable_descriptor_type.
0104:fixme:d3d12_device_caps_init_feature_options1: TotalLaneCount = 2432, may be inaccurate. 

...

0158:warn:skip_dword_unknown: Skipping 4 unknown DWORDs:
0158:warn:skip_dword_unknown: 	0x58fdcb07
0158:warn:skip_dword_unknown: 	0xc0a6dd23
0158:warn:skip_dword_unknown: 	0x13db2f54
0158:warn:skip_dword_unknown: 	0x6b30a6a0

Edit: I can just split the log files

hzd-vkd3d-1.log
hzd-vkd3d-2.log

Ddoitsujin maintainer 2021-12-02 github

From the readme:

force_static_cbv - Unsafe speed hack on NVIDIA. May or may not give a significant performance uplift.

Emphasis mine. This is not expected to work for all games and I don't think this is worth investigating in any way.

TT9000000 2021-12-02 github

force_static_cbv - Unsafe speed hack on NVIDIA. May or may not give a significant performance uplift.

indubitably, however others have had success Horizon Zero Dawn with a similar setup (pascal 1070, 1080)
random reddit thread discussing use the flag in HZD

So I was merely curious as to why, perhaps updated nvidia drivers broke the hack?

Ggardotd426 2021-12-07 github

I can't speak for anyone but if you actually spent the time to bisect the issue with git bisect and actually find a bad commit, a) the devs might be more willing to help (though in this particular instance I doubt it) but also b) you could patch out that commit yourself and have your own build. These guys are so busy if there's anything that is remotely "optional" or a "nice-to-have" (which is exactly the situation here), you should always try and do as much of the work for them as you can.

But yeah force_static_cbv should essentially be viewed as "here guys, this is an envvar that you can use but it's not safe and it has zero guarantees and we're not going to fix any issues it causes, it's just something you can try, it might work, it might not."

TT9000000 2021-12-07 github

Thanks @gardotd426, I haven't done a git bisect but I've tried multiple older versions of vk3d3-proton and none worked, even 2.3 which another user in the thread I linked reported using.

I'm still investigating but I'm not sure the regression was in vkd3d, maybe an driver update or a Horizon Zero Dawn patch? I'm not knowledgable in Vulkan or graphics APIs to really understand what the flag does and what could go wrong by enabling it. In any case I appreciate the help.

BBlisto91 2023-02-14 github

@T9000000 Friendly ping. Are you still experiencing issues?

Launch options

Error codes