From c656532cd357afe5b1447bf092800a0eb84fe793 Mon Sep 17 00:00:00 2001 From: chrg6 Date: Fri, 13 Nov 2026 05:55:05 -0500 Subject: [PATCH] Warn in the log when replay workers are set by number on AMD's driver for RX 6000 and older. The automatic count gives that driver no workers, since a game with workers lost its device there, but a number in nx2navi.ini or the menu starts them without a word. The number still applies; the log now says that workers on this driver have caused device loss and that auto or 0 avoids it. Co-Authored-By: Claude Opus 5.5 --- runtime/vk_exec.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/runtime/vk_exec.c b/runtime/vk_exec.c index 5ac29395..c48d3c1e 100644 --- a/runtime/vk_exec.c +++ b/runtime/vk_exec.c @@ -2060,8 +2060,9 @@ static void rw_main(void *arg) { // gave all there was (5 and 7 measured the same), so the count is half the physical cores less one: 2 on 6 cores, 3 on // 8, 5 on 12, at most 6. Four cores or fewer get none: a worker would take a core from the game's threads. AMD's // Windows driver for RX 6000 and older (vk_caps.amd_sc) gets none either, as that is where a player's device was lost -// with workers on and the cause is not known; a number set in nx2navi.ini or the menu still applies there. Physical -// cores of the process's affinity (plat_cpu_cores), or half the usable logical processors where that is unknown. +// with workers on and the cause is not known; a number set in nx2navi.ini or the menu still applies there, with a +// warning in the log (rw_init). Physical cores of the process's affinity (plat_cpu_cores), or half the usable logical +// processors where that is unknown. #define RW_AUTO_MAX 6 int vk_exec_replay_workers_auto(const char **why) { uint64_t all, first; @@ -2084,6 +2085,9 @@ static void rw_init(void) { uint64_t all, first; rt_log("vk: replay workers automatic: %d for %d physical cores (%s; NX2NAVI_REPLAY_WORKERS = a number sets " "them)", RW.n, plat_cpu_cores(&all, &first), why); + } else if (RW.n && vk_caps.amd_sc) { // the player's number stays (vk_exec_replay_workers_auto) + rt_log("vk: WARNING: %d replay workers set on AMD's driver for RX 6000 and older, where a game with workers lost " + "its device; NX2NAVI_REPLAY_WORKERS = auto or 0 avoids it", RW.n); } for (int k = 0; k < RW.n; k++) { RwWorker *w = calloc(1, sizeof *w);