Skip to content

AMD: the fragment shuffle fallback on RADV too (RDNA1 flicker) - #1893

Open
CleoMenezesJr wants to merge 1 commit into
NotRexed:mainfrom
CleoMenezesJr:fix/radv-fragment-shuffle-fallback
Open

CleoMenezesJr wants to merge 1 commit into
NotRexed:mainfrom
CleoMenezesJr:fix/radv-fragment-shuffle-fallback

Conversation

@CleoMenezesJr

Copy link
Copy Markdown

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:

Switches Flicker
RX_VK_NO_DESC_REUSE=1, RX_VK_PICK_BIND_GEN=1 yes
+ RX_VK_PER_QUEUE_FENCES=0, RX_VK_SAMPLER_CACHE=0, RX_VK_MIRROR=0 yes
+ RX_VK_BARRIER_EVERY_DRAW=1, RX_VK_WAIT_GPU=1, RX_VK_HANDLES_LIVE=1, RX_VK_BATCH=0, RX_VK_NO_EVICT=1 yes
RX_VK_WARP64=0 + RX_VK_FRAG_SHUFFLE_FALLBACK=1 no
RX_VK_FRAG_SHUFFLE_FALLBACK=1 alone no

Change

has_broken_spirv_fragment_shuffle is now on for VK_DRIVER_ID_MESA_RADV as well as VK_DRIVER_ID_AMD_PROPRIETARY. tests/test_amd_fragment_warp.py is updated and passes.

  • RX_VK_FRAG_SHUFFLE_FALLBACK=0 still keeps native shuffles.
  • The flag is in the program cache stamp, so RADV users retranslate once.

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.

@CleoMenezesJr
CleoMenezesJr force-pushed the fix/radv-fragment-shuffle-fallback branch 2 times, most recently from ac3e843 to 0bd16f3 Compare November 10, 2026 19:49
…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.
@CleoMenezesJr
CleoMenezesJr force-pushed the fix/radv-fragment-shuffle-fallback branch from 0bd16f3 to f6eaccc Compare November 10, 2026 19:51
@CleoMenezesJr CleoMenezesJr changed the title AMD: the fragment shuffle fallback on RADV too (RDNA1 flicker while moving) AMD: the fragment shuffle fallback on RADV too (RDNA1 flicker) Nov 10, 2026

@Joey-Magnus Joey-Magnus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants