Repository navigation
GPU: opt-in VICTORY_SHADER_TURBO_PAUSE, more compile workers while little is drawn (off by default) - #3648
Open
TG0000 wants to merge 1 commit into
Open
GPU: opt-in VICTORY_SHADER_TURBO_PAUSE, more compile workers while little is drawn (off by default)#3648TG0000 wants to merge 1 commit into
TG0000 wants to merge 1 commit into
Conversation
…ttle is drawn Pipeline workers stay at half the logical processors, eight at most. With the switch on they get company while the title draws next to nothing: after eight presented frames in a row under 400 draws and dispatches with pipelines waiting, or a second without a frame with more than 32 waiting, all logical processors but two compile (at most 32, VICTORY_SHADER_TURBO_THREADS for another count). The first busier frame sends the extra workers back: each ends the pipeline it holds and parks. Off by default. Counts, decisions and the waiting are in pipeline/turbo.rs, which depends on the standard library only. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
VICTORY_SHADER_TURBO_PAUSE=1, off by default: more pipeline compile threads while the title draws next to nothing (pause menu, menus, loading), and only then.main)VICTORY_SHADER_TURBO_THREADS=<n>for another count, never below gameplay's)Counts, decisions and waiting are in
pipeline/turbo.rs(standard library only). With the switch off, the same number of workers take from the same two queues in the same order as before; the code that does so is rearranged.Limits
shader compile turbo on/offlog lines show it.Tested
cargo clippy --workspace --all-targets -- -D warnings, with and without--all-features, forx86_64-pc-windows-msvc(cross-built on macOS): clean.turbo.rstests, built alone withrustc --teston macOS: passed.cargo test -p victory-formats -p xtask(asset policy): passed. The existingmake.rstests are Windows-only and left to CI.Our target machine (not used to test this branch): AMD Radeon RX 6800 16 GB (ReBAR), Adrenalin 26.11.2, Ryzen 9 5900X, Windows 11.
Overlaps
All of these also change the workers in
make.rs, so whichever lands second needs a small rebase: #3527 (worker count and priority overrides), #1505 (normal priority; its measurement suggests below-normal threads get little time in the world, where this adds none anyway), #3025 (graphics before compute), #3378 (queue order).AI-assisted (Claude).
🤖 Generated with Claude Code