Repository navigation
Textures: release outgrown zero buffers when their last list resets - #3297
Closed
Heldenkrieger01 wants to merge 1 commit into
Closed
Heldenkrieger01 wants to merge 1 commit into
Heldenkrieger01 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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.