shader: do not carry float/FP16 caches across DPP and SDWA moves #136
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ReTerryDavis--ReVIctory!136
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-135"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@SovietBearz0r on GitHub · 2026-12-05 17:16 UTC · original
SovietBearz0r:dpp-sdwa-float-guard→main· +156 −0 · 4 files · 1 commits · merged 2026-12-05 17:22 UTCThe float and native-FP16 value caches were copied to the destination of a
v_mov_b32/v_cndmask_b32whenever the destination was not SDWA-selected. DPP16/DPP8 lane permutations and SDWA moves that keepdst_sel:DWORDbut select a different source word do change the value, so a later FP32/FP16 consumer read the stale cached bits instead of the lowered ones.Fix
Guard the three propagation sites with
v.dpp.is_none() && v.sdwa.is_none()(the plain-destination check stays for clamp/omod-style SDWA destinations). This is the same guard the RDNA3 fork added; upstream commit985f2af9("keep native FP16 chains across v_cmp_f16, v_fma_mix, v_mov_b32, and v_cndmask_b32") is in main, so the bug is live here too.Verification
cargo test -p victory-shader --lib: 323 passed, 0 failed, 2 ignored (~4.5 min), including three new regression tests with native FP16 forced on the test thread:v_mov_b32_dpp_does_not_propagate_stale_float_caches(f32 and f16 DPP moves),v_mov_b32_sdwa_dword_dst_does_not_propagate_stale_float_caches(f32 and f16 SDWA word select),v_cndmask_b32_sdwa_and_dpp_do_not_propagate_stale_f16_vals.TEST_NATIVE_FP16thread-local test override (same pattern as the existingTEST_HW_BVH), so the native-FP16 path is actually exercised.Source: ReVictory-RDNA3 PR #39 (guards + tests adapted; the tests use this tree's build/run helpers).