Repository navigation
Shaders: --precompile --used-only builds only the pipelines a title used - #1982
Merged
Merged
Conversation
A retail pack's ~2 700 compute programs take a 32-lane NVIDIA card's driver hours to build, most of them programs the title never binds in the part it reached. The runtime already notes every pipeline a title uses by a hash of its shaders (`used-pipelines.txt` beside the DXIL cache, read by `pso_async` to build them ahead next run). `--used-only` reads that file and passes over every compute program whose pipeline key (`real::shaders_key` of the one shader, as the runtime makes it) is not in it. Measured on a retail pack with the list of a few runs (1 221 keys): 824 compute programs built, 1 865 passed over. Test: used_only_keeps_the_compute_programs_an_earlier_run_used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Eterst
marked this pull request as ready for review
November 25, 2026 00:26
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
Member
|
Code review on
Remaining before merge: |
PR #1982 test report
Tested
Failures
SKIPPED notices
Not tested
AI use T3 Code / Codex (gpt-6.2-sol) ran the build and tests and drafted this report. Coordinator #2 (T3 Code / Antigravity, |
Contributor
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
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.
xcl shaders <pack> --precompile --pipelines --used-onlybuilds only the compute programs whose pipeline an earlier run of the title used. A retail pack's ~2 700 compute programs take a 32-lane NVIDIA card's driver hours, most of them programs the title never binds in the part it reached. The runtime already notes every pipeline a title uses by a hash of its shaders (used-pipelines.txtbeside the DXIL cache, read bypso_asyncto build them ahead in the next run); this reads the same file and computes the same key. Part of #1269.What is in it
crates/xcl/src/shaders.rs:--used-only,used_compute(the pipeline key of a compute program as the runtime makes it,real::shaders_keyof the one shader), the count of programs passed over in the summary; testused_only_keeps_the_compute_programs_an_earlier_run_used.crates/xcl/src/hle/d3d12x/pso_async.rs:earlier_used_keys()readsused-pipelines.txtwith the existing parser.crates/xcl/src/hle/d3d12x/real.rs:shaders_keyispub(crate).README.md: the option, next to--pipelines.Tested
cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4on354ce0c: 975 passed, 1 failed, 45 ignored; the failure ishle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memory, which fails now and then onmaintoo on this machine (3 of 8 parallelmainruns);cargo test -p xcl --lib -- --test-threads=4again: 927 passed, 0 failed, 25 ignored. SKIPPED on this adapter: the same no-wave64 GPU tests as onmain.used-pipelines.txtof a few title runs (1 221 keys),XCL_DIRECT_DXIL=1: 824 compute programs built, 1 865 passed over, 0 errors in 43 min. The title then made its compute pipelines from those driver blobs.Regression run
main:
this PR:
Not tested
shaders_keybecomingpub(crate); the smoke runs do not use the new option.used-pipelines.txtuntil a run reaches them; a full--precompilestill builds everything.AI use
🤖 Generated with Claude Code