Every slot record a recording thread, the heaps' records thread or a draw
makes is noted in the queue of textures picked by index under its one lock
(`HostHeap::queue_texture`), and so is every first table read of a slot in a
frame (`tabled_in`) and every slot a newer view makes stale. Most of these
change nothing: a buffer view, a sampler or a null taken out of a queue that
does not hold the slot; a slot a draw or the pass made from the record the
queue holds already (`seen`, kept as it is); a table read of a slot not
queued. Other threads waited 33-44 s for the lock in a run of 150 s
(coolfox-20261126-232343, -233017), up to 3.3 s in 5 s of a cutscene.
The queue now marks, per title slot, the write of the entry it holds (0:
none; `QueueMarks`, set by the queue itself under its lock). These three
places read the mark first and do not take the lock when it says nothing
would change. Behaviour-neutral: a mark read while the queue changes it
says what the queue held just before or just after, as if the lock had been
taken a moment earlier or later, which any of these threads may always do;
writes (not `seen`) always take the lock. Counted as "not taken" by place
in the lock line (18ff932). On by default; `VICTORY_QUEUE_MARKS=0` takes the
lock every time, as before (for comparing).
Tests: the queue marks what it holds through writes, makes, looks, uploads
in part, memory made due and removals; notes that change nothing leave the
queue (and its marks) as they were.
Co-Authored-By: Claude Opus 5.5 <[email protected]>