VICTORY_TABLED_REREAD=1: a table read takes out a slot written after its frame's first read (off)

A slot draws read through a table leaves the queue of textures picked by
index at its first table read of a frame only (`tabled_in`, once per slot
and frame; and the draws of a recording tell of a record once,
`Listed::tabled`). The title rewrites tables' slots while it records: a
slot written after that read is queued due `TABLED_GRACE` (8) frames on, the
draws that read it later in the same frame leave it there, and the pass
takes it 8 frames later and finds it uploaded by those draws or nothing to
do: 17,000-58,000 slots in 5 s of a cutscene (coolfox-20261126-223059,
analysis 6.6; "read through tables" and much of "nothing to bring up to
date" in the pass's split line).

With the switch, such a later read takes the slot out when the queue's marks
(b5b7806) say it holds it, a lock-free look (without the marks it does
nothing: every read would take the lock), and the recording's gate lets a
slot the queue holds through, so the draw also makes the title's slot in
place as at a first read (`mirror_after`). Counted in the lock line: slots
taken out by a table read after the first of their frame, since the start.

Off by default (not behaviour-neutral): a shader that picks such a slot by
index then sees what the draw made of it at once, not what the pass makes 8
frames later; that lateness is a candidate of the flicker at scene loads
(analysis 6.12).

Test: written after its frame's first read, a slot waits for its grace
frames; a later read takes it out with the switch only.

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 abf1020d25
commit 8625c3a00b
3 files changed
+89 -5

No files matched your search

+3 -1
View File
@@ -9202,7 +9202,8 @@ impl Meter {
slot, {} taking the slots due, {} making slots due, {} noting a slot's record, {} by table reads, {} for \
stale views, {} else); waited for {} ms ({}, {}, {}, {}, {}, {}, {} ms by the same places); held {} ms \
taking the slots due, {} ms making slots due, {} ms for stale views; not taken {} times, as nothing would \
have changed ({} noting a slot's record, {} by table reads, {} for stale views)",
have changed ({} noting a slot's record, {} by table reads, {} for stale views); since the start, {} slots \
taken out by a table read after the first of their frame (VICTORY_TABLED_REREAD=1)",
taken.iter().sum::<u64>(),
taken[0],
taken[1],
@@ -9226,6 +9227,7 @@ impl Meter {
skipped[3],
skipped[4],
skipped[5],
crate::descriptor::host::TABLED_WRITES[2].load(Ordering::Relaxed),
);
}
}