diff --git a/runtime/host.h b/runtime/host.h index c8ff0e3a..cf6014ed 100644 --- a/runtime/host.h +++ b/runtime/host.h @@ -63,7 +63,8 @@ void perf_count(int kind); // pipe_create_in), guest memory maps (heap size, MapPhysicalMemory), NVN memory pool initialize and finalize // (vk_memory.c vk_pool_init, vk_pool_fini), device memory VMA allocates (blocks and dedicated memory, vk_device.c // timed_alloc), and DLSS and DLSS frame generation feature creates (vk_dlaa.c). perf_mark_begin returns 0 while the trace is off, so a normal run pays one branch per site. -// UPWAIT: the upscalers' waits for the GPU before they free what they let go of (vk_dlaa.c vk_upscaler_device_idle); +// UPWAIT: the upscalers' waits for the GPU before they free what they let go of (vk_dlaa.c vk_upscaler_device_idle, +// and vk_upscaler_gpu_wait's timeline wait after a refused creation); // UPREL: their releases of DLSS features and FSR contexts (vk_dlaa.c, vk_ffx.cpp, vk_ffx4.cpp). enum { PERF_M_FILE, PERF_M_ZSTD, PERF_M_PIPE, PERF_M_GMEM, PERF_M_POOL, PERF_M_DEVMEM, PERF_M_NGX, PERF_M_UPWAIT, PERF_M_UPREL, PERF_M_N }; diff --git a/runtime/perf.c b/runtime/perf.c index 063e2856..14b6efed 100644 --- a/runtime/perf.c +++ b/runtime/perf.c @@ -151,7 +151,7 @@ void perf_count(int kind) { // names them on a slow frame's line and adds them to the 60-frame window's line. static const char *const mark_name[PERF_M_N] = {"file reads", "zstd decodes", "pipeline creates", "guest memory maps", "pool init/finalize", "device memory allocations", - "DLSS feature creates", "upscaler device waits", "upscaler releases"}; + "DLSS feature creates", "upscaler GPU waits", "upscaler releases"}; static volatile int64_t mk_ns[PERF_M_N], mk_n[PERF_M_N], mk_bytes[PERF_M_N], mk_max[PERF_M_N]; // since the last present typedef struct { uint64_t ns[PERF_M_N], n[PERF_M_N], bytes[PERF_M_N], max[PERF_M_N]; } MarkSums; static MarkSums mk_win; // the 60-frame window's, present thread only diff --git a/runtime/vk_dlaa.c b/runtime/vk_dlaa.c index 425491f8..98585da6 100644 --- a/runtime/vk_dlaa.c +++ b/runtime/vk_dlaa.c @@ -730,7 +730,8 @@ static int idle_free(void) { // The upscalers' waits for the device to be idle before they free what the GPU may still use (vk_dlaa.c, vk_ffx.cpp, // vk_ffx4.cpp), with the queue lock held: the present's flip, the completion thread's hold release and every upload -// submit wait as long. NX2NAVI_TRACE=perf names them "upscaler device waits" on a slow frame's line. +// submit wait as long. NX2NAVI_TRACE=perf names them "upscaler GPU waits" on a slow frame's line, together with +// vk_upscaler_gpu_wait's timeline waits after a refused creation, which touch no queue. void vk_upscaler_device_idle(void) { uint64_t t0 = perf_mark_begin(); vk_queue_lock(), vkDeviceWaitIdle(vk_ctx()->device), vk_queue_unlock(); diff --git a/runtime/vk_ffx.h b/runtime/vk_ffx.h index ad1c5796..94df6bb2 100644 --- a/runtime/vk_ffx.h +++ b/runtime/vk_ffx.h @@ -17,7 +17,7 @@ typedef struct { float fov_y, znear, zfar, meters; } VkFfxCamera; // vk_dlaa.c: the share (0..1) of the extra sharpening FSR 3.1 gets at a render width w of an output width ow float vk_dlaa_fsr3_boost(uint32_t w, uint32_t ow); // vk_dlaa.c: a wait for the device to be idle, the queue lock held, before an upscaler frees what the GPU may still -// use (NX2NAVI_TRACE=perf: "upscaler device waits") +// use (NX2NAVI_TRACE=perf: "upscaler GPU waits", with vk_upscaler_gpu_wait's) void vk_upscaler_device_idle(void); // vk_dlaa.c "what the upscalers let go of while the GPU may still use it", on the thread that makes the upscalers' // calls (vk_dlaa.c's pass hooks):