Read-back buffers of textures copied back are kept for the next copy #116
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/readmet3xt-lab--foxhound!116
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-116"
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?
@mgrein on GitHub · 2026-11-30 14:34 UTC · original
mgrein:readback-pool→main· +0 −0 · 0 files · 49 commits · closed without mergingtexback::copy_backmakes a new read-back buffer withCreateCommittedResourceeach time a list that wrote one of theVICTORY_TEXTURE_BACKkinds closes. In the world of a new retail game that's ~10 a frame, all of the same few sizes. A profile of the list threads put it at ~3 % of their busy time, and it turned out to cost more than that.This keeps the buffers instead:
Backremembers its size.Backis dropped, its buffer goes into a small pool (at most 64). That happens with the list'sDeferredat the host list's reset, after the list has run andland()has read the buffer.The buffers stay in
COPY_DESTas before, andMap/Unmapstay per landing. ABackdropped without its list ever running gives back a buffer nothing wrote, which is harmless.VICTORY_READBACK_POOL=0makes one buffer per copy, as before.VICTORY_READBACK_POOL=abswitches every 20 seconds and logs each switch (readback-pool switch <unix ms> on|off), for an A/B inside one run.Measured
RTX 4070, Ryzen 5 5600X, Series S profile, DLSS quality + frame generation,
VICTORY_SUBMIT_SPLIT=1,VICTORY_ASK_FIRST=1,VICTORY_OFF_LINE=1. One 10-minute idle run in the world with=ab; neighbouring 20 s windows are paired:VICTORY_THINline)The CPU on this machine is saturated (the process keeps ~10.5 of 12 logical cores busy), so CPU taken off the list threads shows up in the frame.
The other
read_back_buffercaller,list::read_back(title texture-to-buffer copies), still makes one buffer per copy. It's a candidate for the same treatment.cargo test -p victory-gpu --libpasses.🤖 Generated with Claude Code
@missionarteemis-cloud on GitHub · 2026-11-30 18:35 UTC · original
Measured on an 8-thread CPU (no SMT), in case it helps: about 1.4 % less frame time, consistent with your numbers.
Machine: i7-9700K (8 cores / 8 threads), RTX 4070 12 GB, 32 GB DDR4-3000, Windows 10 22H2 (Agility SDK runtime beside victory.exe), driver 621.40. Series S profile, DLSS Quality, DLSS-FG on, the launcher's v0.8.2 switch set (FAULT_UNLOCKED and STORE_BESIDE on). The game is CPU-bound here: ~72 ms a frame, ~50 ms of it preparing, GPU wait ~0-4 ms.
Method: v0.8.2 diagnostics build with this PR and #93 cherry-picked. Your
abmode and #93's flip on the same wall-clock 20 s windows, so with both onabthey turn on and off together. I bound both toVICTORY_ABbits instead (crate::ab::pick("VICTORY_READBACK_POOL")checked first inread_back_pool()), which givesVICTORY_AB=15,VICTORY_ASK_PRIORITY,VICTORY_READBACK_POOL. That is 15 s phases cycling through all four combinations, standing still after loading a save. Each round is compared against that round's both-off phase. Rounds where draws a frame moved by more than 2 % (a scene change) are left out.Frame time vs both off, per round (3 steady rounds, ~7,650 draws a frame):
That is about 1 ms a frame, in line with the 0.85 ms you measured on the 5600X. No "texture changed after its upload" warning in any steady phase, no crash.
A small suggestion: binding the
abmodes of new switches tocrate::ab::pick(...)would let them be measured together with independent bits.@readmet3xt-lab on GitHub · 2026-12-01 01:36 UTC · original
A note on why this shows as closed: GitHub closed every open pull request by itself when main's history was rewritten on 2026-12-01 (text-only changes; every commit hash changed), and they cannot be reopened. This is not a rejection.
Your change is in the batch being tested for the next release, carried over as one commit with you as its author. Nothing is needed from you now; the result will be posted here.
Pull request closed