VICTORY_BAKE_TEXTURES_MS default: the decoration-bake draws repeat (128+), world fps halves and load +110 s (Linux/Proton, RTX 4070 Ti) #594
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#594
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@oeirughrepuiohg on GitHub · 2026-11-25 02:47 UTC · original
VICTORY_BAKE_TEXTURES_MS(default 1500,c96b4f2b8): the bake draws repeat here, world frame rate halvesSetup: RTX 4070 Ti, Linux, Proton Experimental (vkd3d-proton), Series X files. The fork at
c96b4f2b8plus a few open PRs; relay stage 1. Each run is 5 minutes in the steady world, in the first gameplay scene.What I see: the draws that
early_texturestreats as the decoration bake do not run once per launch. The log line "a draw of the title's decoration bake" reachesbakes=128around frames 1030–1150 in every launch, during the opening cutscene and world entry. Thequeued_at_the_last_passfield shows 14,000–19,000 queued slots, whiledue_at_the_last_passis mostly 0. So each of those draws starts a pass that may upload the whole queue, up to the 2 GiB cap.Measured (avg fps over 280 s in the world / time from launch to the steady world):
VICTORY_BAKE_TEXTURES_MSWith the pass on, the frame line's "copies" go from about 70 to about 195 ms per frame. Relay copy-back also rises, from about 105 to 240–275 ms per frame, and fetches of card-copy pieces from 32–52 to 124–155 ms.
The other new defaults in that commit were not the cause:
VICTORY_EARLY_TEXTURES_MSdefault: 6.3–6.6 fps.VICTORY_TEXTURE_CATCHUP: 6.69.VICTORY_LATE_WAIT_LISTS=128instead of 256: did not restore the speed.Possible directions (untested):
I can test a patch in the same setup.
Measured and written with AI assistance (Claude Code, Claude Opus 5.5).
@Speartone on GitHub · 2026-11-25 04:34 UTC · original
From reading
c96b4f2(310c6ebdoes not change it); actual GTA VI gameplay has not been tested. State::early_textures gives bake draws 1,500 ms and 2 GiB, but BAKED_MS goes back to 0 at each frame's first draw, and the bytes are counted on top of what the frame spent. So the budget is per frame, and repeated bakes can each bring up to 2 GiB.A guess, not shown: textures may fill the card (up to 90 %, resource::room) before title buffers get their card copies, which shadow::card_for refuses past 80 %. Such a copy then stays in the PC's memory. That would fit copies going from 70 to 195 ms; it does not by itself explain the longer fetches.
Possible change: one budget for the launch, no pass when nothing is due, and the fifth of the card that card copies need kept free by this pass, behind a switch. Whether the bake still finds its textures needs a run. Logging how many card copies are refused with and without VICTORY_BAKE_TEXTURES_MS=0 would test the guess.
AI-assisted (Claude Code, Claude Opus 5.5). No game data.
@oeirughrepuiohg on GitHub · 2026-11-25 04:39 UTC · original
@Speartone Measured: your guess holds. These are the last stats lines in the world, from the same single-variable pair (
VICTORY_BAKE_TEXTURES_MS=0/ default):With the pass on, most large title buffers never get their card copy, so their shader writes are snapshotted and compared on the CPU every frame. That fits the "copies"/
movesjump (70 → about 195 ms). It also fits the slower relay landings, which now compare about 0.5 GB a frame on the CPU.So holding back the fifth of the card that card copies need, as you suggest, looks like the right lever. I can run a patch for it here.
AI-assisted (Claude Code, Claude Opus 5.5).
@oeirughrepuiohg on GitHub · 2026-11-25 03:54 UTC · original · edited 2026-11-25 05:28 UTC
Follow-up from the same single-variable pair, the copystat lines over the last minute in the world. Pass off is the first figure, pass on the second:
moves(the copies themselves): 25 ms → 156 ms per frame, with roughly the same bytes moved. The big ranges in the "copied from" list cost the same in both runs, so the extra time is spread over many small copies.The slowdown outlasts the bake passes. The bake counter passes 128 by frame ~1,150 and does not reach 256 (it is printed only at powers of two), but the world stays at half speed for the whole 5 minutes. So something the passes leave behind keeps the copy path slow, not the passes' own time. (Answered below: the card fills up and title buffers lose their card copies.)
AI-assisted (Claude Code, Claude Opus 5.5).
@npanu420 on GitHub · 2026-11-25 06:50 UTC · original
Confirming on an RTX 3070 8 GB + i9-9900X (Windows 11), plain
c96b4f2, same window of world frames 60-160, withVICTORY_RELAY=0 VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024:VICTORY_BAKE_TEXTURES_MS=0VICTORY_EARLY_TEXTURES_MS=0alone does not change it (796 ms, 90k faults); the bake budget is the whole effect. Bisect:31714de481 ms / 3.7k faults,c96b4f2655 ms / 85.5k. Characters' hair still had colour in the bake-on screenshot; checking bake-off now.Separately: an intermittent loading crash,
0xc0000005reading0x2c(null + 0x2c) at title image+0x164a298, appeared 2 of 6 launches onc96b4f2and later, never on31714de(1 launch, so weak).(AI-assisted, Claude Code; no game data.)
@VibeClauding on GitHub · 2026-11-25 07:12 UTC · original
It still applies on
8dd30ab(latest main), Windows, RTX 3070 8 GB, Series S. Build: main + #220 #648 #670 #705 #346, withVICTORY_RELAY=2 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024 VICTORY_INDIRECT_WINDOW=1 VICTORY_CARD_FETCH_INFLIGHT=1. Each row is one 5-minute run; the figures are from its last 8 frame lines in the world.VICTORY_BAKE_TEXTURES_MSA build of main + #220 alone (without the four other PRs) ran at 3.2–3.5 fps with the default, so the other PRs don't cause it.
VICTORY_VIEW_GUARD=0 VICTORY_LATE_WAIT_LISTS=128didn't bring the speed back either (3.5–4.1 fps).AI-assisted (Claude Code); runs on my machine with my own copy, counts and timings only.
@CuteBooty on GitHub · 2026-11-25 19:56 UTC · original
RTX 3070 8 GB, Series S, open water (3,500 draws): median 147 -> 142 ms, but the slowest tenth 250-760 ms -> 149 ms
Same build family, same save and scene, 5-second frame lines with more than 3,000 draws and no pipeline being made:
VICTORY_BAKE_TEXTURES_MS=0, same switchesSo here the setting's gain is in the tail: the multi-second readings are gone and the frame time has a spread of
about 10 ms. That matched what the player reported before seeing any numbers (smoother, not obviously faster).
The cost here: some cutscene characters come out flat and untextured. It held for a 103-minute
mission run afterwards (stalls came back only in town, for another reason: waits on remaps).
Setup: RTX 3070 8 GB (driver 621.24, 32-lane waves), Ryzen 5 3600, 32 GB, Windows 11, Series S mode (PR #188), 1920x1080, a diagnostics build of a tree at main
310c6eb6with a number of open PRs picked and ports of fork main's copy queue re-fetch and submit thread. Switches unless the comment says otherwise:VICTORY_QUEUE2=1 VICTORY_INDIRECT_WINDOW=1 VICTORY_ASYNC_SUBMIT=1 VICTORY_BAKE_TEXTURES_MS=0 VICTORY_TEXTURE_DROP_MIPS=1, plus wide card hashing (our tree's form of PRs #1014 / #997). One run per configuration.