mesa: gate lazy L2 writeback on rb_noncoherent_dirty, not the adapter probe #6
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/Skrills68--Valhalla-xmem!6
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-6"
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?
@thedee8086 on GitHub · 2026-12-01 03:17 UTC · original
thedee8086:pr/lazy-l2-gate→main· +1 −1 · 1 files · 1 commits · openProblem
can_skip_buffer_l2_flushes()keys offtcc_rb_non_coherent, which is only true when the TCC count is non-power-of-two and RBs differ from TCCs. On Navi 10/21/31 (gfx103x, gfx1100) it is false, so the lazy L2 writeback path never engages on those cards: every buffer<->CPU transition pays a fullINV_L2, doubled across chiplets on XTX-class parts.This likely also explains why the upstream flicker repro does not reproduce on RDNA3 test boxes.
Fix
The command buffer already tracks the same condition dynamically as
state.rb_noncoherent_dirty. Gate on that instead — one line inpatches/mesa.patch.Testing
RX 7900 XTX, RDNA3, the tested title, unified-memory path: lazy path now engages (verified via RADV_DEBUG traces); no visual regressions over a multi-hour session; frame pacing improved. Happy to rebase or re-measure on other gfx levels.
@thedee8086 on GitHub · 2026-12-01 03:29 UTC · original
Field data from the tested title, RX 7900 XTX (gfx1100), 1440p FSR 4 Quality + frame generation, unified-memory path:
A/B frame-pacing numbers (same binary, gate on vs off, scripted route with median/p90/>38ms bands) to follow in a second comment; the on/off pair is already wired here.
@thedee8086 on GitHub · 2026-12-01 06:43 UTC · original
Second comment as promised: A/B frame-pacing numbers, gate on vs off — same binary, same machine (RX 7900 XTX), same scripted route from an identical save snapshot (restored before every run), 1440p FSR 4 Quality + frame generation, ~5 min in-world per run, 5 s frame-pacing windows from the runtime's own timer log, first 180 s of each run discarded (boot/load/spawn).
Heads-up on methodology: the title's frame limiter pins in-world pacing at 60 presented / 30 base frames, so medians are identical by construction. The signal lives in the tails:
Honest read: in limiter-capped free roam the gate is within noise on every metric — as expected when the GPU has headroom at the cap. The gate should matter where buffer<->CPU transitions are dense and the GPU is the bottleneck; this title's limiter hides that.
Two side observations from the same harness (same route, several runs each):
Happy to re-run against a limiter-off or GPU-bound scene if that would make the numbers more useful here.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.