[radv] Ender Lilies DX11 crash/assert/hang
The windows version of Ender Lilies with it's default DX11 renderer on DXVK crashes in a specific spot on RADV with a very high likelihood. With a debug build, it hits the following assertion: radv_amdgpu_cs.c:847: radv_amdgpu_winsys_cs_submit_chained: Assertion cs->base.cdw + 4 <= cs->base.max_dw' failed.
It also rarely seems to cause a gpu hang in this very same spot, I'd say about 1/20 runs.
GDB backtrace:
#4 0x00007f6bc5cad9af in radv_amdgpu_winsys_cs_submit_chained (initial_preamble_cs=0x7f6b88001e20, cs_count=2, cs_array=0x7f6b88008600, sem_info=0x253ef640, queue_idx=0, _ctx=0x7f994a40) at ../../home/oschowa/mnt/data/_home/storage/builds/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c:847
next = 0x7f6b6c000be0
cs = 0x7f6b6c008f10
i = 0
ctx = 0x7f994a40
number_of_ibs = 1
handles = 0x0
ibs = {{
flags = 0,
ib_mc_address = 18446603340516810752,
size = 256
}, {
flags = 11727400562540598272,
ib_mc_address = 18446603341256065024,
size = 4294967176
}}
cs0 = 0x7f6b6c008f10
aws = 0x7fac2680
request = {
ip_type = 2281738968,
ip_instance = 32619,
ring = 0,
handles = 0x7f6b00000000,
num_handles = 2141710976,
number_of_ibs = 0,
ibs = 0x7f6b6c010e90,
seq_no = 72057594037927936
}
num_handles = 0
result = <optimized out>
__PRETTY_FUNCTION__ = '\000' <repeats 36 times>
cs = <optimized out>
result = <optimized out>
__PRETTY_FUNCTION__ = '\000' <repeats 28 times>
#5 radv_amdgpu_winsys_cs_submit (_ctx=0x7f994a40, queue_idx=0, cs_array=0x7f6b88008600, cs_count=2, initial_preamble_cs=0x7f6b88001e20, continue_preamble_cs=0x0, sem_info=0x253ef640, can_patch=true) at ../../home/oschowa/mnt/data/_home/storage/builds/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c:1183
cs = <optimized out>
result = <optimized out>
__PRETTY_FUNCTION__ = '\000' <repeats 28 times>
#6 0x00007f6bc59cc984 in radv_queue_submit_deferred (submission=0x7f6b88009200, processing_list=0x253ef780) at ../../home/oschowa/mnt/data/_home/storage/builds/mesa/src/amd/vulkan/radv_device.c:4730
initial_preamble = 0x7f6b88001e20
j = <optimized out>
cs_array = 0x7f6b88008600
queue = 0x7f95fce0
ctx = 0x7f994a40
max_cs_submission = 192
can_patch = true
advance = 2
sem_info = {
cs_emit_signal = true,
cs_emit_wait = true,
wait = {
syncobj_count = 0,
syncobj_reset_count = 0,
timeline_syncobj_count = 0,
syncobj = 0x0,
points = 0x0
},
signal = {
syncobj_count = 1,
syncobj_reset_count = 0,
timeline_syncobj_count = 0,
syncobj = 0x7f6b880086e0,
points = 0x7f6b880086e0
}
}
result = VK_SUCCESS
initial_preamble_cs = 0x7f6b88000c70
initial_flush_preamble_cs = 0x7f6b88001e20
continue_preamble_cs = 0x0
__PRETTY_FUNCTION__ = '\000' <repeats 26 times>
#7 0x00007f6bc59d85df in radv_process_submissions (processing_list=<optimized out>) at ../../home/oschowa/mnt/data/_home/storage/builds/mesa/src/amd/vulkan/radv_device.c:4786
submission = 0x7f6b88009200
result = <optimized out>
deferred = 0x7f6b88009200
result = <optimized out>
processing_list = {
prev = 0x253ef780,
next = 0x253ef780
}
__PRETTY_FUNCTION__ = '\000' <repeats 17 times>
#8 radv_queue_submit (queue=<optimized out>, submission=<optimized out>) at ../../home/oschowa/mnt/data/_home/storage/builds/mesa/src/amd/vulkan/radv_device.c:4936
deferred = 0x7f6b88009200
result = <optimized out>
processing_list = {
prev = 0x253ef780,
next = 0x253ef780
}
__PRETTY_FUNCTION__ = '\000' <repeats 17 times>
#9 0x00007f6bc59e0676 in radv_QueueSubmit (_queue=0x7f95fce0, submitCount=1, pSubmits=0x24de00d0, fence=0x7f6b6c010e90) at ../../home/oschowa/mnt/data/_home/storage/builds/mesa/src/amd/vulkan/radv_device.c:5003
wait_dst_stage_mask = <optimized out>
timeline_info = 0x0
i = <optimized out>
queue = <optimized out>
result = <optimized out>
fence_idx = <optimized out>
flushed_caches = <optimized out>
#10 0x00007f6cda962d64 in wine_vkQueueSubmit ()
847 assert(cs->base.cdw + 4 <= cs->base.max_dw);
(gdb) print cs->base
$2 = {
cdw = 20480,
max_dw = 20476,
buf = 0x7f6be86f7000
}
How to reproduce:
- Download the windows version of the game on steam, to do that go into properties -> compatibility and force proton for the game. (It has a unofficial linux build that gets downloaded otherwise, but that has some problems with audio.)
- Start the game once to generate the compatdata/wineprefix.
- Extract these save files into
$steamlib/steamapps/compatdata/1369630/pfx/drive_c/users/steamuser/AppData/Local/EnderLilies/Saved/SaveGames
: EnderLiliesSav.zip - Load the first save slot and proceed in the game according to this video, the crash/assert is trigger 9/10 times in the spot at the end of the video: EnderLiliesCrashRepro
There are no vulkan validation errors. An apitrace of the game replayed with DXVK doesn't seem to reproduce the problem. It happens also with an older version of DXVK (v1.7.1). It works fine with AMDVLK. I don't know if it's a RADV regression, 21.3.2 seems to not crash, but bisecting turned out to be futile due to the somewhat random nature of the bug.
My setup:
- Arch Linux kernel 5.15.6
- RX 6700XT
- Mesa 21.3.2 or latest main
- Proton Experimental
- DXVK 1.9.2, 1.7.1 or master