mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 23:59:59 -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:
@@ -584,6 +584,12 @@ int vk_pipeline_async_on(void); // 1 after vk_pipeline_async_enable: graphics
|
||||
// cached under the current translator from their stored inputs, and builds every recorded pipeline, on all cores.
|
||||
// No-op without vk_pipeline_async_enable, with NX2NAVI_PIPE_PREBUILD=0 or with NX2NAVI_GPU=null.
|
||||
void vk_pipeline_prewarm(void);
|
||||
typedef struct {
|
||||
int phase; // 0 starting (device, key file), 1 shaders, 2 pipelines, 3 done
|
||||
int64_t sh_done, sh_total, sh_translated; // gfx_shader_prewarm_progress
|
||||
int64_t pipe_done, pipe_total; // pipelines built or failed of those queued
|
||||
} VkPrewarmProgress;
|
||||
void vk_pipeline_prewarm_progress(VkPrewarmProgress *p); // any thread, while vk_pipeline_prewarm runs or after
|
||||
VkPipeline vk_pipeline_compute(const GfxShader *cs, const VkPipeInfo **info);
|
||||
// Records every dynamic state that VkPipeState determines, after binding a graphics pipeline: cull mode, front face,
|
||||
// topology, depth and stencil tests and ops, depth bias enable, rasterizer discard, vertex input, and, where the GPU
|
||||
|
||||
Reference in New Issue
Block a user