VICTORY_BAKE_TEXTURES_MS default: the decoration-bake draws repeat (128+), world fps halves and load +110 s (Linux/Proton, RTX 4070 Ti) #594

Open
opened 2026-11-26 03:47:04 +00:00 by github-bot · 6 comments
Owner

@⁠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 halves

Setup: RTX 4070 Ti, Linux, Proton Experimental (vkd3d-proton), Series X files. The fork at c96b4f2b8 plus 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_textures treats as the decoration bake do not run once per launch. The log line "a draw of the title's decoration bake" reaches bakes=128 around frames 1030–1150 in every launch, during the opening cutscene and world entry. The queued_at_the_last_pass field shows 14,000–19,000 queued slots, while due_at_the_last_pass is 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):

runs VICTORY_BAKE_TEXTURES_MS avg fps p50 frame to world
3 launches, stopped after 1–2 min in the world (frame lines) default (1500) 2.6–3.2 309–366 ms 191–241 s
4 launches 0 6.2–6.7 146–157 ms 140 s
single-variable pair (everything else equal) default / 0 2.76 / 6.60 360 / 148 ms 251 / 140 s

With 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_MS default: 6.3–6.6 fps.
  • VICTORY_TEXTURE_CATCHUP: 6.69.
  • The placed-texture key: 6.23.
  • VICTORY_LATE_WAIT_LISTS=128 instead of 256: did not restore the speed.

Possible directions (untested):

  • Count the bake pass once per launch, or once per distinct bake target, instead of once per draw.
  • Upload only the slots the bake draw's tables name, instead of the whole queue.
  • Skip the pass when nothing is due.

I can test a patch in the same setup.


Measured and written with AI assistance (Claude Code, Claude Opus 5.5).

**@⁠oeirughrepuiohg** on GitHub · 2026-11-25 02:47 UTC · [original](https://github.com/fxceless/victory-fork/issues/594) ### `VICTORY_BAKE_TEXTURES_MS` (default 1500, c96b4f2b8): the bake draws repeat here, world frame rate halves **Setup:** RTX 4070 Ti, Linux, Proton Experimental (vkd3d-proton), Series X files. The fork at c96b4f2b8 plus 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_textures` treats as the decoration bake do not run once per launch. The log line "a draw of the title's decoration bake" reaches `bakes=128` around frames 1030–1150 in every launch, during the opening cutscene and world entry. The `queued_at_the_last_pass` field shows 14,000–19,000 queued slots, while `due_at_the_last_pass` is 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):** | runs | `VICTORY_BAKE_TEXTURES_MS` | avg fps | p50 frame | to world | |---|---|---|---|---| | 3 launches, stopped after 1–2 min in the world (frame lines) | default (1500) | 2.6–3.2 | 309–366 ms | 191–241 s | | 4 launches | 0 | 6.2–6.7 | 146–157 ms | 140 s | | single-variable pair (everything else equal) | default / 0 | 2.76 / 6.60 | 360 / 148 ms | 251 / 140 s | With 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_MS` default: 6.3–6.6 fps. - `VICTORY_TEXTURE_CATCHUP`: 6.69. - The placed-texture key: 6.23. - `VICTORY_LATE_WAIT_LISTS=128` instead of 256: did not restore the speed. **Possible directions (untested):** - Count the bake pass once per launch, or once per distinct bake target, instead of once per draw. - Upload only the slots the bake draw's tables name, instead of the whole queue. - Skip the pass when nothing is due. I can test a patch in the same setup. --- *Measured and written with AI assistance (Claude Code, Claude Opus 5.5).*
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:47:04 +00:00
Author
Owner

@⁠Speartone on GitHub · 2026-11-25 04:34 UTC · original

From reading c96b4f2 (310c6eb does 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.

**@⁠Speartone** on GitHub · 2026-11-25 04:34 UTC · [original](https://github.com/fxceless/victory-fork/issues/594#issuecomment-7152967234) From reading c96b4f2 (310c6eb does 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.
Author
Owner

@⁠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):

pass off pass on
host copies in the card's memory 96 copies, 936 MB 22 copies, 351 MB
shader writes looked for on the CPU per frame, title buffers' copies 31.4 MB in 290 ranges, 28.2 MB snapshotted 546.4 MB in 340 ranges, 540.9 MB snapshotted
of that, in copies of 1 MiB or more (eligible for the card) 4.5 MB 519.7 MB

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"/moves jump (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 04:39 UTC · [original](https://github.com/fxceless/victory-fork/issues/594#issuecomment-7153046259) @⁠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): | | pass off | pass on | |---|---|---| | host copies in the card's memory | 96 copies, 936 MB | **22 copies, 351 MB** | | shader writes looked for on the CPU per frame, title buffers' copies | 31.4 MB in 290 ranges, 28.2 MB snapshotted | **546.4 MB in 340 ranges, 540.9 MB snapshotted** | | of that, in copies of 1 MiB or more (eligible for the card) | 4.5 MB | **519.7 MB** | 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"/`moves` jump (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).*
Author
Owner

@⁠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:

  • Refresh work is the same: about 21,000 refreshes and about 18.6 GB per frame. Write-watch time is the same, about 31 ms and 9.6 GB checked.
  • 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.
  • Card texture copies: 13,626 → 14,166 alive. Card use and process RAM are about the same, with no extra swap.

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).

**@⁠oeirughrepuiohg** on GitHub · 2026-11-25 03:54 UTC · [original](https://github.com/fxceless/victory-fork/issues/594#issuecomment-7152347949) · 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: - Refresh work is the same: about 21,000 refreshes and about 18.6 GB per frame. Write-watch time is the same, about 31 ms and 9.6 GB checked. - **`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. - Card texture copies: 13,626 → 14,166 alive. Card use and process RAM are about the same, with no extra swap. 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).*
Author
Owner

@⁠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, with VICTORY_RELAY=0 VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024:

default (bake 1500) VICTORY_BAKE_TEXTURES_MS=0
page faults / frame (median) 85.5k 15.2k
GPU ms / frame 252 61
median ms / frame 655 427-533 (two runs)

VICTORY_EARLY_TEXTURES_MS=0 alone does not change it (796 ms, 90k faults); the bake budget is the whole effect. Bisect: 31714de 481 ms / 3.7k faults, c96b4f2 655 ms / 85.5k. Characters' hair still had colour in the bake-on screenshot; checking bake-off now.

Separately: an intermittent loading crash, 0xc0000005 reading 0x2c (null + 0x2c) at title image +0x164a298, appeared 2 of 6 launches on c96b4f2 and later, never on 31714de (1 launch, so weak).

(AI-assisted, Claude Code; no game data.)

**@⁠npanu420** on GitHub · 2026-11-25 06:50 UTC · [original](https://github.com/fxceless/victory-fork/issues/594#issuecomment-7155219996) Confirming on an RTX 3070 8 GB + i9-9900X (Windows 11), plain `c96b4f2`, same window of world frames 60-160, with `VICTORY_RELAY=0 VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024`: | | default (bake 1500) | `VICTORY_BAKE_TEXTURES_MS=0` | |---|---|---| | page faults / frame (median) | 85.5k | 15.2k | | GPU ms / frame | 252 | 61 | | median ms / frame | 655 | 427-533 (two runs) | `VICTORY_EARLY_TEXTURES_MS=0` alone does not change it (796 ms, 90k faults); the bake budget is the whole effect. Bisect: `31714de` 481 ms / 3.7k faults, `c96b4f2` 655 ms / 85.5k. Characters' hair still had colour in the bake-on screenshot; checking bake-off now. Separately: an intermittent loading crash, `0xc0000005` reading `0x2c` (null + 0x2c) at title image `+0x164a298`, appeared 2 of 6 launches on `c96b4f2` and later, never on `31714de` (1 launch, so weak). (AI-assisted, Claude Code; no game data.)
Author
Owner

@⁠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, with VICTORY_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_MS fps preparing on the GPU
default 3.6–3.9 157–166 ms 79–103 ms
0 7.3–7.9 88–92 ms 25–34 ms

A 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=128 didn'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.

**@⁠VibeClauding** on GitHub · 2026-11-25 07:12 UTC · [original](https://github.com/fxceless/victory-fork/issues/594#issuecomment-7155609949) It still applies on `8dd30ab` (latest main), Windows, RTX 3070 8 GB, Series S. Build: main + #220 #648 #670 #705 #346, with `VICTORY_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_MS` | fps | preparing | on the GPU | |---|---|---|---| | default | 3.6–3.9 | 157–166 ms | 79–103 ms | | 0 | 7.3–7.9 | 88–92 ms | 25–34 ms | A 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=128` didn'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.
Author
Owner

@⁠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:

Run Lines Median Slowest tenth Worst line
default bake budget, no submit thread 31 206 ms 250 ms 866 ms
default, + windows + submit thread 24 159 ms 290 ms 5,203 ms
default, + wide card hashing 17 161 ms 763 ms 1,431 ms
VICTORY_BAKE_TEXTURES_MS=0, same switches 34 141 ms 149 ms 185 ms

So 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 310c6eb6 with 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.

**@⁠CuteBooty** on GitHub · 2026-11-25 19:56 UTC · [original](https://github.com/fxceless/victory-fork/issues/594#issuecomment-7172968825) **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: | Run | Lines | Median | Slowest tenth | Worst line | |---|---|---|---|---| | default bake budget, no submit thread | 31 | 206 ms | 250 ms | 866 ms | | default, + windows + submit thread | 24 | 159 ms | 290 ms | 5,203 ms | | default, + wide card hashing | 17 | 161 ms | 763 ms | 1,431 ms | | `VICTORY_BAKE_TEXTURES_MS=0`, same switches | 34 | 141 ms | 149 ms | 185 ms | So 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 310c6eb6 with 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.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/fxceless--victory-fork#594
No description provided.