From 83eade69d150132d71a1dc27f7da6d9aeb301068 Mon Sep 17 00:00:00 2001 From: Tobim6 <102646588+Tobim6@users.noreply.github.com> Date: Thu, 12 Nov 2026 16:23:24 +0100 Subject: [PATCH] Prewarm: emulated mesh pipelines are built ahead of play On a GPU without mesh shaders the boot prewarm dropped every recorded mesh pipeline, also with the mesh emulation, which builds them as a vertex pipeline plus compute stages (pipe_miss: layout_get_emu). Each was then built at its first draw, 113-830 ms on an RX 580 (22 of the 48 pipelines missed entering Kokiri Forest on 0.9.1), and the draws waiting for it were skipped: frames held back or shown without them. With NX2NAVI_MESH_EMULATION on they are built by the prewarm like the others. Co-Authored-By: Claude Opus 5.5 --- runtime/vk_pipeline.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/runtime/vk_pipeline.c b/runtime/vk_pipeline.c index ef816fec..5e206d9f 100644 --- a/runtime/vk_pipeline.c +++ b/runtime/vk_pipeline.c @@ -5325,8 +5325,12 @@ static void prewarm_run(void) { VkPipeState s = r[i].s; s.vs = vs, s.fs = fs, s.ts = ts; // a mesh pipeline of the shared list (keys_open_seed) on a GPU without mesh shaders, which draws them through - // the mesh fallback: none to build, as the preparation skips it (seed_pipelines) - if (is_mesh(&s) && !vk_ctx()->has_mesh_shader) { + // the mesh fallback: none to build, as the preparation skips it (seed_pipelines). With the mesh emulation + // (NX2NAVI_MESH_EMULATION) it is a vertex pipeline and its compute stages (pipe_miss: layout_get_emu), built + // here like the others: left to the first draw, each took 113-830 ms on an RX 580 and the draws waiting for it + // were skipped (22 of the 48 pipelines missed entering Kokiri Forest, 0.9.1), frames held back or shown without + // them. + if (is_mesh(&s) && !vk_ctx()->has_mesh_shader && !mesh_emu_on()) { dropped++; continue; }