Option to skip waiting for all cached pipelines at startup #459

Open
opened 2026-12-06 01:11:23 +00:00 by github-bot · 2 comments
Owner

@⁠pirncedark on GitHub · 2026-12-06 01:10 UTC · original

Every launch shows "Compiling pipelines" from 0 to ~102k and the title waits until all are made, even though they come from the cache:

pipelines: every queued one is made ... made=88938 loaded_with_blob=2685 skipped_with_blob=86253
pipelines: the title's render phases are built, it was held until every queued pipeline was made

This adds 15-30 s to every start. Could there be an option (e.g. an env var or an F10 setting) to let the title start right away and build cached pipelines in the background or on demand?

Setup: larp v1.1.5 (main bc11a62), Windows 11, RTX 3080 Ti (driver 621.01), Ryzen 5 5600X, Series X mode, NVIDIA shader cache set to unlimited.

**@⁠pirncedark** on GitHub · 2026-12-06 01:10 UTC · [original](https://github.com/gamingwithhomie/larp/issues/459) Every launch shows "Compiling pipelines" from 0 to ~102k and the title waits until all are made, even though they come from the cache: ``` pipelines: every queued one is made ... made=88938 loaded_with_blob=2685 skipped_with_blob=86253 pipelines: the title's render phases are built, it was held until every queued pipeline was made ``` This adds 15-30 s to every start. Could there be an option (e.g. an env var or an F10 setting) to let the title start right away and build cached pipelines in the background or on demand? Setup: larp v1.1.5 (main bc11a62), Windows 11, RTX 3080 Ti (driver 621.01), Ryzen 5 5600X, Series X mode, NVIDIA shader cache set to unlimited.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-06 01:11:23 +00:00
Author
Owner

@⁠vanya890 on GitHub · 2026-12-06 01:13 UTC · original

I checked the current main implementation and the two related open PRs.

The important distinction is that a cached shader/PSO blob is not the same thing as an already-created host ID3D12PipelineState. The blob can be supplied to the driver, but LARP still has to create the host PSO. The startup queue deliberately holds the title at the menu until its queued pipelines are made (see crates/larp-gpu/src/pipeline/make.rs).

Related work, but neither fully addresses this request:

  • #435 (LARP_KEEP_USED) remembers graphics PSOs used in earlier runs and prewarms those at the menu. It reduces later first-use stalls, but it does not remove the startup wait; it can actually increase the number prewarmed.
  • #424 (LARP_OPT_ASYNC_WORLD_PSOS) makes newly encountered non-lasting graphics PSOs asynchronous after steady-world rendering is established. It is not a startup fast-start path, and its asynchronous path can omit draws while a PSO is still compiling.

So I think this is a distinct feature request: an opt-in startup policy that releases the title once a minimal set of title/menu-critical pipelines is ready, while continuing the rest in the background. Simply skipping the wait for every pipeline would risk missing title/world draws or blocking again on first use, so the critical set and first-use behavior need to be designed explicitly.

**@⁠vanya890** on GitHub · 2026-12-06 01:13 UTC · [original](https://github.com/gamingwithhomie/larp/issues/459#issuecomment-7448995884) I checked the current `main` implementation and the two related open PRs. The important distinction is that a cached shader/PSO blob is not the same thing as an already-created host `ID3D12PipelineState`. The blob can be supplied to the driver, but LARP still has to create the host PSO. The startup queue deliberately holds the title at the menu until its queued pipelines are made (see `crates/larp-gpu/src/pipeline/make.rs`). Related work, but neither fully addresses this request: - #435 (`LARP_KEEP_USED`) remembers graphics PSOs used in earlier runs and prewarms those at the menu. It reduces later first-use stalls, but it does not remove the startup wait; it can actually increase the number prewarmed. - #424 (`LARP_OPT_ASYNC_WORLD_PSOS`) makes newly encountered non-lasting graphics PSOs asynchronous after steady-world rendering is established. It is not a startup fast-start path, and its asynchronous path can omit draws while a PSO is still compiling. So I think this is a distinct feature request: an opt-in startup policy that releases the title once a minimal set of title/menu-critical pipelines is ready, while continuing the rest in the background. Simply skipping the wait for every pipeline would risk missing title/world draws or blocking again on first use, so the critical set and first-use behavior need to be designed explicitly.
Author
Owner

@⁠vanya890 on GitHub · 2026-12-06 01:22 UTC · original

I opened PR #475 with an opt-in fast-start path: set LARP_PIPELINE_STARTUP_WAIT=0 to release the menu and skip the cached-queue render-phase barrier once a previous-run pipeline list has actually been queued. The default and cold-first-run behavior stay unchanged.

This removes only the global startup barrier. ready() still queues and waits for a pipeline on first use, so a first-use hitch is still possible while the remaining PSOs warm in the background. LARP_PIPELINE_WAIT_MS=8 can cap non-lasting graphics waits, with the existing one-time-drop trade-off. The PR documents this explicitly. If you'd rather require a stricter menu/world-critical subset before release, that would be a different policy and I'd prefer to settle that before making it the default.

**@⁠vanya890** on GitHub · 2026-12-06 01:22 UTC · [original](https://github.com/gamingwithhomie/larp/issues/459#issuecomment-7449125687) I opened [PR #475](https://git.gtahub.st/github/gamingwithhomie--larp/pulls/475) with an opt-in fast-start path: set `LARP_PIPELINE_STARTUP_WAIT=0` to release the menu and skip the cached-queue render-phase barrier once a previous-run pipeline list has actually been queued. The default and cold-first-run behavior stay unchanged. This removes only the global startup barrier. `ready()` still queues and waits for a pipeline on first use, so a first-use hitch is still possible while the remaining PSOs warm in the background. `LARP_PIPELINE_WAIT_MS=8` can cap non-lasting graphics waits, with the existing one-time-drop trade-off. The PR documents this explicitly. If you'd rather require a stricter menu/world-critical subset before release, that would be a different policy and I'd prefer to settle that before making it the default.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/gamingwithhomie--larp#459
No description provided.