Default texture line (budget − max(768 MB, 5%)) lets total video memory exceed the budget on a 16 GB card; 85% stopped it. Could the headroom follow what is measured? #1963

Closed
opened 2026-11-29 04:28:18 +00:00 by BBobbyD · 4 comments
BBobbyD commented 2026-11-29 04:28:18 +00:00 (Migrated from github.com)
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by BBobbyD on 2026-11-29T04:28:18Z.


Summary

On a 16 GB card, the default texture line sits at about 95% of the live budget (line_for in resource.rs, unchanged on main @ 77df871). Render targets, DLSS, and buffers come on top, so in dense city scenes the total goes over the budget. The GPU's time per frame then jumps from a few ms to 40–57 ms and dropped draws rise. With VICTORY_TEXTURE_ROOM_PERCENT=85, a run in denser scenes never went over, and nothing got worse. That is a single run on a different route, not a matched A/B test (one default run also stayed under budget), so a matched repeat would confirm it.

Environment

Release v2026.11.28.03, RTX 5080 16 GB (driver 610.88, live budget about 14.9–15.2 GB), Ryzen 7 7800X3D, 32 GB RAM, Series X, 1440p, DLSS Quality, frame generation off.

Numbers (from the the texture queue's room and frame-rate lines)

Run (UTC start) Texture line Max in use Samples over budget
2026-11-28 20:18 default (94.9%) 15,101 MB 9
2026-11-28 21:51 default 14,762 MB 0 (short run, fewer dense scenes)
2026-11-28 22:27 default 15,024 MB 2
2026-11-28 22:49 default 15,095 MB 7
2026-11-29 03:14 default 15,157 MB (budget about 15,038) 4
2026-11-29 03:41 85% 13,069 MB 0

The two most recent runs, side by side:

03:14, default 03:41, 85%
Average draws per frame 8,647 9,318 (busier)
Median ms per 1,000 draws 7.55 6.78
GPU time over 30 ms (5-second lines) 3 (max 57 ms) 1 (max 43 ms)
Average textures waiting 10,587 10,440
Neutral stand-in shown before upload 88% of slots 87% of slots

When the default run went over the budget (03:21:49–03:22:25), the GPU took 47–54 ms per frame, fps fell to 7–9, and 520–820 draws per frame were dropped. Tree shadows in the city were also seen flickering in that run.

Suggestion

  • A fixed 5% / 768 MB reserve leaves too little room once render targets and DLSS (about 2.9 GB of render targets at start here) plus card buffers are counted.
  • The layer already measures these: kept for render targets, card copies of title buffers, and the live DXGI budget.
  • The headroom could follow them, plus a margin, instead of a fixed share. That would also leave room for other programs, whose use the live budget already reflects.
  • A smaller step: on cards over 12 GB, default to about 85–88%.

This may overlap with #1496 (WholeCard guard bypass on main), but this release doesn't contain that code (25b3b5c), so the overflow here comes from the default line itself.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:6674805656 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1963). Originally posted by [BBobbyD](https://github.com/BBobbyD) on 2026-11-29T04:28:18Z. --- ### Summary On a 16 GB card, the default texture line sits at about 95% of the live budget (`line_for` in `resource.rs`, unchanged on `main` @ `77df871`). Render targets, DLSS, and buffers come on top, so in dense city scenes the total goes over the budget. The GPU's time per frame then jumps from a few ms to 40–57 ms and dropped draws rise. With `VICTORY_TEXTURE_ROOM_PERCENT=85`, a run in denser scenes never went over, and nothing got worse. That is a single run on a different route, not a matched A/B test (one default run also stayed under budget), so a matched repeat would confirm it. ### Environment Release `v2026.11.28.03`, RTX 5080 16 GB (driver 610.88, live budget about 14.9–15.2 GB), Ryzen 7 7800X3D, 32 GB RAM, Series X, 1440p, DLSS Quality, frame generation off. ### Numbers (from the `the texture queue's room` and frame-rate lines) | Run (UTC start) | Texture line | Max in use | Samples over budget | |---|---|---|---| | 2026-11-28 20:18 | default (94.9%) | 15,101 MB | 9 | | 2026-11-28 21:51 | default | 14,762 MB | 0 (short run, fewer dense scenes) | | 2026-11-28 22:27 | default | 15,024 MB | 2 | | 2026-11-28 22:49 | default | 15,095 MB | 7 | | 2026-11-29 03:14 | default | 15,157 MB (budget about 15,038) | 4 | | 2026-11-29 03:41 | **85%** | **13,069 MB** | **0** | The two most recent runs, side by side: | | 03:14, default | 03:41, 85% | |---|---|---| | Average draws per frame | 8,647 | 9,318 (busier) | | Median ms per 1,000 draws | 7.55 | 6.78 | | GPU time over 30 ms (5-second lines) | 3 (max 57 ms) | 1 (max 43 ms) | | Average textures waiting | 10,587 | 10,440 | | Neutral stand-in shown before upload | 88% of slots | 87% of slots | When the default run went over the budget (03:21:49–03:22:25), the GPU took 47–54 ms per frame, fps fell to 7–9, and 520–820 draws per frame were dropped. Tree shadows in the city were also seen flickering in that run. ### Suggestion - A fixed 5% / 768 MB reserve leaves too little room once render targets and DLSS (about 2.9 GB of render targets at start here) plus card buffers are counted. - The layer already measures these: `kept for render targets`, `card copies of title buffers`, and the live DXGI budget. - The headroom could follow them, plus a margin, instead of a fixed share. That would also leave room for other programs, whose use the live budget already reflects. - A smaller step: on cards over 12 GB, default to about 85–88%. This may overlap with #1496 (WholeCard guard bypass on `main`), but this release doesn't contain that code (`25b3b5c`), so the overflow here comes from the default line itself.
github-actions[bot] commented 2026-11-29 04:28:31 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-29T04:28:31Z.


Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7250673804 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1963#issuecomment-7250673804). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T04:28:31Z. --- Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
BBobbyD commented 2026-11-29 04:39:53 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by BBobbyD on 2026-11-29T04:39:53Z.


Logs attached: play logs for all six runs in the table (the usernames, PC name and game folder path are replaced with placeholders such as <user> and <game-folder>). The numbers come from the the texture queue's room lines (in use vs budget) and the 5-second frame-rate lines.

  • …20261128-201814-27056.log: default line
  • …20261128-215152-21156.log: default line (stayed under budget)
  • …20261128-222740-20352.log: default line
  • …20261128-224958-24772.log: default line
  • …20261129-031400-25104.log: default line; over budget at 03:21:49–03:22:25 UTC, when the GPU took 47–54 ms per frame
  • …20261129-034105-26896.log: VICTORY_TEXTURE_ROOM_PERCENT=85; never over budget

No crash log: none of these runs crashed, and crashes.log does not exist.

GPU: NVIDIA GeForce RTX 5080 16 GB, driver 610.88. Windows: Windows 11 (build 26300).

issue-1963-logs.zip

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7250787556 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1963#issuecomment-7250787556). Originally posted by [BBobbyD](https://github.com/BBobbyD) on 2026-11-29T04:39:53Z. --- Logs attached: play logs for all six runs in the table (the usernames, PC name and game folder path are replaced with placeholders such as `<user>` and `<game-folder>`). The numbers come from the `the texture queue's room` lines (in use vs budget) and the 5-second frame-rate lines. - `…20261128-201814-27056.log`: default line - `…20261128-215152-21156.log`: default line (stayed under budget) - `…20261128-222740-20352.log`: default line - `…20261128-224958-24772.log`: default line - `…20261129-031400-25104.log`: default line; over budget at 03:21:49–03:22:25 UTC, when the GPU took 47–54 ms per frame - `…20261129-034105-26896.log`: `VICTORY_TEXTURE_ROOM_PERCENT=85`; never over budget No crash log: none of these runs crashed, and `crashes.log` does not exist. GPU: NVIDIA GeForce RTX 5080 16 GB, driver 610.88. Windows: Windows 11 (build 26300). [issue-1963-logs.zip](https://github.com/user-attachments/files/35563604/issue-1963-logs.zip)
kalberts0089-hash commented 2026-11-29 08:01:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kalberts0089-hash on 2026-11-29T08:01:04Z.


I went through the six attached logs. Every over-budget sample was admitted only because room() subtracts the free space in texture blocks from used. The render-target and buffer reserves were mostly 0 at those moments, so making the headroom follow them would not have caught these samples.

What room() weighs

crates/victory-gpu/src/resource.rs:2021-2023 (main e1f2eb6):

let line = room_line(budget).saturating_sub(face_headroom_bytes());
used.saturating_sub(crate::pool::texture_room()) + crate::shadow::card_room_kept() + targets_room_kept()
    < line

used is DXGI CurrentUsage for the process (host.rs:11523), so render targets that already exist are counted in it. texture_room() is the free bytes in the existing texture blocks (pool.rs:549-553). Without VICTORY_TEXTURE_ROOM_PERCENT, the line is line_for (resource.rs:2443-2450, 2460-2462), which works out to budget - 768 MiB for budgets from 7,680 to 15,360 MiB. The logged lines (94.7-95.0 % of 14,425-15,209 MB) match that.

What the logs show

I parsed all 1,177 the texture queue's room lines:

  • 22 samples have in-use above the budget (20:18 run 9, 22:27 run 2, 22:49 run 7, 03:14 run 4), by 3 to 165 MB. All 22 end in room.
  • In those samples, 1,040-2,475 MB of free space in texture blocks was subtracted. The card-copy reserve was 0 in all 22, and the render-target reserve was 0 in 20 of them (857 and 813 MB in the other two).
  • Example, 03:21:49: 15157 MB in use - 1635 MB free in texture blocks + 0 + 0 = 13522 MB against a line of 14267 MB (... budget of 15035 MB): room. Without the subtraction it is 15,157 against 14,267.

The 85 % run does the same thing. 55 of its 72 samples were room only because of the subtraction. The difference is how far past the line usage gets, compared with the gap between the line and the budget:

Run Max in use over the line Gap from line to budget
default runs (5) 580-933 MB 768 MiB
03:41, 85 % 484 MB about 2,200 MB

With the default line, the overshoot that netting free blocks allows is about as large as the whole 768 MiB reserve, or larger. At 85 % the same mechanism stays far under the budget.

Hypothesis: free block space that is counted as room but not used for new textures (fragmented, or still resting) lets the queue keep admitting textures that then need new blocks. The widest_free check from #1496 (a38716d, resource.rs:2162-2166) only covers first uploads, and it is not in v2026.11.28.03 anyway.

On main, room() also takes 256 MiB of face headroom off the line (25b3b5c, also not in v2026.11.28.03). The 03:21:49 sample would still pass there: 13,522 against 14,011.

Eviction near the line

vram_keep_below (host.rs:164-180, called with room_line at resource.rs:2802) evicts nothing while used is more than 2 % of the budget below the line. Up to 5 % above the line, it evicts copies that have been idle for 5 s. Beyond that, it evicts copies idle for 1.5 s. With a 15,038 MiB budget those thresholds are 13,969 and 15,021 MiB, so the faster eviction only starts at 99.9 % of the budget. At 85 % they are 83 % and 90 %.

Possible directions, not tested in a game, since I can't run it here:

  • Stop subtracting texture_room() once used is within the reserve of the budget, or cap the subtraction.
  • Weigh against space that a new texture can actually use.
  • Scale the eviction thresholds with the reserve instead of with 1 % steps of the budget.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7252831700 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1963#issuecomment-7252831700). Originally posted by [kalberts0089-hash](https://github.com/kalberts0089-hash) on 2026-11-29T08:01:04Z. --- I went through the six attached logs. Every over-budget sample was admitted only because `room()` subtracts the free space in texture blocks from `used`. The render-target and buffer reserves were mostly 0 at those moments, so making the headroom follow them would not have caught these samples. **What `room()` weighs** `crates/victory-gpu/src/resource.rs:2021-2023` (main e1f2eb6): ```rust let line = room_line(budget).saturating_sub(face_headroom_bytes()); used.saturating_sub(crate::pool::texture_room()) + crate::shadow::card_room_kept() + targets_room_kept() < line ``` `used` is DXGI `CurrentUsage` for the process (`host.rs:11523`), so render targets that already exist are counted in it. `texture_room()` is the free bytes in the existing texture blocks (`pool.rs:549-553`). Without `VICTORY_TEXTURE_ROOM_PERCENT`, the line is `line_for` (`resource.rs:2443-2450`, `2460-2462`), which works out to budget - 768 MiB for budgets from 7,680 to 15,360 MiB. The logged lines (94.7-95.0 % of 14,425-15,209 MB) match that. **What the logs show** I parsed all 1,177 `the texture queue's room` lines: - 22 samples have in-use above the budget (20:18 run 9, 22:27 run 2, 22:49 run 7, 03:14 run 4), by 3 to 165 MB. All 22 end in `room`. - In those samples, 1,040-2,475 MB of free space in texture blocks was subtracted. The card-copy reserve was 0 in all 22, and the render-target reserve was 0 in 20 of them (857 and 813 MB in the other two). - Example, 03:21:49: `15157 MB in use - 1635 MB free in texture blocks + 0 + 0 = 13522 MB against a line of 14267 MB (... budget of 15035 MB): room`. Without the subtraction it is 15,157 against 14,267. The 85 % run does the same thing. 55 of its 72 samples were `room` only because of the subtraction. The difference is how far past the line usage gets, compared with the gap between the line and the budget: | Run | Max in use over the line | Gap from line to budget | |---|---|---| | default runs (5) | 580-933 MB | 768 MiB | | 03:41, 85 % | 484 MB | about 2,200 MB | With the default line, the overshoot that netting free blocks allows is about as large as the whole 768 MiB reserve, or larger. At 85 % the same mechanism stays far under the budget. Hypothesis: free block space that is counted as room but not used for new textures (fragmented, or still resting) lets the queue keep admitting textures that then need new blocks. The `widest_free` check from #1496 (a38716d, `resource.rs:2162-2166`) only covers first uploads, and it is not in v2026.11.28.03 anyway. On main, `room()` also takes 256 MiB of face headroom off the line (25b3b5c, also not in v2026.11.28.03). The 03:21:49 sample would still pass there: 13,522 against 14,011. **Eviction near the line** `vram_keep_below` (`host.rs:164-180`, called with `room_line` at `resource.rs:2802`) evicts nothing while `used` is more than 2 % of the budget below the line. Up to 5 % above the line, it evicts copies that have been idle for 5 s. Beyond that, it evicts copies idle for 1.5 s. With a 15,038 MiB budget those thresholds are 13,969 and 15,021 MiB, so the faster eviction only starts at 99.9 % of the budget. At 85 % they are 83 % and 90 %. Possible directions, not tested in a game, since I can't run it here: - Stop subtracting `texture_room()` once `used` is within the reserve of the budget, or cap the subtraction. - Weigh against space that a new texture can actually use. - Scale the eviction thresholds with the reserve instead of with 1 % steps of the budget.
trustno1-coder commented 2026-11-30 15:38:25 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-30T15:38:25Z.


Closing this because it was opened before v2026.11.29.01, and a great deal has changed since then. The latest release is v2026.11.30.01.

If this still happens, or still applies, on the latest release, please open a new issue. For a bug, attach both logs from that run:

  1. The play log: the newest victory-nvidia-play-<date>-<time>-<number>.log in %LOCALAPPDATA%\victory\logs\.
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, plus the newest .crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\ if there is one from that run.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7283328048 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1963#issuecomment-7283328048). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-11-30T15:38:25Z. --- Closing this because it was opened before v2026.11.29.01, and a great deal has changed since then. The latest release is [v2026.11.30.01](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.30.01). If this still happens, or still applies, on the latest release, please open a new issue. For a bug, attach both logs from that run: 1. The play log: the newest `victory-nvidia-play-<date>-<time>-<number>.log` in `%LOCALAPPDATA%\victory\logs\`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, plus the newest `.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\` if there is one from that run.
Sign in to join this conversation.
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#1963
No description provided.