mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-19 20:25:57 +00:00
entry_of decides at record time whether a new texture takes the content of a live GPU-written texture at its storage (alias_copy) or the storage bytes. In a chunked replay the source's GPU ownership is set when a chunk records its render, so the choice followed the order the threads got to the chunks: a later chunk could take the old bytes before an earlier chunk recorded the render, and a mirrored texture keeps them. Now a chunk that makes an entry while a live colour texture of its size sits at the storage waits until the chunks before it are recorded (vk_exec_chunk_settle, the texture lock released for the wait), skips sources the scan revives at a later op, and ignores GPU ownership a later chunk set in this submission. slot_resolve and vk_texture_by_id_locked no longer read tslots through a pointer taken before the wait. TOTK_REPLAY_SKEW_US (debug) makes the even chunks wait before they record, so the chunk after each one records first in every submission. With it at 3000 us and 4 threads the field save runs clean (grass drawn, 0 validation errors); the alias path did not fire there (0 copied, 0 filled from storage), so this does not reproduce the missing grass reported on RADV, and the fix there stays unconfirmed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>