mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 10:49:58 -04:00
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:
@@ -302,9 +302,14 @@ int vk_replay_async(void) {
|
||||
}
|
||||
|
||||
// With the replay on its own thread a submission's value covers its replay too, and the wait stays the fence's.
|
||||
static int vk_be_exec_wait(uint64_t value, uint64_t timeout_ns) {
|
||||
static int vk_be_gpu_wait(uint64_t value, uint64_t timeout_ns) {
|
||||
return vk_replay_async() ? vk_sync_fence_wait(value, timeout_ns) : vk_sync_exec_wait(value, timeout_ns);
|
||||
}
|
||||
// The submit wait (nvn_api_core.c NX2NAVI_SUBMIT_FINISH): the GPU's only where the submission reads guest memory on the
|
||||
// GPU (vk_sync_recorded_wait).
|
||||
static int vk_be_exec_wait(uint64_t value, uint64_t timeout_ns) {
|
||||
return vk_sync_recorded_wait(value, timeout_ns, vk_be_gpu_wait);
|
||||
}
|
||||
|
||||
// The front end's view (nvn_api_core.c, nvn_api_cmd.c): replay is asynchronous only on this back end.
|
||||
int gfx_replay_async(void) { return gfx_backend() == &gfx_vulkan_backend && vk_replay_async(); }
|
||||
|
||||
Reference in New Issue
Block a user