mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 09:19:58 -04:00
Wait for the whole boot prewarm and show its progress on a boot screen.
The game used to start after at most 3 s of prewarm, so after a translator, GPU or driver change it met the rest of its shaders in play and stalled on each one. It now waits for all of it: a warm start is ready in about half a second and shows nothing, while a cold one shows a "Preparing shaders" screen in the menu's colours and the game's fonts, with the shader and then the pipeline count and a bar. The shader and pipeline prewarm report their numbers every 100 ms. The present path takes a frame without a game image for the screen. The RomFS opens on the first host-side read, so the screen's fonts load before the guest's first file access. NX2NAVI_PREWARM_WAIT_MS now defaults to 0 (no cap). With no progress for 60 s the game starts anyway and the prewarm finishes in the background. Measured with an emptied cache: 2,988 shaders translated and 2,399 pipelines built in 9.4 s behind the screen, then 0 ms shader and pipeline waits in Kokiri Forest. Warm: the game starts 0.47 s after launch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -85,8 +85,9 @@ keeps per-core data without locks and relies on that, so the host models it (`ru
|
||||
- Shaders: Ampere (SM86) code is lowered to Maxwell (`tools/xlate/AmpereLowering.cs`) and translated to SPIR-V by the
|
||||
pinned shader translator (`tools/vendor/ryujinx`, 1.3.2) with our patches (`tools/xlate/patches/`), built with .NET 10 NativeAOT as
|
||||
`nx2navi_xlate.exe` and run as separate processes. Translations are cached on disk; shaders and pipelines seen in
|
||||
play are prepared at the next boot, which waits for them at most `NX2NAVI_PREWARM_WAIT_MS` and then lets them finish
|
||||
in the background.
|
||||
play are prepared at the next boot. The game waits for all of it (`runtime/boot.c` `boot_wait`): about half a second
|
||||
when warm; after a translator, GPU or driver change a "Preparing shaders" screen shows the progress (`ui/menu.cpp`
|
||||
`menu_boot_frame`). `NX2NAVI_PREWARM_WAIT_MS` caps the wait, after which the rest finishes in the background.
|
||||
- Mesh and task shaders run as `VK_EXT_mesh_shader`; indirect mesh draws read NVN's `{count, first}` record through a
|
||||
ring of Vulkan `{x, y, z}` records filled on the GPU.
|
||||
- Pipelines: `VK_EXT_graphics_pipeline_library` where the driver has it: stage libraries compiled ahead, a fast link
|
||||
|
||||
Reference in New Issue
Block a user