feat(shader): record places, record ranges and guest load clusters on by default #518
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/lobomfz--VIctory-xmem!518
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-518"
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?
@ChainedTears on GitHub · 2026-12-04 20:54 UTC · original
ChainedTears:feat/translator-switches-default→main· +26 −20 · 5 files · 1 commits · openTurns on three translator switches by default; each still turns off with
=0:VICTORY_CLUSTER_GUEST_LOADS(default1)VICTORY_RECORD_PLACES(default1;2and0as before)VICTORY_RECORD_RANGES(default1)run.conf.defaultanddocs/SETTINGS.mdsay the same. The shader cache already keys on all three, so existing caches stay valid for anyone who sets them to0. Everyone else gets their shaders prepared again once.Follows up #517.
Why
On an AMD Ryzen AI Max+ 395 (Radeon 8060S, RDNA 3.5, 128 GB, RADV from Mesa main with the repo's patch), these three switches together were the only full-quality gain I found in a day of A/B runs.
Setup: Series X profile, 2560x1440 output (1706x960 rendered), default render scale, ray tracing on, Proton Experimental. The benchmark is the first 3 minutes after loading the "Gone Fishing" save (cutscene, world-gated, the same save restored before each run), plus the boat gameplay that follows it.
That's about +9.7 % in the cutscene and +7 % in gameplay (3 runs each). With the Series S profile they gave +6.5 %. Screenshots at 20-second steps look the same, and I saw no GPU hang I could tie to them in about 50 runs. The random device-removed resets, about 1 in 12 runs, happen with or without them.
What to weigh
The doc comments name the assumptions:
RECORD_RANGES, a record copied by halves reads as an empty view; the comment says no title is known to do that.RECORD_PLACES=2(typed buffers) stays opt-in; only level 1 (textures, whose console descriptors are always copied whole) becomes the default.I've only measured on this one AMD APU and this one title. If they were kept opt-in for a reason this doesn't cover (other GPUs, other titles), closing this in favour of a preset is fine too.
Tests
cargo test -p victory-shader --libpasses with the new defaults.github-bot referenced this pull request2026-12-04 22:19:54 +00:00
github-bot referenced this pull request2026-12-04 22:19:55 +00:00
@Kal0s-design on GitHub · 2026-12-04 22:50 UTC · original
Checked
06b2f08on native Windows (one NVIDIA desktop card plus WARP, didn't run the game).victory-shader lib passes with the new defaults apart from size_tests::a_reused_descriptor_register_read_only_behind_its_flag, which fails on main here too because WARP only gives 4-lane waves. PR unset, PR with the three set to 0 and main unset give the same results test for test. Main with all three set to 1 adds one failure, a_typed_buffer_carries_its_places_only_when_asked, which is the case this PR handles by pinning CARRY_RANGES_HERE to false in that test. Most record and cluster tests set the switches through the thread-local overrides, so the suite alone doesn't go through the new env defaults.
So I also ran a throwaway test, since removed. It lowers the record programs from the lower.rs tests (texture with a raw UAV, typed buffer, constant buffer), the waterfall programs with records on and the guest load cluster program, and leaves the switches to the env. The PR defaults give the same DXIL as main with all three at 1, the PR with all three at 0 gives the same as main unset, and VICTORY_RECORD_PLACES=2 with the other two at 0 matches main with RECORD_PLACES=2. Every shader that lowered passed dxil.dll and made a PSO on the card with VICTORY_D3D12_DEBUG=1. WARP took all the ones without a fixed wave size, the clustered loads included. It turned down the WaveSize(32) builds for its 4-lane waves, and it does that on main too.
The cache side looks right to me. shader_cache.rs:121-138 only adds the three markers when they're on and none of them is in the raw env list above it, so =0 keeps a cache built on main and everyone else rebuilds once with no TRANSLATOR_VERSION bump. The host writes ranges through the same records_carry_ranges() (descriptor.rs:1127), so host and shaders change together.
Two small things. cluster_guest_loads (mod.rs:235) doesn't trim like shader.rs:189 and 248 do, so "0 " leaves it on, and for all three an empty value or anything other than 0 now means on. That includes old uncommented
VICTORY_RECORD_PLACES=lines in run.conf, which run.sh exports empty. And with ranges on, RECORD_PLACES=2 gives the same code as 1 (lower.rs:12633-12636, typed buffers hash once their record carries the range). That was already true, but now it's the default combination, so SETTINGS.md could say 2 only matters together with RECORD_RANGES=0.victory-gpu lib on the PR only hit the usual failures here (the two indirect host_list tests, the two host pipeline library loads and a flaky watch test). The victory-core menu tests pass with the new run.conf.default, choices 0|1|2 included.
AI-assisted: yes
@luisaugustz on GitHub · 2026-12-05 13:30 UTC · original
Measured on RX 9070 XT + Ryzen 7 5800X (RADV, 4K output, FSR 4 Performance, ray tracing on).
downtownroute from #554About +5 % in both places, and the picture is the same in the screenshots.
The first run with the switches prepared all 94,520 pipelines again. That took about 12 minutes here and added about 7.5 GB to the cache.
Details and the other runs are in #591.
@arturbac on GitHub · 2026-12-05 17:27 UTC · original · edited 2026-12-05 17:29 UTC
Tested the three switches on an RX 7900 XTX (RDNA 3): about +8 % average fps.
Setup: Ryzen 9 9950X, RX 7900 XTX, Linux, GE-Proton 11-6, RADV from the repo's patched Mesa, Series X profile, 2560x1440 output. Build based on main at
2382b4c, with a few local changes for input and frame logging (nothing in the shader translator).Method: two runs with the same short sequence after loading the game (same actions, roughly the same views). One with
VICTORY_RECORD_PLACES=1,VICTORY_RECORD_RANGES=1andVICTORY_CLUSTER_GUEST_LOADS=1, one with all three unset; nothing else changed. Frame times logged for every frame; the loading part at the start is left out.From 20 s on, the gain is +6.5 % average and +9 % median. Only one short run (about a minute) per variant, so the numbers are a rough indication, but they point the same way as the other measurements here.
Pipeline preparation: turning the switches on prepared all 94,583 pipelines again. The default number of warm processes is capped at 16, which on this 32-thread CPU kept half of it idle; with
VICTORY_WARM_JOBS=31the rate went from about 210 to about 560 pipelines a second, and the whole warm took about 4 minutes, with no bad or refused pipelines.Both runs also had
VICTORY_PAGE_MOVE_MB=128andVICTORY_PAGES_SEEN=1set (the usual settings on this machine).View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.