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 <noreply@anthropic.com>
This commit is contained in:
Tobim6
2026-11-12 16:22:10 +01:00
parent 1768d5f607
commit 2b11e32250

View File

@@ -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;