mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 12:59:58 -04:00
Time what a submission spends on the GPU outside the game's passes and dispatches, with gpu_passes = 1.
A session with per-pass GPU timestamps showed the game's own render passes and compute dispatches at 1.6 to 2.3 ms of GPU time a frame while the perf line's GPU time was 7.7 to 13.5 ms: most of the frame's GPU time is in commands the replay records between the marks, and nothing said which. The timed frames now also get a timestamp at the start and the end of each part of a submission, and every stretch between two marks (or a mark and the part's edge) is a gap. The replay names the kind of commands it records in a gap: buffer and texture copies, fills and clears, the temporal upscaler, write-back merges and copies, depth twin copies, the texture pool marks, the mesh draw counts and block-compressed target copies, each with a size where it has one. The report adds the gaps' time per frame summed by the kinds noted in them (a gap nobody noted holds barriers and state only), the parts' own time for comparison with the perf line, and each kind's count and size per frame. Nothing runs outside the timed frames. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
11
runtime/vk.h
11
runtime/vk.h
@@ -117,6 +117,17 @@ typedef struct {
|
||||
uint32_t layer; // NX2NAVI_GPU_PASSES: the first layer of the depth target (a shadow cascade)
|
||||
} VkPassMark;
|
||||
void vk_gpu_passes_frame(uint64_t frame); // vk_crumbs.c, each present: NX2NAVI_GPU_PASSES, GPU time per pass and dispatch
|
||||
// NX2NAVI_GPU_PASSES also times what a part of a submission spends outside its passes and dispatches (vk_crumbs.c, "the
|
||||
// gap ledger"). vk_gpu_passes_part: vk_sync.c, at the start (end 0) and the end (end 1) of each part's command buffer.
|
||||
// vk_gpu_gap_note: the replay is about to record commands of this kind outside a pass or dispatch; units is their size
|
||||
// (bytes for buffers, texels for images, 0 unknown). Both do nothing outside the timed frames. Replay thread only.
|
||||
enum {
|
||||
VK_GAP_COPY_B2B, VK_GAP_COPY_B2T, VK_GAP_COPY_T2B, VK_GAP_COPY_T2T, VK_GAP_CLEAR_BUF, VK_GAP_CLEAR_TEX,
|
||||
VK_GAP_CLEAR_TARGET, VK_GAP_UPSCALER, VK_GAP_WB_MERGE, VK_GAP_WB_COPY, VK_GAP_TWIN, VK_GAP_POOL_MARKS,
|
||||
VK_GAP_MESH_RING, VK_GAP_BC_BACK, VK_GAP_N
|
||||
};
|
||||
void vk_gpu_passes_part(VkCommandBuffer cb, int end);
|
||||
void vk_gpu_gap_note(int kind, uint64_t units);
|
||||
// Pass marks wanted and possible (NX2NAVI_PASS_CRUMBS and the extensions): set by vk_crumbs_init.
|
||||
extern int vk_pass_marks_on;
|
||||
// vk_device.c create_device, before vkCreateDevice: 1 when NX2NAVI_PASS_CRUMBS asks for NVIDIA checkpoints.
|
||||
|
||||
Reference in New Issue
Block a user