mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 18:09:58 -04:00
Do the whole warm on the boot screen at the first start after a driver change.
A start that finds the pipeline cache written by another device or driver has nothing built, and everything was compiled beside the game: an 8-core integrated GPU drew fewer than 600 frames in its first 11 minutes. Such a start now waits on the "Preparing shaders" screen, with counts, for every recorded pipeline, for the compute pipelines on every core at normal priority, and, when a sample says the driver's own cache lacks the prepared stage libraries, for all of them on every core. The memory gate still holds for the builds, and the library builds write the preparation's journal while the start waits, so a variant the driver's compiler dies on is skipped from the next start on. boot-warm-owed.txt beside the caches names the GPU and driver: a start closed during the warm is followed by one that goes on with it, three at most, and "done" keeps later starts ordinary while the cache file still carries the earlier driver's header. When the boot stops waiting (prewarm_wait_ms, or a minute without progress) the builders step down to the background's thread counts and idle priority. prewarm_full = 0 turns the warm off. With nothing in the driver's cache the probe took 425 s on an RTX 5090 with 16 CPU threads: 87 s for 5,775 recorded pipelines, 19 s for 4,075 compute pipelines and 317 s for 42,231 prepared variants. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -2222,8 +2222,9 @@ extern "C" int menu_boot_frame(const MenuTarget *t) {
|
||||
int phase = g_boot_phase.load(std::memory_order_acquire);
|
||||
long long done = g_boot_done.load(std::memory_order_relaxed), total = g_boot_total.load(std::memory_order_relaxed);
|
||||
char step[160];
|
||||
if (phase == 1 || phase == 2)
|
||||
snprintf(step, sizeof step, ui_text(phase == 1 ? UI_BOOT_SHADERS : UI_BOOT_PIPELINES), done, total);
|
||||
static const UiTextId steps[] = {UI_BOOT_SHADERS, UI_BOOT_PIPELINES, UI_BOOT_COMPUTE, UI_BOOT_DRIVER_CACHE};
|
||||
if (phase >= 1 && phase <= 4)
|
||||
snprintf(step, sizeof step, ui_text(steps[phase - 1]), done, total);
|
||||
else
|
||||
snprintf(step, sizeof step, "%s", ui_text(UI_BOOT_STARTING));
|
||||
const char *title = ui_text(UI_BOOT_TITLE);
|
||||
@@ -2234,7 +2235,7 @@ extern "C" int menu_boot_frame(const MenuTarget *t) {
|
||||
ImFont *head = g_title_font ? g_title_font : body;
|
||||
float head_px = g_title_font ? g_title_font->FontSize * io.FontGlobalScale : body_px * 1.2f; // as GetFontSize scales
|
||||
float frac = -1;
|
||||
if ((phase == 1 || phase == 2) && total > 0) frac = done <= 0 ? 0 : done >= total ? 1 : (float)done / (float)total;
|
||||
if (phase >= 1 && phase <= 4 && total > 0) frac = done <= 0 ? 0 : done >= total ? 1 : (float)done / (float)total;
|
||||
float s = (float)fmod((now - g_boot_t0) / 1e9 * 0.8, 2.0);
|
||||
skin_boot_panel(ImGui::GetForegroundDrawList(), head, head_px, body, body_px, title, step, frac, s < 1 ? s : 2 - s,
|
||||
(float)t->width, (float)t->height, scale);
|
||||
|
||||
@@ -61,8 +61,9 @@ int menu_overlay_frame(uint64_t frame, const MenuTarget *t, const char **shot);
|
||||
// Records the frame menu_overlay_frame laid out into cb, which is inside dynamic rendering on the image.
|
||||
void menu_overlay_draw(VkCommandBuffer cb);
|
||||
// The boot screen while boot.c waits for the prewarm: phase as VkPrewarmProgress.phase (0 starting, 1 shaders,
|
||||
// 2 pipelines) with its count. menu_boot_frame lays out the screen for t like menu_overlay_frame (1: draw it with
|
||||
// menu_overlay_draw); only before the guest runs, from the thread that presents then.
|
||||
// 2 pipelines, 3 compute pipelines, 4 the driver's cache) with its count. menu_boot_frame lays out the screen for t
|
||||
// like menu_overlay_frame (1: draw it with menu_overlay_draw); only before the guest runs, from the thread that
|
||||
// presents then.
|
||||
void menu_boot_set(int phase, long long done, long long total);
|
||||
int menu_boot_frame(const MenuTarget *t);
|
||||
void menu_vk_release(void); // before the device goes away (gfx_window_release_vk)
|
||||
|
||||
Reference in New Issue
Block a user