VICTORY_MEMORY_PEEL + VICTORY_MEMORY_UINT4: uniform views for walkers' loads by address #39
No reviewers
Labels
No labels
accessibility
bug
crash
documentation
duplicate
enhancement
good first issue
graphics
help wanted
invalid
needs logs
performance
question
rdna2
rdna3
rdna4
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/eikkapine--victory-amd!39
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-39"
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?
@MJ26gaming on GitHub · 2026-11-30 16:09 UTC · original
MJ26gaming:pr/memory-peel-stacked→main· +0 −0 · 0 files · 18 commits · closed without mergingTwo commits, one switch each (the second only works with the first):
1.
VICTORY_MEMORY_PEEL=1|2(off by default)A load by address reads the copy view its page's directory entry names, which differs between lanes. As a non-uniform descriptor index, the AMD back end turns every such load into a waterfall loop per dword. With the switch, a load in a program that walks the title's structures (not the structure builder's) loops over the wave's distinct copies instead: each turn takes the wave-wide minimum slot not yet read (uniform, so its view needs no waterfall), and the lanes holding it read. The wave ops sit in the loop's head and latch, where every lane runs. Same bytes are read.
=1: loads of two dwords or more;=2: single dwords too. The shader cache keys on it (only when on).2.
VICTORY_MEMORY_UINT4=1(off by default, with PEEL)The host's translation reads a raw view one dword at a time whatever alignment the load is said to have; a structured view of 16-byte elements reads as one vector. With the switch, the run of copy views doubles (a copy's structured view lies 4096 slots past its raw one), and inside the peel loop a lane whose byte is on 16 reads element
byte/16of the structured view; others read the raw view as before. Off: the run keeps its length. On RDNA4 the walk passes go from ~1,500 to ~480 memory instructions.On our tree (MJ26gaming/victory-rdna4-linux-rt-MJ26), PEEL=2 over 7 alternated pairs: mean +1.2 fps, but launch-to-launch spread down from SD 3.5 to 1.5 fps (it removed the slow launches); UINT4 on top: 28.6 vs 25.2 fps averaged over 3 pairs (+3.4).
Measured on victory-amd
Current
main(with #32 and #33 merged, v2026.11.30.4): same settings as below,VICTORY_REHYDRATE_PREP=1:Earlier, on
2cf103c+ #32 + #33:RX 9070 XT (RDNA4), Linux / Proton + vkd3d-proton (RADV, Mesa 26.3.1). Series X path with RT, the cell,
scripts/play.ps1settings plus #32 and #33 (VICTORY_REHYDRATE_PREP=1), 300 s runs, first 90 s left out, on/off alternated, warmed shader cache,present pacingnumbers. "On" =VICTORY_MEMORY_PEEL=2 VICTORY_MEMORY_UINT4=1:On top of #32 and #33: +2.2 / +2.9 fps average, median frame rate up 50–70 %, and frames over 100 ms down by about 85 % in both pairs. (Alone on
mainwithout #32/#33 neither switch helped here — the walk passes only become the bottleneck once the compacted-size race is fixed — hence the dependency.)Checks
Picture checked in capture runs (PEEL+UINT4 alone, and together with #32, #33 and the other switches): cell scene correct.
cargo xwin build --release --locked -p victory(stable 1.100): no new warnings.victory-shaderlib tests under Wine: 276 pass with the switches off and on; the 37 that dispatch on a D3D12 device can't run without one (same set either way). Fullvictory-gpusuite not run, per CONTRIBUTING.🤖 Generated with Claude Code
VICTORY_MEMORY_PEEL + VICTORY_MEMORY_UINT4: uniform views for walkers' loads by address (depends on #32, #33)to VICTORY_MEMORY_PEEL + VICTORY_MEMORY_UINT4: uniform views for walkers' loads by addressPull request closed