mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 06:29:58 -04:00
Let the game go on while the GPU runs the end of the last frame, with tail_early = 1.
The game waits each frame until the GPU has finished the frame before. In Hyrule Field with FSR 4 the last of that work is one part of 4.7 ms, the temporal upscaler and the interface drawn after it, then 1.4 ms of write-backs, and what the game reads of the frame is done before the upscaler runs. With NX2NAVI_TAIL_EARLY the replay records that tail into a command buffer of its own, and when it hands the CPU nothing but timestamps, writes no pool memory but inline uniform updates of mirrored blocks and reads no guest memory late, the write-backs go to the queue before it with the executed timeline's signal. The game's waits end there, and the GPU runs the tail while the next frame is prepared. The GPU's commands are the same; a tail that fails a test goes as before. Off by default. RX 7900 XT, Ryzen 7 5800X3D, 3440x1440, FSR 4 Native AA, one batch, replay workers off: 50.7 against 42.5 fps standing and 56.0 against 45.9 along the field route; with FSR 3.1, 51.8 against 47.8 and 54.9 against 52.3. With three replay workers, FSR 4, standing: 63.5 against 49.4. The screenshots matched those without it standing, along the route and through warps to five areas, with no black frame outside the loading screens of both. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
17
runtime/vk.h
17
runtime/vk.h
@@ -379,6 +379,23 @@ int vk_mem_take_live(void);
|
||||
// for the newest such submission up to the one it waits for.
|
||||
enum { VK_RES_EVENT = 1, VK_RES_COUNTER = 2, VK_RES_OQ = 4, VK_RES_WRITE = 8, VK_RES_WRITEBACK = 16, VK_RES_KINDS = 5 };
|
||||
void vk_exec_note_results(int kind); // VK_RES_*
|
||||
// The early tail (vk_exec.c "the early tail", NX2NAVI_TAIL_EARLY). vk_exec_tail: the replay is recording a submission's
|
||||
// tail. vk_sync.c: the tail's command buffer set aside for the write-backs' one (hold), then the part with the
|
||||
// write-backs handed over with the executed timeline's signal and the tail put behind it (release); whether a part can
|
||||
// take that order now (ok); the game's wait for a fence (game_wait); for a value whose tail the GPU still runs, about
|
||||
// how long that takes (tail_pending_ns, else 0).
|
||||
struct VkExec;
|
||||
void vk_exec_tail_begin(struct VkExec *ex);
|
||||
int vk_exec_tail(void);
|
||||
void vk_exec_tail_ub(uint64_t fence, uint64_t addr, const void *data, uint32_t size); // vk_exec_xfer.c
|
||||
int vk_sync_tail_ok(void);
|
||||
VkCommandBuffer vk_sync_tail_hold(void);
|
||||
VkCommandBuffer vk_sync_tail_release(void);
|
||||
int vk_sync_game_wait(uint64_t value, uint64_t timeout_ns);
|
||||
uint64_t vk_sync_tail_pending_ns(uint64_t value);
|
||||
int vk_mem_live_swap(int v); // vk_memory.c: the note of a late read of guest memory, exchanged
|
||||
uint64_t vk_mem_gpu_wrote_count(void); // vk_memory.c: GPU writes of pool memory noted so far
|
||||
int vk_mem_wb_lazy(void); // vk_memory.c: the lazy write-back runs
|
||||
int vk_exec_take_results(void); // the kinds noted since the last take
|
||||
void vk_mem_lazy_part_end(void); // lazy write-back: a part ends (before its prologue), and it is handed over
|
||||
void vk_mem_lazy_handed(void);
|
||||
|
||||
Reference in New Issue
Block a user