Staged mirror uploads: the replay copies guest bytes for the VRAM mirrors while it records, and the first-submission wait ends once the replay has submitted; 8 texture pool sets.

On 0.9.1 this is the release's own mirror capture (NX2NAVI_MIRROR_CAPTURE_KB) turned on: with
NX2NAVI_MIRROR_STAGE=1 (the default) the pages the CPU wrote are copied out of guest memory, up to 64 MiB a
part, when the part is handed to the queue. A submission whose prologue copied everything that way reads no
guest memory late, so the game's wait after a frame's first submission ends once the replay has submitted it
(vk_sync_recorded_wait). One with a range left to the GPU-time copy (a pool with a write-back in flight or a
twin) or a draw that reads a pool without a mirror is noted (vk_mem_note_live), and its wait is the GPU's.
Also 8 texture pool sets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Tobim6
2026-11-12 16:22:47 +01:00
parent 7d54ee73c7
commit ad288e3bc1
7 changed files with 138 additions and 16 deletions

View File

@@ -741,6 +741,9 @@ NVN_API(nvnQueueSubmitCommands) {
// point). Copies of the data at submit made it worse, a mix of two frames' versions.
// NX2NAVI_SUBMIT_FINISH=<mask>: bit i waits after the i-th submission of a frame (default 0x1); a plain 1 waits
// after every submission, 0 never.
// Since the staged mirror uploads (vk_memory.c) the copies of guest memory a submission reads are taken while the
// replay records it, and the wait ends once the replay has submitted it (vk_sync_recorded_wait); the GPU's wait
// below remains for a submission whose GPU reads guest memory itself.
// The wait (exec_wait, vk_sync.c vk_sync_exec_wait) ends when the GPU has run the submission's passes and the
// results the game reads once it goes on are in its memory, the last frame's occlusion counts among them; the
// write-backs and the completion thread's other side effects are not waited for. NX2NAVI_WB_SPLIT=0 makes it