Repository navigation
AMD: the fragment shuffle fallback on RADV too (RDNA1 flicker) - #1893
CleoMenezesJr wants to merge 1 commit into
Conversation
ac3e843 to
0bd16f3
Compare
…ing while moving) On an RX 5500 XT (RDNA1, Mesa RADV, compute mesh fallback) objects such as the ladder of Link's house flipped frame to frame between right, speckled and glowing white while moving. RX_VK_FRAG_SHUFFLE_FALLBACK=1 alone removed it; descriptor reuse, sampler cache, mirror, fences, barriers and live handles did not. The fallback was on for AMD's proprietary driver only. Tested on RDNA1 only; other RADV GPUs untested. RX_VK_FRAG_SHUFFLE_FALLBACK=0 keeps native shuffles. It is in the program cache stamp, so RADV retranslates once.
0bd16f3 to
f6eaccc
Compare
Joey-Magnus
left a comment
There was a problem hiding this comment.
The change is one line, and the test passes on current main (I merged it locally and ran tests/test_amd_fragment_warp.py). But two things changed since you bisected. #1657 merged after this was opened. It handles RDNA1's wave32/wave64 stages: unpinned stages now take subgroup_max, which was the RX 5500 XT family's problem, and that may be what fixed the ladder. Could you re-run the same spot on current main without this patch, with RX_VK_FRAG_SHUFFLE_FALLBACK unset? Second, this turns the fallback on for every RADV device, Steam Deck included. On RADV max_subgroup_size is 64, so each fragment shuffle becomes 64 broadcasts and selects (ShuffleAbsolute in emit_spirv_warp.cpp). That's the most-used Linux AMD tier, and the cost hasn't been measured. If the flicker is still there on main, I'd narrow the check to RDNA1 or bring a Deck frame-rate number. CI hasn't run on this branch.
Builds on #1507 (its three commits are included until it is merged; only the last commit is new).
Problem
On an RX 5500 XT (RDNA1 / NAVI14, Mesa RADV, Fedora, no mesh shaders so the compute mesh fallback runs), objects such as the ladder of Link's house in Kokiri Forest flipped frame to frame between correct, speckled/dotted and glowing white while moving or turning the camera (the "moving" half of #1126 / #997).
Bisect
Switches set in the game folder's hookshot_env.txt, same spot each run:
Change
has_broken_spirv_fragment_shuffleis now on forVK_DRIVER_ID_MESA_RADVas well asVK_DRIVER_ID_AMD_PROPRIETARY.tests/test_amd_fragment_warp.pyis updated and passes.RX_VK_FRAG_SHUFFLE_FALLBACK=0still keeps native shuffles.Testing
Tested on RDNA1 only. Other RADV GPUs (RDNA2/3/4, APUs) are untested. Reports welcome; if it turns out RDNA1-specific, the check can be narrowed.