Textures: release outgrown zero buffers when their last list resets #3297

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

@⁠Heldenkrieger01 on GitHub · 2026-11-29 21:24 UTC · original
Heldenkrieger01:perf/vram-zero-buffer-lifetime → main · +44 −14 · 2 files · 1 commits · closed without merging

Clearing progressively larger textures kept every outgrown device-local zero buffer for the life of the process. Each recording now holds one reference per generation it reads. Resetting the last such list releases the old allocation, including for clears recorded before another list grows the buffer.

On a 10 GiB RTX 3080, clearing 4, 8, 16, 32 and 64 MiB textures through the regular D3D12 list path left 124 MiB of additional DXGI local usage on main and 64 MiB with this change. Three fresh processes per build gave the same result. This measures retained memory after GPU completion and list reset. The two-list lifetime regression also passed.

In-game A/B on a 10 GiB RTX 3080

The opening scene created 4 MiB and 16 MiB zero buffers. An instrumented A/B measured 4 MiB of obsolete device-local allocation on baseline and 0 MiB with the change throughout the measurement window. The 16 MiB current buffer stayed live in both runs. The probe checked references held by GPU command lists and sampled the shared buffer sizes. Indirect scratch was also instrumented and had zero allocations on both sides.

Comparable draw workloads Median draws/frame Rendered FPS p99 frame time Mean process-local VRAM
Baseline, higher draw count 4,451 11.67 197.3 ms 8,169 MiB
PR, higher draw count 4,505 11.57 188.3 ms 8,315 MiB
Baseline, lower draw count 2,685 3.24 573.8 ms 8,160 MiB
PR, lower draw count 2,567 3.19 583.8 ms 8,147 MiB

These are the uninstrumented allocator runs. Mean whole-process VRAM moved in opposite directions across the two workload comparisons. Neither showed an FPS improvement. One additional PR run reported a GPU device hang before completing the window and is excluded from the table. The next fresh PR run completed. The cause of the hang is undetermined.

All runs started a single fresh game process from the same copied save on a 10 GiB RTX 3080. The Series S profile used the 720p scene setting, DLSS Quality, and frame generation off. The 45-second measurement window started 80 seconds after the first world interval with at least 500 draws/frame. FPS uses title presents, and local VRAM is the process's DXGI local-segment usage. Every build used the same diagnostics compilation fixes from #3086.

Created with GPT-6.2-Astra in the Codex harness.

**@⁠Heldenkrieger01** on GitHub · 2026-11-29 21:24 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3297) `Heldenkrieger01:perf/vram-zero-buffer-lifetime` → `main` · +44 −14 · 2 files · 1 commits · closed without merging Clearing progressively larger textures kept every outgrown device-local zero buffer for the life of the process. Each recording now holds one reference per generation it reads. Resetting the last such list releases the old allocation, including for clears recorded before another list grows the buffer. On a 10 GiB RTX 3080, clearing 4, 8, 16, 32 and 64 MiB textures through the regular D3D12 list path left 124 MiB of additional DXGI local usage on main and 64 MiB with this change. Three fresh processes per build gave the same result. This measures retained memory after GPU completion and list reset. The two-list lifetime regression also passed. ### In-game A/B on a 10 GiB RTX 3080 The opening scene created 4 MiB and 16 MiB zero buffers. An instrumented A/B measured **4 MiB of obsolete device-local allocation on baseline and 0 MiB with the change** throughout the measurement window. The 16 MiB current buffer stayed live in both runs. The probe checked references held by GPU command lists and sampled the shared buffer sizes. Indirect scratch was also instrumented and had zero allocations on both sides. | Comparable draw workloads | Median draws/frame | Rendered FPS | p99 frame time | Mean process-local VRAM | |---|---:|---:|---:|---:| | Baseline, higher draw count | 4,451 | 11.67 | 197.3 ms | 8,169 MiB | | PR, higher draw count | 4,505 | 11.57 | 188.3 ms | 8,315 MiB | | Baseline, lower draw count | 2,685 | 3.24 | 573.8 ms | 8,160 MiB | | PR, lower draw count | 2,567 | 3.19 | 583.8 ms | 8,147 MiB | These are the uninstrumented allocator runs. Mean whole-process VRAM moved in opposite directions across the two workload comparisons. Neither showed an FPS improvement. One additional PR run reported a GPU device hang before completing the window and is excluded from the table. The next fresh PR run completed. The cause of the hang is undetermined. All runs started a single fresh game process from the same copied save on a 10 GiB RTX 3080. The Series S profile used the 720p scene setting, DLSS Quality, and frame generation off. The 45-second measurement window started 80 seconds after the first world interval with at least 500 draws/frame. FPS uses title presents, and local VRAM is the process's DXGI local-segment usage. Every build used the same diagnostics compilation fixes from #3086. Created with GPT-6.2-Astra in the Codex harness.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 21:27:40 +00:00
github-bot closed this pull request 2026-11-29 22:40:44 +00:00

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!3297
No description provided.