protonscr

Spurious sync issues with test_read_subresource_rt/test_planar_video_formats on RADV

vkd3dclosed
HansKristian-Work/vkd3d-proton#3368 · opened 2026-10-13 by hakzsam · updated 2026-10-13 · 2 comments · github
Hhakzsam 2026-10-13 github

RADV recently switched to use compute shaders for fill/copy operations more often instead of CP DMA which is slow. The two mentioned regressions started with 7cee8ab59b39ea25ef14856670785ff364ee4e64 (RADV commit) which means RADV uses compute shaders for fill/copy operations when CP DMA doesn't support L2 (ie. GFX6, GFX12).

Since that commit, test_read_subresource_rt/test_planar_video_formats started to fail on TAHITI (GFX6) but RADV_DEBUG=fullsync fixes both.

After investigating this, it seems vkd3d is missing a barrier after vkCmdFillBuffer(). In test_read_subresource_rt, it allocates memory, binds a buffer to it at offset=0 (size is 16MiB), then it binds an image to it at offset=0 (aliased memory). It emits a barrier with src/dst as NONE, so it's a noop. All commands are recorded in the same cmdbuf.

Looks like a synchronization issue in vkd3d-proton and barrier is missing after vkCmdFillBuffer(). The RADV commit only uncovered it.

Ddoitsujin maintainer 2026-10-13 github

There was indeed no synchronization between clearing a suballocated heap and subsequent WriteToSubresource calls, PR above should hopefully fix it.

Hhakzsam 2026-10-13 github

I can test the PR once it's ready to land (just because I would have to unplug/plug the GPU again).

Launch options