Bound preload library workers by the number of eligible pipelines #1084
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1084
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1084"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ghptc on GitHub · 2026-11-28 13:00 UTC · original
ghptc:fix/preload-library-worker-count→main· +19 −1 · 1 files · 1 commits · merged 2026-11-29 08:16 UTCThe final stage of
victory preloadspawns a worker for every requested job. When empty partitions enterknown::make, each worker first indexes the recorded shaders. An empty early/slow list therefore creates workers with no work. A three-pipeline list with 64 requested jobs assigns an empty partition to 61 workers.Cap the worker count at the eligible pipeline count after applying the existing default and minimum. This preserves the current partition order and job selection. An empty list runs the loop zero times. The regression exercises 64 jobs with zero or three eligible pipelines, two jobs with nine, and a zero request with work available.
Reproduction and results
Use a new empty scratch directory outside the repo, with an empty input directory and fresh cache and data directories. Set VICTORY_GAME_DIR to the empty directory, and set VICTORY_CACHE_DIR and VICTORY_DATA_DIR to separate scratch directories. With Windows builds from before and after this change, run:
The pre-change executable reported 0 shaders, 0 eligible pipelines, 8 library threads and successful completion. The patched executable reported 0 shaders, 0 eligible pipelines, 0 library threads and successful completion. The isolated branch's Windows-target unit test passed under Proton.
The measured result is the number of workers for the empty list. RSS savings for populated preload caches and gameplay performance were not measured. The existing preload job-selection work in #382 changes the CLI setting. This patch is confined to the final library worker count.
@ghptc on GitHub · 2026-11-28 13:22 UTC · original
Windows Clippy reported the same two diagnostics on this PR and its exact upstream base,
63b902f:let_and_returnin shader emission andmanual_is_multiple_ofin the shadow worker. With #957 applied locally to59bded6, both locked workspace Clippy checks passed for Windows MSVC on Rust 1.98.1, including--all-features, with-D warnings. Upstream CI log@Exopus-0x65f7ad0 on GitHub · 2026-11-28 15:13 UTC · original
Native Windows run of the regression (the PR ran it under Proton): native Windows 11 26300 (MSVC toolchain, Rust 1.98.1), RTX 5060 Ti;
63b902f+ this PR.cargo test --release --locked -p victory --bin victory warm::tests::library_workers_each_have_a_pipeline -- --exact→ passed.