Frame rate: indirect clamps in runs, landing fetches from card slots, re-check fix (2.5 -> 7.5 fps on a 5070 Ti) #995
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/fxceless--victory-fork!995
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-995"
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?
@tunczzz on GitHub · 2026-11-25 15:26 UTC · original
tunczzz:pr/fps-relay-landing→main· +31078 −1348 · 64 files · 2 commits · openFrame-rate work on top of
0b0074e, measured on an RTX 5070 Ti (32 GB) in the first prison cutscene and the start of gameplay.Result: 217-225 ms a frame before the
9376fd6merge, 133-138 ms (7.2-7.5 fps) with the settings listed indocs/fps-notes.md. The card went from ~117 to ~64 ms a frame; the frame is now bound by the submitting thread, mostly the descriptor heap sync.Almost everything is behind a switch and off by default, so the default behaviour is unchanged except for the fixes listed below.
docs/fps-notes.mdhas the run table, the exact settings, what was tried and rejected (with the reason), and what is still open.The big wins
VICTORY_INDIRECT_BATCH=3clamps a run of calls in one pass (a run ends only at work that can store to a buffer);VICTORY_MESH_AMPLIFY=1clamps mesh records inside an amplification stage.VICTORY_CARD_FETCH_INFLIGHT=2copies each flight's flagged pieces into slots in card memory inside the flight, then copies the slots down on a copy queue at landing. Mode 1 was slow because shader writes into PC memory fall off a cliff on this card (64 MB: ~600 ms, against 0.74 ms into card memory).VICTORY_GPU_UPLOAD_COPIES=1) and table constants bound to the card copy (VICTORY_TABLE_ON_CARD=1).VICTORY_HEAP_SYNC_TABLES=2,VICTORY_SYNC_NULL_SKIP=1), wide fills, texture checks and refreshes, and fewer view-memory askings.Fixes that are on by default
VICTORY_HEAP_RECHECKfingerprinted past a texture's own bytes into the next texture placed in its large levels, and uploaded it again with them; that was the blocky strip at the bottom of the scene. It now stops at the next texture's start. There is also aBTreeMap::rangepanic fix for textures smaller than the head.VICTORY_REUPLOAD_WHEN_FULLwith async texture workers never ran. It is now done in the pass.AppData(os error 4395). This is why the settings never saved.VICTORY_ARROWS_LOOK=0restores the D-pad); blending is turned off for integer targets, so the wiper-mask pipeline builds.Not proven / needs a look
VICTORY_ASYNC_SUBMIT=1drew the room without walls here.VICTORY_FLIP_LANDEDis the attempted fix and is not measured yet.VICTORY_PICKED_EXACT=1declares the skinning programs' writes through heap-picked UAVs from their job records. It is not measured yet.victory-gpuandvictory-shaderlib tests pass, exceptindirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields, which is flaky on the merged upstream code too.This is one squashed commit of many smaller ones. Happy to split it if you'd rather take parts of it.
🤖 Generated with Claude Code
Update: merged
3973179(upstream's frame-rate commit). Where both of us had built the same thing, yours wins: VICTORY_JOIN_PARTS is yours (my own version of it was dropped), and your pace/card-meter diagnostics are kept as they are; the one clash was a field called sked on Fence, mine is unchanged and yours is now pace_asked. After the merge: cargo check is clean with and without diagnostics, ictory-gpu lib tests pass (264), and a five-minute run on the 5070 Ti is 131-136 ms (7.4-7.6 fps) with no device loss.3973179) into the frame-rate branch 7406afbbd9@grosterr on GitHub · 2026-11-25 18:50 UTC · original
A data point on "
VICTORY_ASYNC_SUBMIT=1drew the room without walls here": not reproduced on an RTX 3060 12 GB (Ryzen 7 5700X, 32 GB, Windows 11, Series X profile).Tree: not this PR. It is the fxceless#770 stack (
d034ac1) with maina253706merged in (grosterr/victory-forkrtx3060), withLEVELS_ON_DEMAND=1 EARLY_TEXTURES_MS=40 TEXTURE_NO_WAIT=1 WIDE_TEXTURES=1as the base. Same save each time, ~5–10 minutes in the first rooms and corridor:ASYNC_SUBMIT=1aloneASYNC_SUBMIT=1 QUEUE2=1 INDIRECT_WINDOW=1 COPY_PLAIN=1No device loss and no errors in any of them. So on this tree the missing walls do not follow from
ASYNC_SUBMITalone. It may depend on something else in this PR (or on0b0074e's changes), which might help narrow down whatVICTORY_FLIP_LANDEDhas to fix.For scale, the four switches together took this card from 330 to 243–282 ms a frame (copy-back 216 → 66 ms, most of it from
QUEUE2).AI-assisted (Claude Code); the runs and observations are mine.
@slauko on GitHub · 2026-11-26 11:31 UTC · original
A request for the split you offered, from a Wine line that cannot take the branch as one piece (vkd3d-proton, RTX 3080 Ti, uiliannn's base; the cell at ~4,950 draws a frame, 636 of them indirect, card 144–190 ms of a 262–288 ms frame):
the indirect clamp batching (
VICTORY_INDIRECT_BATCH=3) as its own PR, with whateverhost.rs/descriptor.rsplumbing it needs.Why that one first: my line already records the clamps per gather set — a compute pass per set between a UAV barrier on each side (
indirect.rs,record_gather_as:uav_barrier, dispatch,uav_barrier+ transition) — which is the shape your 105 → 64 ms is about; what it lacks is the run that takes several of them through one pair of waits. The rest of #995 is either not applicable here (VICTORY_GPU_UPLOAD_COPIES:GPU upload heaps ... supported=falseunder this stack) or too entangled with this line's own state to port from a 31k-line squashed branch.I can test a split quickly on my side: the cell's frame and the card's time are in every run's log, and
m29/m27give a baseline (270–318 ms and 275–277 ms with and without a translator port today).If the split is cheap for you, the other piece I would take next is
VICTORY_CARD_FETCH_INFLIGHT=2(the slots-in-card-memory variant) —=1is measured here: it removes 141 ms of the relay thread's wait and adds ~60 ms on the card, a net loss on this stack, so the=2geometry is the interesting one.@slauko on GitHub · 2026-11-26 13:29 UTC · original
A follow-up to my split request: the piece I asked for landed through Marvisak#3197's window instead, and it works on this stack — the indirect clamps in the cell fall from 1,757 to 1,796 a frame to 295 to 355 (the mesh draws join a table window; only the compute dispatches are left), with the table filled while recording and one pass per run.
So no split needed on my side for the clamp batch. The other items in this PR that still look interesting here are the CPU ones (
VICTORY_HEAP_SYNC_TABLES, the wide fills, the texture checks) — this line's copies are 63–74 ms for ~190 MB a frame, write-bandwidth-bound at ~4 GB/s (VICTORY_COPY_PLAIN=1changes nothing), and its heap pass is 25–45 ms in the descriptor scan.@Filip722 on GitHub · 2026-11-26 14:18 UTC · original
I backported the device-local flight-slot readback from
7406afbfor a matched Series S replay on Bazzite 44 with GE-Proton11-14, vkd3d-proton 3.2.0 and an RTX 5060 Laptop GPU (8 GB, NVIDIA 615.78.08). Both arms used the same executable, stationary prison view and warmed seed, with relay stage 1 and the clamped gathering path from #1171. To exercise actual device-local copies on this GPU, both used a 1 MiB minimum copy size and a 96 MiB buffer budget.Mode 2 typically read back 295 pieces (~18.4 MiB) per frame, with no old-path landings or slot overflows reported in the measured window. The patched replay responded to camera input. The asset-free fixture read the expected bytes from two ranges on the copy queue after a direct-queue fence, and the fetch pipeline test passed on the hardware adapter. This comparison isolates the readback path on that older compatibility build.
Assisted by Codex (GPT-6.2-Sol High).
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.