From f35e8d1eb2baa736d74f41d23e892b91d6c81a68 Mon Sep 17 00:00:00 2001 From: Tobim6 <102646588+Tobim6@users.noreply.github.com> Date: Thu, 12 Nov 2026 16:23:00 +0100 Subject: [PATCH] Recorder thread on for AMD GPUs without mesh shaders (GCN, RDNA 1): the reported device losses were all on RDNA 2-4; an RX 580 ran clean with NX2NAVI_REC_CHECK. Co-Authored-By: Claude Opus 5.5 --- runtime/vk_rec.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/runtime/vk_rec.c b/runtime/vk_rec.c index 97098330..e9fea21e 100644 --- a/runtime/vk_rec.c +++ b/runtime/vk_rec.c @@ -166,10 +166,15 @@ void rec_begin(VkCommandBuffer cb, uint64_t fence) { // past it). Keeping objects until their submission completed and ending a part from the recorder // (rec_end_cb) fixed the white scene on an RX 6700 XT, but not this: 0.2.8 turned the recorder on for every // GPU and the AMD reports came back the same day. NX2NAVI_VK_RECORDER=1 turns it on for an A/B run. + // On AMD GPUs without mesh shaders (GCN: RX 400/500, Vega; RDNA 1) it is on: every report above is from an + // RDNA 2-4 card, and those all have mesh shaders. An RX 580 ran with it and NX2NAVI_REC_CHECK + // (no hazards), the replay's part of the game's wait after a frame's first submission 6.9 ms instead of 12. const char *set = cfg_get("NX2NAVI_VK_RECORDER"); - mode = rt_knob("VK_RECORDER", vk_caps.amd ? "0" : "1"); - if (!mode && vk_caps.amd && !(set && *set)) - rt_log("vk_rec: no recorder thread on AMD GPUs (NX2NAVI_VK_RECORDER=1 turns it on)"); + int amd_off = vk_caps.amd && vk_ctx()->has_mesh_shader; + mode = rt_knob("VK_RECORDER", amd_off ? "0" : "1"); + if (!mode && amd_off && !(set && *set)) + rt_log("vk_rec: no recorder thread on AMD GPUs with mesh shaders (RDNA 2 and newer; NX2NAVI_VK_RECORDER=1 " + "turns it on)"); if (mode) { plat_event_init(&wake_ev, 0, 0); rec_prio = plat_thread_priority_get();