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

Closed
paales wants to merge 17 commits from upstream-pr/4509 into main
paales commented 2026-11-30 21:37:29 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by paales on 2026-11-30T21:37:29Z.


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, #4206, #4138, #720 and #4493 (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: #4493 (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.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5574213585 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4509). Originally posted by [paales](https://github.com/paales) on 2026-11-30T21:37:29Z. --- _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, #4206, #4138, #720 and #4493 (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: #4493 (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.
trustno1-coder commented 2026-12-01 18:39:25 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:39:25Z.


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.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7321286339 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4509#issuecomment-7321286339). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-12-01T18:39:25Z. --- 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

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
trustno1-coder/VIctory-NVIDIA!4509
No description provided.