Avoid one-off threads for singleton shader inputs #1874

Manually merged
github merged 1 commit from github-bot/gh-1874 into gh-pr/1874/base 2026-11-29 08:21:47 +00:00 AGit
Owner

@⁠NotADonky43 on GitHub · 2026-11-29 01:13 UTC · original
NotADonky43:perf/precompile-inline-singletons → main · +50 −23 · 1 files · 1 commits · merged 2026-11-29 08:16 UTC

Fixes #1861. Offline victory shaders / the shader stage of preload walk files one at a time. When a file contains one container, spawning a worker and immediately joining it cannot overlap anything. Run a single worker on the caller. Multi-container inputs still use the existing parallel loop; hash, translate, cache, and reporting code is shared. Separate compiler processes are still independent. No change to the game or GPU pipeline caching.

Matched released builds on f9dfb76f, Windows RTX 5070 Ti, same adapter/settings, six simultaneous compiler processes, six disjoint shards of 512 input files. Both cold runs produced the same 3,031 unique cache paths with byte-identical values and the same success/refusal counts. Four warm runs per side interleaved: median wall 2.110 -> 2.005 s (~5%); cold single observation 24.45 vs 24.20 s, no substantial cold gain established. This is shader precompile, not PSO warm-up, scene loading or gameplay FPS. precompile_visits_each_source_once_and_singletons_stay_on_the_caller passed on the f9 adaptation; checks empty, singleton, one-worker and multi-worker cases. No game data in code/test. Searched tracker/open PRs including #1313 (different preload changes).

**@⁠NotADonky43** on GitHub · 2026-11-29 01:13 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1874) `NotADonky43:perf/precompile-inline-singletons` → `main` · +50 −23 · 1 files · 1 commits · merged 2026-11-29 08:16 UTC Fixes #1861. Offline `victory shaders` / the shader stage of `preload` walk files one at a time. When a file contains one container, spawning a worker and immediately joining it cannot overlap anything. Run a single worker on the caller. Multi-container inputs still use the existing parallel loop; hash, translate, cache, and reporting code is shared. Separate compiler processes are still independent. No change to the game or GPU pipeline caching. Matched released builds on f9dfb76f, Windows RTX 5070 Ti, same adapter/settings, six simultaneous compiler processes, six disjoint shards of 512 input files. Both cold runs produced the same 3,031 unique cache paths with byte-identical values and the same success/refusal counts. Four warm runs per side interleaved: median wall 2.110 -> 2.005 s (~5%); cold single observation 24.45 vs 24.20 s, no substantial cold gain established. This is *shader precompile*, not PSO warm-up, scene loading or gameplay FPS. `precompile_visits_each_source_once_and_singletons_stay_on_the_caller` passed on the f9 adaptation; checks empty, singleton, one-worker and multi-worker cases. No game data in code/test. Searched tracker/open PRs including #1313 (different preload changes).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 01:18:37 +00:00
github-bot changed target branch from main to gh-pr/1874/base 2026-11-29 08:21:38 +00:00
github manually merged commit 2c73ed9e45 into gh-pr/1874/base 2026-11-29 08:21:40 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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/trustno1-coder--VIctory-NVIDIA!1874
No description provided.