diff options
| author | DadaCap <167002618+DadaCap@users.noreply.github.com> | 2026-11-27 09:45:56 +0100 |
|---|---|---|
| committer | DadaCap <167002618+DadaCap@users.noreply.github.com> | 2026-11-27 10:17:33 +0100 |
| commit | 555cf92a1909a6b3c03f1830368dc7a9cd1f884a (patch) | |
| tree | b8d7065c49b566d5970cd3e69b9f144126b5aa43 /tests/test_run_gpu_tests_python_assembler.py | |
| parent | d78b0e90ab74cf74832f17b85fe5d682d2adf2d8 (diff) | |
d3d12: retire a title window nothing reaches; what the GPU wrote in it still goes back (RT-TITLE-WINDOW-RETIRE)
On top of #1920, which keeps stream-pool extents inside the free span in
both views and makes TitleVaAliases::add_twin refuse an overlap. Other
ranges still replace a window's ranges whole by design: a slot-133 buffer
the title places over the window's pages, a BVH input's exact copy, an
upload alias. The window was then left in title_windows and pool_spans,
refreshed at every submission and charged to LEONIDA_TITLE_WINDOWS_MB, with
nothing left to reach it. A retail run showed most of the windows' memory
growth to be such orphans; the title released none of the windows' pages,
so retiring a window with its pages never fired.
A window no range answers from any more is retired after the next
submission's refresh: the alias table's listener records removed ranges'
copies, and the touched windows TitleVaAliases::answers_into finds
unreached leave pool_spans and the budget at once.
Its memory is freed only once nothing can still reach it. A command list
resolves its root views when they are recorded (GraphicsCommandList::
address), so a list recorded before the retirement and executed, or
executed again, after it still names the window; so does the copy of the
lists a held batch (a Wait before its Signal) or the async worker keeps.
Each backend CommandList, and each copy, now carries the epoch its
recording began in (src/command_list_epochs.h); a retired window takes its
ticket only once no list older than its retirement is alive and the
replays in progress then have recorded their submissions, and is freed
when that ticket has completed.
Until then the copy stays a target of its pages' tracker, still
refreshed, and what the GPU wrote in it goes back to the title's pages:
with its submissions' write-back, and once more when it is freed. The
second is needed because a list's ranges are noted when it is recorded,
so a held batch's can go back, tagged with a later submission's ticket,
before the batch has run. A retired copy goes back only where no live copy
changed the bytes, and every copy is compared, 256 bytes at a time, with
the title's bytes as they were before any copy went back: a copy that
still held them used to overwrite another's result when it came later in
the tracker.
Tests: d3d12_title_window_orphans. A window a slot-133 buffer replaced is
retired, its bytes returned and its memory freed. A writing batch held on
a fence on another queue, recorded before the next submission's refresh
retires its window, keeps the window alive past a completed submission,
and once it has run and its list is reset, its 64 words reach the title's
pages and the window is freed. Without the retirement the window stays
(3 -> 3 windows); without the list epochs it is freed while the held batch
still names it; without the last copy back 0 of 64 words arrive.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gt9hwNPurxyJ9LAfUbNiYr
Diffstat (limited to 'tests/test_run_gpu_tests_python_assembler.py')
0 files changed, 0 insertions, 0 deletions