mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 09:09:56 -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:
@@ -482,6 +482,7 @@ static VkCommandBuffer prologue(VkCtx *c, uint64_t fence) {
|
||||
VkCommandBuffer vk_sync_split(void) {
|
||||
VkCtx *c = vk_ctx();
|
||||
VkCommandBuffer cb = slots[cur_slot].cb;
|
||||
vk_gpu_passes_part(cb, 1);
|
||||
ts_end(cb, cur_fence);
|
||||
if (!rec_end_cb(cb, 0, 0)) vkEndCommandBuffer(cb); // every command of the part is in cb, ended by its recorder
|
||||
vk_upload_flush(0); // the uploads this part asked for precede it in queue order
|
||||
@@ -500,6 +501,7 @@ VkCommandBuffer vk_sync_split(void) {
|
||||
vk_crumb(s->cb, VK_CRUMB_SUBMIT, cur_fence);
|
||||
ts_begin(s->cb);
|
||||
rec_begin(s->cb, cur_fence);
|
||||
vk_gpu_passes_part(s->cb, 0);
|
||||
return s->cb;
|
||||
}
|
||||
|
||||
@@ -533,8 +535,10 @@ uint64_t vk_sync_submit(const uint64_t *handles, int n) {
|
||||
vk_crumb(s->cb, VK_CRUMB_SUBMIT, fence);
|
||||
ts_begin(s->cb);
|
||||
rec_begin(s->cb, fence);
|
||||
vk_gpu_passes_part(s->cb, 0);
|
||||
int recorded = vk_exec_record(s->cb, handles, n, fence);
|
||||
s = &slots[cur_slot]; // the last part (vk_sync_split)
|
||||
vk_gpu_passes_part(s->cb, 1);
|
||||
if (recorded) ts_end(s->cb, fence);
|
||||
else ts_drop();
|
||||
// The recorder is done with the part: the end-of-submission crumb, then the end, by the recorder when it records.
|
||||
|
||||
Reference in New Issue
Block a user