HansKristian-Work / vkd3d-proton

Fork of VKD3D. Development branches for Proton's Direct3D 12 implementation.
GNU Lesser General Public License v2.1
1.83k stars 191 forks source link

Hellblade: Senua's Sacrifice crashes on RADV when Ray-Tracing is on. #1404

Closed Hadrianneue closed 1 year ago

Hadrianneue commented 1 year ago

Game works on windows when ray-tracing is on, with AMDVLK gives fatal error before launching and RADV crashes when trying to load the game with ray-tracing enabled or while in-game, games such as Resident Evil 3 and Control work fine with VKD3D + RT, i'm using the following env vars: RADV_PERFTEST=rt VKD3D_CONFIG=dxr.

Log:

013c:info:vkd3d_instance_apply_application_workarounds: Detected game HellbladeGame-Win64-Shipping.exe, adding shader quirks for specific shaders.
013c:info:vkd3d_instance_deduce_config_flags_from_environment: shader_cache is used, global_pipeline_cache is enforced.
013c:info:vkd3d_config_flags_init_once: VKD3D_CONFIG='dxr'.
013c:info:vkd3d_get_vk_version: vkd3d-proton - applicationVersion: 2.8.0.
013c:info:vkd3d_instance_init: vkd3d-proton - build: ac8760c00534b0c.
013c:info:vkd3d_memory_info_upload_hvv_memory_properties: Topology: Device heaps are split. Assuming small BAR situation. Using HOST_COHERENT only.
013c:info:vkd3d_bindless_state_get_bindless_flags: Device supports VK_EXT_mutable_descriptor_type.
013c:info:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
013c:info:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
013c:info:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
013c:info:d3d12_device_caps_init_shader_model: Enabling support for SM 6.6.
013c:fixme:d3d12_device_caps_init_feature_options1: TotalLaneCount = 1024, may be inaccurate.
013c:info:d3d12_device_determine_ray_tracing_tier: DXR support enabled.
013c:info:vkd3d_pipeline_library_init_disk_cache: Remapping VKD3D_SHADER_CACHE to: vkd3d-proton.cache.
013c:info:vkd3d_pipeline_library_init_disk_cache: Attempting to load disk cache from: vkd3d-proton.cache.
01ec:info:vkd3d_pipeline_library_disk_thread_main: Performing async setup of stream archive ...
01ec:info:vkd3d_pipeline_library_disk_cache_merge: No write cache exists. No need to merge any disk caches.
01ec:info:vkd3d_pipeline_library_disk_cache_initial_setup: Merging pipeline libraries took 0.224 ms.
01ec:info:vkd3d_pipeline_library_disk_cache_initial_setup: Mapping read-only cache took 0.331 ms.
01ec:info:d3d12_pipeline_library_read_blob_stream_format: Device teardown request received, stopping parse early.
01ec:info:vkd3d_pipeline_library_disk_cache_initial_setup: Parsing stream archive took 0.346 ms.
01ec:info:vkd3d_pipeline_library_disk_thread_main: Done performing async setup of stream archive.
013c:info:vkd3d_get_vk_version: vkd3d-proton - applicationVersion: 2.8.0.
013c:info:vkd3d_instance_init: vkd3d-proton - build: ac8760c00534b0c.
013c:info:vkd3d_memory_info_upload_hvv_memory_properties: Topology: Device heaps are split. Assuming small BAR situation. Using HOST_COHERENT only.
013c:info:vkd3d_bindless_state_get_bindless_flags: Device supports VK_EXT_mutable_descriptor_type.
013c:info:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
013c:info:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
013c:info:vkd3d_bindless_state_add_binding: Device supports VK_EXT_descriptor_buffer!
013c:info:d3d12_device_caps_init_shader_model: Enabling support for SM 6.6.
013c:fixme:d3d12_device_caps_init_feature_options1: TotalLaneCount = 1024, may be inaccurate.
013c:info:d3d12_device_determine_ray_tracing_tier: DXR support enabled.
013c:info:vkd3d_pipeline_library_init_disk_cache: Remapping VKD3D_SHADER_CACHE to: vkd3d-proton.cache.
013c:info:vkd3d_pipeline_library_init_disk_cache: Attempting to load disk cache from: vkd3d-proton.cache.
01f4:info:vkd3d_pipeline_library_disk_thread_main: Performing async setup of stream archive ...
01f4:info:vkd3d_pipeline_library_disk_cache_merge: No write cache exists. No need to merge any disk caches.
01f4:info:vkd3d_pipeline_library_disk_cache_initial_setup: Merging pipeline libraries took 0.893 ms.
01f4:info:vkd3d_pipeline_library_disk_cache_initial_setup: Mapping read-only cache took 0.587 ms.
01f4:info:vkd3d_pipeline_library_disk_cache_initial_setup: Parsing stream archive took 1.105 ms.
01f4:info:vkd3d_pipeline_library_disk_thread_main: Done performing async setup of stream archive.
013c:info:dxgi_vk_swap_chain_init: Creating swapchain (1920 x 1080), BufferCount = 3.
013c:info:dxgi_vk_swap_chain_init_sync_objects: Ensure maximum latency of 3 frames with KHR_present_wait.
013c:info:dxgi_vk_swap_chain_init_waiter_thread: Enabling present wait path for frame latency.
0200:info:dxgi_vk_swap_chain_recreate_swapchain_in_present_task: Got 3 swapchain images.
0180:fixme:rs_desc_from_d3d12: Ignoring MultisampleEnable 0x1.
0200:info:dxgi_vk_swap_chain_recreate_swapchain_in_present_task: Got 3 swapchain images.
0180:fixme:shader_sm4_read_param: Skipping modifier 0x00004000.
.
.
.
0214:fixme:vkd3d_dxbc_compiler_emit_dcl_global_flags: Unhandled global flags 0x21.
.
.
.
0214:fixme:shader_sm4_read_param: Skipping modifier 0x00004000.
01f8:fixme:d3d12_device_Evict: iface 0000000019470030, object_count 14, objects 000000004d52e040 stub!
01f8:fixme:d3d12_device_MakeResident: iface 0000000019470030, object_count 1, objects 0000000079bfd1e0 stub!

Manjaro Linux 6.1.7-1 AMD Radeon RX 6500 XT Intel Xeon E3-1230 V2 Mesa 23.1.0-devel (git-56e758d9e9)

mbriar commented 1 year ago

I think this is a RADV bug, RADV takes almost 2 minutes to compile the ~300 RT pipelines the game has on a single thread. I guess the game might just not expect it to take that long and time out, I'll open a mesa bug report.

mbriar commented 1 year ago

Took a look at this again because I thought it might be the same issue as #1534 - both UE4 titles - but it seems to be something different. It looks like a bunch of stack overflows are happening when trying to load a new game:

...
23821.016:0138:014c:trace:seh:handle_syscall_fault returning to user mode ip=00000002d4ad9d26 ret=c0000005
23821.016:0138:014c:trace:seh:handle_syscall_fault code=c0000005 flags=0 addr=0x7f455fdb74bb ip=7f455fdb74bb tid=014c
23821.016:0138:014c:trace:seh:handle_syscall_fault  info[0]=0000000000000001
23821.016:0138:014c:trace:seh:handle_syscall_fault  info[1]=0000000006210f98
23821.016:0138:014c:trace:seh:handle_syscall_fault  rax=00000000c0000005 rbx=0000000066b00a28 rcx=000000000630e640 rdx=0000000000000000
23821.016:0138:014c:trace:seh:handle_syscall_fault  rsi=0000000066b00a30 rdi=0000000016290080 rbp=000000000620f220 rsp=0000000006210fa0
23821.016:0138:014c:trace:seh:handle_syscall_fault   r8=0000000000000000  r9=0000000000000020 r10=00007f438a1ba240 r11=0000000000000202
23821.016:0138:014c:trace:seh:handle_syscall_fault  r12=0000000000000000 r13=0000000068652e60 r14=0000000066b009d0 r15=0000000000000000
23821.016:0138:014c:err:seh:handle_syscall_fault Syscall stack overrun.
 backtrace: --- Exception 0xc0000005 at 0x7f455fdb74bb: /home/mbriar/Games/SteamApps/common/Proton - Experimental/files/bin/../lib64/wine/x86_64-unix/ntdll.so + 0x4d4bb.
mbriar commented 1 year ago

It loads into gameplay now on latest RADV, there are rendering issues and it hangs the GPU, but I'm pretty sure that's a driver issue as well. This issue can probably be closed.

Hadrianneue commented 1 year ago

It loads into gameplay now on latest RADV, there are rendering issues and it hangs the GPU, but I'm pretty sure that's a driver issue as well. This issue can probably be closed.

Oh nice, thanks, just tested and also launches here too, RT performance is actually good, very close to windows, also had artifacts on reflections on certain angles.

NOTE: had to disable that PR 6833 on RADV to prevent GTT memory usage since my GPU doesn't have enough vram or juice to run it properly otherwise it would hang and crash.