xcl run: XCL_PREPARE=0 starts the title without the shader preparation #2976
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2976
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2976"
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?
@Prime1997 on GitHub · 2026-11-27 06:14 UTC · original
Prime1997:contrib/prepare-off-switch→main· +19 −0 · 2 files · 1 commits · merged 2026-11-27 06:41 UTCRequested by Prime · project thread
Since #2555 every start on
mainruns the shader preparation before the title's code, and nothing turns it off. With a cold cache on a retail title's pack (26,503 records) that is hours on an RTX 3060 Ti, before a minute of play that a change needs, and a regression run ofmainor of a PR's head sits through it first.nvidia-devhas the switch in the same place: withXCL_PREPARE=0the preparation is left out and the title builds the shaders it uses as it goes, standing still for those builds, as before #2555. Unset, or any other value, prepares as now.What is in it
crates/xcl/src/hle/d3d12x/present/preparation.rs:before_guestreturns before the preparation whenleft_out(XCL_PREPARE); testonly_xcl_prepare_0_leaves_the_preparation_out.README.md: the switch, next to the preparation's description.Tested
cargo test --locked --workspace --no-fail-fast -- --test-threads=4withXCL_DXC_DIRset to DXC 1.9.2609.5: 1454 passed, 3 failed, 47 ignored. The 3 failures are tests that fail onmainc2ee10e4itself (1453passed,3failed,47ignored there, same command):test_title_draws_with_a_root_signature_under_the_debug_layer,test_title_runs_and_game_folder_is_untouched,test_title_runs_under_the_debug_layer_with_dred.Regression run
A commit of
main(b49be183, the last one before the shader preparation of #2555, which prepares every record before the title and does not fit a 60 s run):This PR's head (with
XCL_PREPARE=0, the switch of this PR):Not tested
AI use
Claude Code (Claude Opus 5.5) wrote the code, ran the suite and the regression runs on the hardware above, and wrote this description; Prime asked for it and owns the account. We coordinate the 8 GB work on the XCL Discord too: https://discord.gg/gK3y7WRRY
🤖 Generated with Claude Code
@luckyteagirl on GitHub · 2026-11-27 06:21 UTC · original · reviewed
Could the
XCL_PREPARE=0check run before probingshaders.rpf? The archive existence check usestry_exists()?, so a filesystem error aborts startup before the opt-out is read. The host exits on any error frombefore_guest, even though skipping shader preparation needs no access to the archive.I reproduced this on Windows with a scratch directory where
shaders.rpfis a junction in a loop. A CPU-only harness using the PR's branch order returned Windows error 1921 with the opt-out set. Checking the opt-out first returned success for0and still returned error 1921 when the variable was unset. This exercises the filesystem probe and branch order. It does not launch a title.Preparation branch · Host error handling
AI-assisted review (GPT-6.2 Sol).
@A1wace-dev on GitHub · 2026-11-27 06:32 UTC · original
I checked the startup path with
XCL_PREPAREunset, set to0, and set to1on both the PR and its exact parent. On the PR, only0bypassed shader preparation. The default and1still discovered the bundled shader and entered preparation.Tested
Windows 11 build 26300.9711, Core Ultra 7 265KF, RTX 5080 (driver 617.42), Rust 1.100.0 MSVC, debug. Both clean checkouts built with
cargo build --workspace --locked --offline.XCL_PREPAREc2ee10e4e905eb736e56953c52b749e18bcc7ede8617577b67c3b2c67542ff3d47d6e631967c16c601I used XCL's bundled synthetic title and the same loose shader as
test_title_runs_and_game_folder_is_untouched. Each invocation ofxcl run <fixture> -- --hellostarted with its own data and DXIL cache directories. In the preparation runs, stdout listed one shader to precompile and the preparation window handle matched the swap-chain window. For the PR with0, the log recorded the opt-out, there was no precompile line or preparation window, and the title still created a swap chain.I ran each combination three times. All 18 runs exited 0, the test title reported zero failures, and a before/after SHA-256 snapshot showed the game directory was unchanged.
The PR's
only_xcl_prepare_0_leaves_the_preparation_outunit test also passed (1 passed, 0 failed, 0 ignored).Not tested
Retail titles, startup performance with a large shader pack, and the full workspace test suite.
AI use
OpenAI Codex (GPT-6 family, exact serving variant unavailable) built both revisions, scripted and ran the comparison, and drafted this report.