New host lists for the title's lists left open for its next reset

At every submission each of the title's lists gets a new host list, from
the pool of landed lists (reset when they landed) or newly made: open and
empty. It was closed at once on the submitting thread, so that the
title's next call on its list, a reset, found it closed, and that reset
then reset allocator and list once more. About 200 empty closes a frame
on the submitting thread (HostList::close under list::detach, 3% of its
samples in profile-y-prof60, about 1 ms a frame) and 200 needless resets
on the threads that translate lists.

Now the new host list is left open and marked with its title calls and
epoch; the title's reset finds it so and skips the D3D12 reset (the rest
of the reset, scratch memory, states, steps, is done as before). If the
title submits the list again without a reset, the host list is closed
when it is taken to run, as before. If anything was recorded into it
before the reset (its title calls or epoch moved), it is closed and
reset as before.

Behaviour-neutral: the lists that run on the card are the same (these are
empty either way). On by default; VICTORY_FRESH_OPEN=0 closes them at
once as before. The frame line "new host lists for the title's lists
left open per frame" counts them, the resets that had nothing to undo and
those closed after all.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
readmet3xt-labandClaude Opus 5.5 committed 2026-11-27 01:11:02 +05:30
1 parent ed252ec962
commit a7b86676e7
2 files changed
+106 -12

No files matched your search

+8 -4
View File
@@ -476,14 +476,16 @@ pub(crate) fn detach_parts(lists: &[This]) -> Parts {
continue;
};
// A new host list is open; the title's next call on its list is a
// reset, which wants it closed.
fresh.close();
// reset, which finds it so (or wants it closed).
fresh.leave_open();
// SAFETY: one of our lists, closed and submitted: nothing records
// into it until the title resets it.
let list = unsafe { &mut *this.cast_mut().cast::<List>() };
let Some(host) = list.host.replace(fresh) else {
continue;
};
// (Submitted again without a reset: it runs closed, empty.)
host.close_if_left_open();
let earlier = std::mem::take(&mut list.earlier);
let gate = std::mem::take(&mut list.gate);
let uploads = std::mem::take(&mut *list.uploads.lock().unwrap_or_else(|e| e.into_inner()));
@@ -548,8 +550,8 @@ pub(crate) fn detach(lists: &[This]) -> (Vec<Detached>, Vec<usize>) {
continue;
};
// A new host list is open; the title's next call on its list is a
// reset, which wants it closed.
fresh.close();
// reset, which finds it so (or wants it closed).
fresh.leave_open();
let list = this.cast_mut().cast::<List>();
// SAFETY: one of our lists, closed and submitted: nothing records
// into it until the title resets it.
@@ -557,6 +559,8 @@ pub(crate) fn detach(lists: &[This]) -> (Vec<Detached>, Vec<usize>) {
let Some(host) = (*list).host.replace(fresh) else {
continue;
};
// (Submitted again without a reset: it runs closed, empty.)
host.close_if_left_open();
let uploads =
std::mem::take(&mut *(*list).uploads.lock().unwrap_or_else(|e| e.into_inner()));
let state =