mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 12:29:57 -04:00
Speed up the replay and fix what the perf pass found, and add a frame capture key for chasing rendering faults.
Performance: draws reuse the bindings that did not change and record only the dynamic states that differ from what the command buffer holds; small uploads come from a staging arena; finished submissions are held briefly and handed to the queue in batches; the recorder thread can keep a CPU core of its own; ASTC block-linear textures are deswizzled on the GPU; dynamic resolution steps the upscaler mode to hold a frame-time target. Each has a setting in nx2navi.ini (bind_reuse, dyn_delta, stg_arena, submit_batch, recorder_core, recorder_prio, astc_gpu_deswizzle, dyn_res) and the staging cache now frees what it holds at shutdown. Capture: NX2NAVI_DUMP=key saves the frame after each press of Insert, with mesh draws listed by task, mesh and fragment shader, depth test and face culling, and mesh_prims.txt giving each mesh draw's primitive, clipping and fragment counts. All of it is off unless NX2NAVI_DUMP is set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -35,8 +35,15 @@
|
||||
#define VSYNC_HZ 60
|
||||
|
||||
// ---- queue lock
|
||||
// Taking it hands the replay's held submissions to the queue first (vk_sync.c, submit batching), so whatever the
|
||||
// holder submits or waits for comes after them in queue order.
|
||||
static PlatRMutex g_ql;
|
||||
void vk_queue_lock(void) { plat_rmutex_lock(&g_ql); }
|
||||
void vk_queue_lock(void) {
|
||||
plat_rmutex_lock(&g_ql);
|
||||
vk_sync_flush_held();
|
||||
}
|
||||
void vk_queue_lock_raw(void) { plat_rmutex_lock(&g_ql); }
|
||||
int vk_queue_trylock_raw(void) { return plat_rmutex_trylock(&g_ql); }
|
||||
void vk_queue_unlock(void) { plat_rmutex_unlock(&g_ql); }
|
||||
|
||||
// ---- window state shared with the back end
|
||||
|
||||
Reference in New Issue
Block a user