From 13dca45ac6cda9dcda6c0ff8a1e9ac8ebb16bbb3 Mon Sep 17 00:00:00 2001 From: readmet3xt-lab <238408149+readmet3xt-lab@users.noreply.github.com> Date: Fri, 27 Nov 2026 00:29:04 +0530 Subject: [PATCH] Texture pass: a slot shown after its upload or flipped uses the view read at its turn's start The pass reads the view a slot holds at the start of the slot's turn (under the views table's read lock: the record, the view by its number, a copy of it). For a slot shown after its upload (VICTORY_SHOW_AFTER=1, in the launcher) or flipped from an earlier view of the same texture, it read the same record and view again a few microseconds later to make the host texture and its upload. It uses the first read now. Other threads waited 86-383 ms per 5 s of a cutscene for the views table's lock (coolfox-20261126-233017). Behaviour-neutral: the record may change between two reads, and using the first is as if the second had come that much earlier; a write of the slot meanwhile queues it again, as before. Slots made at once (the other path) are unchanged. Co-Authored-By: Claude Opus 5.5 --- crates/victory-gpu/src/draw.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/victory-gpu/src/draw.rs b/crates/victory-gpu/src/draw.rs index 47db346..bf55930 100644 --- a/crates/victory-gpu/src/draw.rs +++ b/crates/victory-gpu/src/draw.rs @@ -3412,11 +3412,12 @@ impl State { Some((view, key)) => (Some(view), Some(key)), None => (None, None), } + } else if shows_other || late { + // The view read at the start of this slot's turn (read + // again, the views' table was asked twice a slot). + (held.clone(), None) } else { - let view = heap.handle(index).and_then(|handle| { - if shows_other || late { crate::descriptor::view(handle) } else { host.mirror(index, handle, true) } - }); - (view, None) + (heap.handle(index).and_then(|handle| host.mirror(index, handle, true)), None) } }); // (`nothing`: the slot has nothing to bring up to date.)