The replay resolves every vertex stream and buffer binding of each draw; four entries thrashed over the pools a
frame touches, and each miss took the pool lock and searched the index. vk_mem_resolve falls from 5.3-6.1% to
1.6% of the RX 9070 render thread, field replay from 9.2 to 8.9 ms. TOTK_RESOLVE_CHECK=1 compares every hit with
the locked lookup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
About 65% of field draws repeat the previous draw's program, state and texture handles; shader_for falls from
10.8% to 6.4% of the RX 9070 render thread and field replay from 9.7 to 9.2 ms. answers_for looks up only the
slots whose handle changed. TOTK_SHADER_MEMO=check verifies both against full lookups; TOTK_BIND_STATS counts
repeats per draw.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The mirror and the texture checks queried about 930 MiB of write-watched memory per frame (0.96 ms on the RX 9070
machine, about 3 ms on an 8th-gen i7), at about 1 us per MiB, and 770 MiB of it lay in 2 MiB regions nothing had
written for two seconds. In mirror mode a region left unwritten for TOTK_FREEZE_IDLE submissions (300; 0 turns it off)
and lying wholly in imported pools is now made read-only (memory.c mem_freeze), and the snapshot and change queries
skip it. The first write faults and a vectored handler thaws the region before the write retries; file reads into
guest memory, which the kernel would refuse on a read-only page, thaw their buffer first and log a refusal, as do pool
init and finalize, and commits, decommits and protection changes thaw under the same lock. A region stays thawed for
5 s after a file read. Field: 66 queries over 380 MiB, 0.56 ms per frame; 0.38 ms of it are the queries that find
writes. The perf line `mem: write-watch` gives queries, bytes, time, frozen MiB, freezes and thaws. The gfx-abi probe
covers freeze, thaw by a write and the hold after mem_thaw. TOTK_MEMORY, TOTK_MIRROR_GAP and TOTK_FREEZE_IDLE are known
settings now.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>