perf(gpu): bound small-texture growth work per pass #4746

Closed
github-bot wants to merge 1 commit from github-bot/gh-4745 into main AGit
Owner

@⁠v8816 on GitHub · 2026-12-01 04:45 UTC · original
v8816:perf/bound-small-texture-growth → main · +83 −57 · 1 files · 1 commits · closed without merging

Problem

The small-texture upgrade pass runs while recording a frame. Once it has exhausted its byte budget, it still takes and walks the entire pending queue under the texture-table lock. One Series S session on an RTX 4060 Ti had 47,345 pending upgrades.

Change

Take a window of at most 512 entries per call and stop visiting it as soon as the byte budget is spent. Leave the unvisited entries in front of newer arrivals, and retry entries whose resource lock was busy at the back. The existing upgrade byte budget and texture-residency rules stay in effect.

Validation

  • On the current upstream base, the release GPU resource suite passed 66 tests with 1 ignored. The regression test exercises a large queue, an unvisited suffix, a busy entry, and an arrival while the batch is out. The repository asset policy passed.
  • A synthetic CPU comparison with 47,345 live entries and room for 128 upgrades produced the same processed count and pending order. Texture-table lookups fell from 47,345 to 128. Median isolated pass time over 15 iterations fell from 2.09 ms to 0.033 ms on an i5-12400F. This does not measure texture uploads, frame time, or in-game FPS.
**@⁠v8816** on GitHub · 2026-12-01 04:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4745) `v8816:perf/bound-small-texture-growth` → `main` · +83 −57 · 1 files · 1 commits · closed without merging ## Problem The small-texture upgrade pass runs while recording a frame. Once it has exhausted its byte budget, it still takes and walks the entire pending queue under the texture-table lock. One Series S session on an RTX 4060 Ti had 47,345 pending upgrades. ## Change Take a window of at most 512 entries per call and stop visiting it as soon as the byte budget is spent. Leave the unvisited entries in front of newer arrivals, and retry entries whose resource lock was busy at the back. The existing upgrade byte budget and texture-residency rules stay in effect. ## Validation - On the current upstream base, the release GPU resource suite passed 66 tests with 1 ignored. The regression test exercises a large queue, an unvisited suffix, a busy entry, and an arrival while the batch is out. The repository asset policy passed. - A synthetic CPU comparison with 47,345 live entries and room for 128 upgrades produced the same processed count and pending order. Texture-table lookups fell from 47,345 to 128. Median isolated pass time over 15 iterations fell from 2.09 ms to 0.033 ms on an i5-12400F. This does not measure texture uploads, frame time, or in-game FPS.
(cherry picked from commit 4cd5bf675d2b226e21a144f0b5fc5f9b213513cc)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 04:48:37 +00:00
github-bot closed this pull request 2026-12-01 18:36:45 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:33 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:33 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4745#issuecomment-7321137395) 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!4746
No description provided.