New textures hot within 16 MB a frame: the scene holds 29+ fps 3 s after the world's load, not 6 s #4510

Closed
github-bot wants to merge 17 commits from github-bot/gh-4509 into main AGit
Owner

@⁠paales on GitHub · 2026-11-30 21:37 UTC · original
paales:texture-cold-start → main · +31 −2 · 1 files · 17 commits · closed without merging

Written by 🤖:

What it changes

A new guarded texture is hot for its first 64 frames: hashed at every check, not only on its turn. After a world's load thousands of textures are new at once, and the texture pass hashed all of them every frame. This PR keeps the hot start and bounds the hashing of textures that are hot and nothing else to 16 MB a frame (VICTORY_TEXTURE_HOT_MB; 0: no bound). A texture over the frame's bound waits for a later frame and stays hot.

An earlier version of this PR removed the hot start. That made a story save's montage show an armchair black for 0.8 s: its textures were filled by the game's CPU after their first upload, where no guard saw the write, and only a later recheck found the change. With the hot start, bound or not, it stayed textured.

How it was tested

  • PC: RTX 5070 Ti 16 GB, Ryzen 9 5900X, 32 GB, Windows 11.
  • Profile: Series X, 1440p, DLSS Performance, frame generation off, 30 fps cap.
  • Base: main 84bd61e2 with #3918, #1727, #3553, #3043, #4207, #4138, #720 and #4494 (the hash turn every 64th frame), and VICTORY_TEXSPK_PASS_MS=24. The frames a texture starts hot and the bound were switches in that build for the test.
  • "The load" is the world's load, one frame of 3.6 to 4.7 s. One run per column.

The first cutscene of a new game:

hot, no bound (main) hot, 16 MB a frame (this PR) not hot
texture pass, seconds 1 to 5 after the load, per frame 40.8 ms 10.4 ms 4.5 ms
frames a second, seconds 1 to 5 after the load 22.6 25.2 27.8
seconds after the load until it holds 29+ fps 6 3 1

A story save that loads into a mission cutscene, then a montage of quick cuts:

hot, no bound hot, 64 MB a frame hot, 16 MB a frame not hot
texture pass, seconds 1 to 5 after the load, per frame 58.4 / 61.6 ms (2 runs) 27.0 ms 10.9 ms 5.8 ms
frames a second, seconds 1 to 5 after the load 20.4 / 19.4 23.2 24.0 21.0
the armchair in the yard (captures every 80 to 95 ms) textured textured black from 60.6 to 61.4 s

Captures every 135 ms of the boot with the hot start off showed the six-star screen as it should be; with the bound it is hot as before.

  • cargo check -p victory-gpu: passed. cargo test: not run.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #4494 (the hash turn every 64th frame) changes the same doc comment of hot_textures: the second to merge needs a rebase there, which I do.
**@⁠paales** on GitHub · 2026-11-30 21:37 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4509) `paales:texture-cold-start` → `main` · +31 −2 · 1 files · 17 commits · closed without merging _Written by 🤖:_ ## What it changes A new guarded texture is hot for its first 64 frames: hashed at every check, not only on its turn. After a world's load thousands of textures are new at once, and the texture pass hashed all of them every frame. This PR keeps the hot start and bounds the hashing of textures that are hot and nothing else to 16 MB a frame (`VICTORY_TEXTURE_HOT_MB`; 0: no bound). A texture over the frame's bound waits for a later frame and stays hot. An earlier version of this PR removed the hot start. That made a story save's montage show an armchair black for 0.8 s: its textures were filled by the game's CPU after their first upload, where no guard saw the write, and only a later recheck found the change. With the hot start, bound or not, it stayed textured. ## How it was tested - PC: RTX 5070 Ti 16 GB, Ryzen 9 5900X, 32 GB, Windows 11. - Profile: Series X, 1440p, DLSS Performance, frame generation off, 30 fps cap. - Base: `main` 84bd61e2 with #3918, #1727, #3553, #3043, #4207, #4138, #720 and #4494 (the hash turn every 64th frame), and `VICTORY_TEXSPK_PASS_MS=24`. The frames a texture starts hot and the bound were switches in that build for the test. - "The load" is the world's load, one frame of 3.6 to 4.7 s. One run per column. The first cutscene of a new game: | | hot, no bound (`main`) | hot, 16 MB a frame (this PR) | not hot | | --- | --- | --- | --- | | texture pass, seconds 1 to 5 after the load, per frame | 40.8 ms | 10.4 ms | 4.5 ms | | frames a second, seconds 1 to 5 after the load | 22.6 | 25.2 | 27.8 | | seconds after the load until it holds 29+ fps | 6 | 3 | 1 | A story save that loads into a mission cutscene, then a montage of quick cuts: | | hot, no bound | hot, 64 MB a frame | hot, 16 MB a frame | not hot | | --- | --- | --- | --- | --- | | texture pass, seconds 1 to 5 after the load, per frame | 58.4 / 61.6 ms (2 runs) | 27.0 ms | 10.9 ms | 5.8 ms | | frames a second, seconds 1 to 5 after the load | 20.4 / 19.4 | 23.2 | 24.0 | 21.0 | | the armchair in the yard (captures every 80 to 95 ms) | textured | | textured | black from 60.6 to 61.4 s | Captures every 135 ms of the boot with the hot start off showed the six-star screen as it should be; with the bound it is hot as before. - `cargo check -p victory-gpu`: passed. `cargo test`: not run. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #4494 (the hash turn every 64th frame) changes the same doc comment of `hot_textures`: the second to merge needs a rebase there, which I do.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 21:40:37 +00:00
github-bot changed title from A new texture starts cold: the scene holds 29+ fps 1 s after the world's load, not 6 s to New textures hot within 16 MB a frame: the scene holds 29+ fps 3 s after the world's load, not 6 s 2026-11-30 23:35:55 +00:00
The branch's base was main before its history was rewritten; this merge takes today's main for every file and keeps the change of this pull request in texture.rs.
github-bot closed this pull request 2026-12-01 18:43:16 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:39 UTC · original

Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:39 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4509#issuecomment-7321286339) Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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/trustno1-coder--VIctory-NVIDIA!4510
No description provided.