mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 10:19:57 -04:00
Leave a page alone when a shadow write-back cannot hold the write it reports.
With shadow storage a write-back at a fence copies a page that has no base copy whole from the shadow into guest memory. Every write the replay records gets base copies, so such a page means the pool the write was noted on was finalized before the fence and another was made at its address: the new record's shadow is a copy of guest memory from its own start, holds no byte of that write, and went over everything the CPU had written to the page since. The page is now left alone when the record is younger than the submission whose fence it is, or when the CPU has written the page since the shadow's last copy-in; the shadow line counts such pages. --probe-vkmem has the case: with NX2NAVI_SHADOW=1 it fails without this change (0x11 over the CPU's 0x22, with imports and with mirrors) and passes with it, as does the run without shadow storage. Whether a game does finalize and remake a pool inside that window was not observed in play. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -681,6 +681,7 @@ int vk_sync_wb_split(void); // NX2NAVI_WB_SPLIT: the write-backs
|
||||
// completion thread's time by callback.
|
||||
void vk_sync_exec_stats(uint64_t *waits, uint64_t *early, uint64_t *lag_ns, uint64_t *lag_max_ns);
|
||||
int vk_sync_effect_late(void);
|
||||
uint64_t vk_sync_cb_value(void); // the value whose side effect the calling thread is running; 0: not in one
|
||||
void vk_sync_cb_stats(char *out, size_t n);
|
||||
void vk_exec_late_stats(uint64_t *events, uint64_t *counters, uint64_t *counts); // vk_exec_xfer.c: such callbacks since the last call
|
||||
VkCommandBuffer vk_sync_split_exec(void); // vk_sync_split for the part before a submission's write-backs
|
||||
|
||||
Reference in New Issue
Block a user