From 2b11e322508f0848e38076eff3c8b594c02262f8 Mon Sep 17 00:00:00 2001 From: Tobim6 <102646588+Tobim6@users.noreply.github.com> Date: Thu, 12 Nov 2026 16:22:10 +0100 Subject: [PATCH] NX2NAVI_PASS_TIMES: write the timestamps straight into the command buffer, not through the recorder. vk_pass_mark_cmd runs on the recorder thread for a pass mark packet; through vk.h's macro its vkCmdWriteTimestamp became a packet of its own, put into the ring by the recorder thread while the replay thread was writing it. The ring broke ("FATAL: vk_rec: unknown packet") on NVIDIA GPUs, where the recorder is on by default. Co-Authored-By: Claude Opus 5.5 --- runtime/vk_crumbs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/vk_crumbs.c b/runtime/vk_crumbs.c index 86fd6ba4..72bc56c5 100644 --- a/runtime/vk_crumbs.c +++ b/runtime/vk_crumbs.c @@ -18,6 +18,11 @@ #include "nvn_api.h" #include "vk.h" +// vk_pass_mark_cmd also runs on the recorder thread (vk_rec.c R_PassMark), where vk.h's macro would turn the timestamp +// into a new packet for the part being recorded: a second producer on the ring, which corrupts it ("vk_rec: unknown +// packet" with NX2NAVI_PASS_TIMES=1 on NVIDIA, where the recorder is on). The command goes straight into cb. +#undef vkCmdWriteTimestamp + static PFN_vkCmdWriteBufferMarkerAMD write_marker; static VkBuffer buf; static VmaAllocation alloc;