Repository navigation
xcl run: XCL_PREPARE=0 starts the title without the shader preparation - #2976
Conversation
Since xcl-dev#2555 every start on main runs the shader preparation before the title's code, and it has no way out: on a retail title with a shader pack of 26,503 records and a cold cache that is hours on an RTX 3060 Ti, for a look at a change that needs a minute of play, and a regression run of main or of a PR's head sits through it first. nvidia-dev has the switch (present/preparation.rs, the same place): with XCL_PREPARE=0 the preparation is left out and the title builds the shaders it uses as it goes, standing still for those builds, as before xcl-dev#2555. Unset, or any other value, prepares as now. Test: only_xcl_prepare_0_leaves_the_preparation_out. README: the switch, next to the preparation's description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
luckyteagirl
left a comment
There was a problem hiding this comment.
Could the XCL_PREPARE=0 check run before probing shaders.rpf? The archive existence check uses try_exists()?, so a filesystem error aborts startup before the opt-out is read. The host exits on any error from before_guest, even though skipping shader preparation needs no access to the archive.
I reproduced this on Windows with a scratch directory where shaders.rpf is 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 for 0 and 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).
|
I checked the startup path with 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
I used XCL's bundled synthetic title and the same loose shader as 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 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. |
Requested 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