Skip to content

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

Closed
Heldenkrieger01 wants to merge 1 commit into
trustno1-coder:mainfrom
Heldenkrieger01:perf/vram-zero-buffer-lifetime
Closed

Heldenkrieger01 wants to merge 1 commit into
trustno1-coder:mainfrom
Heldenkrieger01:perf/vram-zero-buffer-lifetime

Conversation

@Heldenkrieger01

@Heldenkrieger01 Heldenkrieger01 commented Nov 29, 2026 •

Copy link
Copy Markdown

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.

OGShotz added a commit to OGShotz/VIctory-Turing that referenced this pull request Nov 29, 2026
@Heldenkrieger01
Heldenkrieger01 deleted the perf/vram-zero-buffer-lifetime branch November 29, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant