protonscr

Forspoken vkd3d related errors

vkd3dclosed
HansKristian-Work/vkd3d-proton#1717 · opened 2023-09-29 by Hadrianneue · updated 2024-12-08 · 17 comments · github
HHadrianneue 2023-09-29 github

Forspoken got updated today with FSR 3 Frame Generation, now the screen flickers constantly and trying to turn on FG crashes immediately, two error section caught my eye, one happens before trying to enable FG:


16424.738:012c:020c:err:vkd3d-proton:vkd3d_dxil_log_callback: dxil-spirv: Unimplemented DXIL opcode 50
16424.738:012c:020c:err:vkd3d-proton:vkd3d_dxil_log_callback: dxil-spirv: Failed to emit instruction.
16424.738:012c:020c:err:vkd3d-proton:vkd3d_dxil_log_callback: dxil-spirv: Failed to convert function.
16424.738:012c:020c:warn:vkd3d-proton:vkd3d_compile_shader_stage: Failed to compile shader, vkd3d result -3.
16424.738:012c:020c:warn:vkd3d-proton:d3d12_pipeline_state_init_compute: Failed to create Vulkan compute pipeline, hr 0x80070057.

and the crash after enabling FG:

Backtrace:
=>0 0x000001caf9fc35 in d3d12core (+0x20fc35) (0x000000130132b0)
  1 0x00000006bf59e5 in lmfsrb (+0x59e5) (0x00000013013769)
  2 0x00000006bf5ffe in lmfsrb (+0x5ffe) (0x00000013013900)
  3 0x00000006c16a37 in lmfsrb (+0x26a37) (0x00000013013900)
  4 0x00000006c13995 in lmfsrb (+0x23995) (0x00000013019200)
  5 0x00000006c12d5b in lmfsrb (+0x22d5b) (0x00000013019200)
  6 0x00000006bfba49 in lmfsrb (+0xba49) (0x00000013019900)
  7 0x000001443bc861 in forspokendemo (+0x43bc861) (0000000000000000)
  8 0x000001443eeb64 in forspokendemo (+0x43eeb64) (0x0000001301f430)
  9 0x000001444390d5 in forspokendemo (+0x44390d5) (0x00045b60708f01)
  10 0x000001443f7d79 in forspokendemo (+0x43f7d79) (0x0000001301fa40)
  11 0x0000014441e12c in forspokendemo (+0x441e12c) (0x00000149aaf388)
  12 0x00000143dfd73f in forspokendemo (+0x3dfd73f) (0x0000001301ff60)
  13 0x000002c748f62c in ucrtbase (+0x1f62c) (0x0000001301ff60)
  14 0x0000007b6146ed in kernel32 (+0x146ed) (0x0000001301ffa0)
  15 0x0000017000f1a7 in ntdll (+0xf1a7) (0000000000000000)
0x000001caf9fc35 d3d12core+0x20fc35: movl    0x00000000001028,%eax
Modules:
Module    Address                    Debug info    Name (182 modules)

Software information

Forspoken (Demo)

System information

  • GPU: RX 6700 XT
  • Driver: mesa-git RADV
  • Wine version: Proton Experimental bleeding edge
  • VKD3D-Proton version: 2.10.0/1.3.261

Log files

steam-2228080.log

Ddoitsujin maintainer 2023-09-29 github

We're aware of these issues, the flickering is random and doesn't always happen on my end, which makes debugging it a massive pain in the arse, and it's very likely some insane synchronization bug in the game itself. Enabling frame generation also fixes it here. Not sure if there's anything we can do here.

As for frame gen, this dxil-spirv branch implements a missing instruction.

HHansKristian-Work maintainer 2023-09-29 github

Fixed on master.

Llorenzo0932 2023-09-29 github

I have compiled the master branch and replaced the d3d12.dll and d3d12core.dll files in both lib and lib64 and there is still the flickering problem.

If I made a mistake in replacing the dlls please let me know.

System information

GPU: RX 6700 not XT

Driver: mesa RADV

Wine version: Proton-GE with dll in VKD3D proton recompiled

VKD3D-Proton version: 2.10.0/1.3.261
Mmbriar 2023-09-29 github

without a log it's not possible to tell if you made a mistake replacing the dlls.

Llorenzo0932 2023-09-29 github

without a log it's not possible to tell if you made a mistake replacing the dlls.

sure thing, but log of what? i run the game with VKD3D_DEBUG and VKD3D_LOG_FILE=/home/lorenzo/test.txt and this is the generated log:

0134:info:vkd3d_instance_apply_application_workarounds: Program name: "FORSPOKENDemo.exe" (hash: 41a5fe62eb747625)
0134:info:vkd3d_instance_deduce_config_flags_from_environment: shader_cache is used, global_pipeline_cache is enforced.
0134:info:vkd3d_config_flags_init_once: VKD3D_CONFIG=''.
0134:info:vkd3d_get_vk_version: vkd3d-proton - applicationVersion: 2.10.0.
0134:info:vkd3d_instance_init: vkd3d-proton - build: 4bf519dfd372fe0.
0134:info:vkd3d_memory_info_upload_hvv_memory_properties: Topology: No more than 1 device local heap, assuming ReBAR-style access. Using DEVICE_LOCAL | HOST_COHERENT for UPLOAD.
0134:info:vkd3d_memory_info_init_budgets: Applying resizable BAR budget to memory types: 0x218.
0134:info:vkd3d_bindless_state_get_bindless_flags: Enabling fast paths for advanced ExecuteIndirect() graphics.
0134:info:vkd3d_bindless_state_get_bindless_flags: Device supports VK_EXT_mutable_descriptor_type.
0134:info:vkd3d_bindless_state_get_bindless_flags: Device supports ultra-fast path for descriptor copies.
0134:info:vkd3d_bindless_state_get_bindless_flags: Device supports packed metadata path for descriptor copies.
0134:info:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
0134:info:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
0134:info:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
0134:info:d3d12_device_caps_init_shader_model: Enabling support for SM 6.6.
0134:fixme:d3d12_device_caps_init_feature_options1: TotalLaneCount = 2304, may be inaccurate.
0134:info:vkd3d_pipeline_library_init_disk_cache: Remapping VKD3D_SHADER_CACHE to: vkd3d-proton.cache.
0134:info:vkd3d_pipeline_library_init_disk_cache: Attempting to load disk cache from: vkd3d-proton.cache.
017c:info:vkd3d_pipeline_library_disk_thread_main: Performing async setup of stream archive ...
017c:info:vkd3d_pipeline_library_disk_cache_merge: No write cache exists. No need to merge any disk caches.
017c:info:vkd3d_pipeline_library_disk_cache_initial_setup: Merging pipeline libraries took 0.269 ms.
017c:info:vkd3d_pipeline_library_disk_cache_initial_setup: Mapping read-only cache took 0.195 ms.
017c:info:d3d12_pipeline_library_read_blob_stream_format: Device teardown request received, stopping parse early.
017c:info:vkd3d_pipeline_library_disk_cache_initial_setup: Parsing stream archive took 0.016 ms.
017c:info:vkd3d_pipeline_library_disk_thread_main: Done performing async setup of stream archive.
0134:info:vkd3d_get_vk_version: vkd3d-proton - applicationVersion: 2.10.0.
0134:info:vkd3d_instance_init: vkd3d-proton - build: 4bf519dfd372fe0.
0134:info:vkd3d_memory_info_upload_hvv_memory_properties: Topology: No more than 1 device local heap, assuming ReBAR-style access. Using DEVICE_LOCAL | HOST_COHERENT for UPLOAD.
0134:info:vkd3d_memory_info_init_budgets: Applying resizable BAR budget to memory types: 0x218.
0134:info:vkd3d_bindless_state_get_bindless_flags: Enabling fast paths for advanced ExecuteIndirect() graphics.
0134:info:vkd3d_bindless_state_get_bindless_flags: Device supports VK_EXT_mutable_descriptor_type.
0134:info:vkd3d_bindless_state_get_bindless_flags: Device supports ultra-fast path for descriptor copies.
0134:info:vkd3d_bindless_state_get_bindless_flags: Device supports packed metadata path for descriptor copies.
0134:info:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
0134:info:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
0134:info:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
0134:info:d3d12_device_caps_init_shader_model: Enabling support for SM 6.6.
0134:fixme:d3d12_device_caps_init_feature_options1: TotalLaneCount = 2304, may be inaccurate.
0134:info:vkd3d_pipeline_library_init_disk_cache: Remapping VKD3D_SHADER_CACHE to: vkd3d-proton.cache.
0134:info:vkd3d_pipeline_library_init_disk_cache: Attempting to load disk cache from: vkd3d-proton.cache.
0134:fixme:d3d12_command_queue_init: Ignoring priority 0x64.
0184:info:vkd3d_pipeline_library_disk_thread_main: Performing async setup of stream archive ...
0184:info:vkd3d_pipeline_library_disk_cache_merge: No write cache exists. No need to merge any disk caches.
0184:info:vkd3d_pipeline_library_disk_cache_initial_setup: Merging pipeline libraries took 0.355 ms.
0184:info:vkd3d_pipeline_library_disk_cache_initial_setup: Mapping read-only cache took 0.231 ms.
0184:info:vkd3d_pipeline_library_disk_cache_initial_setup: Parsing stream archive took 6.555 ms.
0184:info:vkd3d_pipeline_library_disk_thread_main: Done performing async setup of stream archive.
0134:fixme:d3d12_command_queue_init: Ignoring priority 0x64.
0134:info:dxgi_vk_swap_chain_init: Creating swapchain (1280 x 720), BufferCount = 3.
0134:info:dxgi_vk_swap_chain_init_sync_objects: Enabling frame latency handles.
0134:info:dxgi_vk_swap_chain_init_sync_objects: Ensure maximum latency of 3 frames with KHR_present_wait.
0134:info:dxgi_vk_swap_chain_init_waiter_thread: Enabling present wait path for frame latency.
0134:fixme:d3d12_command_queue_init: Ignoring priority 0x64.
0134:fixme:d3d12_command_queue_init: Ignoring priority 0x64.
0134:info:dxgi_vk_swap_chain_init: Creating swapchain (1280 x 720), BufferCount = 3.
0134:info:dxgi_vk_swap_chain_init_sync_objects: Enabling frame latency handles.
0134:info:dxgi_vk_swap_chain_init_sync_objects: Ensure maximum latency of 3 frames with KHR_present_wait.
0134:info:dxgi_vk_swap_chain_init_waiter_thread: Enabling present wait path for frame latency.
0134:fixme:d3d12_command_queue_init: Ignoring priority 0x64.
01c0:info:dxgi_vk_swap_chain_recreate_swapchain_in_present_task: Got 5 swapchain images.
01c0:info:dxgi_vk_swap_chain_recreate_swapchain_in_present_task: Got 5 swapchain images.
0134:info:dxgi_vk_swap_chain_ChangeProperties: Reallocating swapchain (2560 x 1080), BufferCount = 3.
0134:fixme:vkd3d_set_view_swizzle_for_format: Alpha swizzle is not supported.
0134:fixme:vkd3d_set_view_swizzle_for_format: Alpha swizzle is not supported.
0134:fixme:vkd3d_set_view_swizzle_for_format: Alpha swizzle is not supported.
0134:fixme:vkd3d_set_view_swizzle_for_format: Alpha swizzle is not supported.
0134:fixme:vkd3d_set_view_swizzle_for_format: Alpha swizzle is not supported.
0134:fixme:vkd3d_set_view_swizzle_for_format: Alpha swizzle is not supported.
01c0:info:dxgi_vk_swap_chain_recreate_swapchain_in_present_task: Got 5 swapchain images.
01c0:info:dxgi_vk_swap_chain_recreate_swapchain_in_present_task: Got 5 swapchain images.
01c0:info:dxgi_vk_swap_chain_recreate_swapchain_in_present_task: Got 5 swapchain images.
0184:info:vkd3d_pipeline_library_disk_thread_main: Pipeline cache marked dirty. Flush is scheduled.
0184:info:vkd3d_pipeline_library_disk_thread_main: Flushing disk cache (wakeup counter since last flush = 13). It seems like application has stopped creating new PSOs for the time being.
Mmbriar 2023-09-29 github

0134:info:vkd3d_instance_init: vkd3d-proton - build: 4bf519dfd372fe0.

looks like you replaced the correct dlls and it's using a build of latest master.

Llorenzo0932 2023-09-29 github

0134:info:vkd3d_instance_init: vkd3d-proton - build: 4bf519d.

looks like you replaced the correct dlls and it's using a build of latest master.

So the flickering problem is still there, if you want any other information tell me. For now i will say this issue should be reopened.

CCrashTD 2023-09-29 github

can confirm not fixed. running proton bleeding-edge. still flickers like crazy.
steam-2228080.log

edit
it does work fine if i activate FG. for the option to show up i have to set VKD3D_FEATURE_LEVEL=12_2.
but i consider that a rather hacky workaround that forces the use of a unwanted option. plus it spams the log with
3146.998:00cc:01b8:err:vkd3d-proton:vkd3d_waiting_event_signal: Failed to signal event, hr #80004005.

Aakdean 2023-09-30 github

I'm still getting flickering after compiling master and trying it in a new Proton bundle, but am I right in thinking I might need to compile DXVK master too for this?

Testing in the Forspoken Demo as it's free...

Ddreamhunt 2023-09-30 github

I can confirm it's not fixed - flickering like hell.

Ddoitsujin maintainer 2023-10-02 github

The flickering does not look like it's fixable on our end.

HHadrianneue 2023-10-02 github

The flickering does not look like it's fixable on our end.

also happens on windows with dxvk + vkd3d.

Ooscarbg 2023-10-17 github

@Hadrianneue how you test dxvk+vkd3d on Windows?
at least on Forspoken demo 1.22 I get a message box saying dxgi.dll signature invalid upon demo launch..

HHadrianneue 2023-10-17 github

@Hadrianneue how you test dxvk+vkd3d on Windows? at least on Forspoken demo 1.22 I get a message box saying dxgi.dll signature invalid upon demo launch..

i can't link it here but look for 'cyberfsr' github page and get into its discord, you can find instructions there.

BBlisto91 2023-11-11 github

Flickering issue seems to have been solved with the new game update.

Edit: Only when the game sees a Steam Deck. Which is default for this game on Steam

RReonu 2024-12-07 github

Any chance this could be revisited? @doitsujin

I understand that you reached the conclusion that this is likely a game bug, and I assume you were expecting the developer to fix it at some point. However, the game will never be updated again, now that the developer has been disbanded. So this game will be forever broken on Linux if it doesn't get addressed from Proton's and/or DXVK's end.

If there's any chance a workaround can be found (other than enabling FSR3 frame generation which is not a real fix especially since it also forces you to use FSR3's TAA so you can no longer have a sharp image), that'd be neat. If there's really no way then oh well, but considering the game works fine and never flickers on native DX12... there must be a way, right?

PS: Apparently the game doesn't flicker if you set the SteamDeck=1 env var (which is set by default on Linux now apparently, you need to manually set SteamDeck=0 to get the flickering). However, this also locks you into lower quality graphical settings so it's still a lame solution. But knowing that the game has a code path that resolves the flicker might hopefully be something that can be investigated in order to find a workaround in DXVK? Just throwing an idea out there.

In a nutshell:
SteamDeck=1 with our without FSR3 (default if you launch the game with no launch parameters): No flickering, but you're locked into way lower graphical quality, game looks ugly as sin
SteamDeck=0 without FSR3: Flickering
SteamDeck=0 with FSR3 Frame Generation: No flickering but you have to put up with FSR3.

Thanks!

Ddoitsujin maintainer 2024-12-08 github

I don't know what to do about this if the game just uses the wrong image. There's also a non-zero chance that there's some incorrect discard happening somewhere in combination with memory aliasing (this plagued the Monster Hunter Wilds beta), in which case RADV_DEBUG=nodcc might help, but root causing this properly and trying to find a workaround - which migth not even be possible - is simply going to be a huge waste of time for a game that nobody plays.

Proton versions

Launch options

DLLs

Error codes