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 <[email protected]>
This commit is contained in:
readmet3xt-labandClaude Opus 5.5 committed 2026-11-27 01:03:43 +05:30
1 parent 5dda41ddff
commit 13dca45ac6
1 file changed
+5 -4
+5 -4
View File
@@ -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.)