CLI: xcl preflight — the environment checks without starting a game #1064
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!1064
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1064"
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?
@homerrek on GitHub · 2026-11-24 11:09 UTC · original
homerrek:preflight-subcommand→main· +15 −0 · 1 files · 1 commits · openPart of #505 (the diagnostics side). No issue opened for this alone — say if you want one.
What is in it
crates/xcl/src/main.rs— apreflightarm in the command match and its help text. Calls theexisting
preflight::run(setting)+preflight::print(&checks); no new logic, no new checks.Exit code 1 when any
CheckisLevel::Error, else 0.crates/xcl/src/main.rs—HELPgains the subcommand. The optional argument is ad3d12_adaptervalue, defaultauto, matchingConfig::d3d12_adapter.Why
preflightalready answers "will this PC draw anything" and already lands inreport.json, butonly as a side effect of
xcl run. A user with a missingD3D12Core.dllor DXC 1.7 finds outafter the title boots, loads for 50 s, and presents nothing. The checks are cheap and need no game,
so there is no reason to require one.
Tested
cargo build -p xcl— not run. No Windows toolchain or GPU on this machine (see Not tested).The diff is a match arm calling two already-
pubfunctions; the only compile risk is theLevel::Errorpath, which uses the enum aspreflight.rsdefines it.Regression run
scripts/smoke.ps1needs a Windows box with a GPU and a title.Not tested
cargo test --workspace, no GPU run, noxcl-smokeblock. All four arerequired before this can be merged; they need a machine I do not have.
preflightarm is unreachable fromxcl run, so a smoke run of any title exercises thesame code path as
main— it still needs to be pasted to satisfy the regression rule.AI use
No part of it was executed.
Note for the reviewer: prefix
CLIis not in the list in CONTRIBUTING. Nothing in the list fits a new subcommand —xcl runis the nearest but names the wrong command. Say which you want and I will amend the subject.
Alternative, if you prefer no new subcommand
xcl preflightcould instead bexcl inspect --preflight, reusing the existinginspectentry.That keeps the surface smaller at the cost of a confusing flag on a file-analysis command. Happy
to redo it that way.
xcl preflight— the environment checks without starting a game c8f75a542a@mikebuckets171 on GitHub · 2026-11-24 11:29 UTC · original
Ran it on a macOS host: the subcommand works under Wine, and the checks print a useful picture of a D3DMetal box.
Host: MacBook Pro M5 Pro (48 GB), macOS 27.2.1, CrossOver 26 with D3DMetal, Rosetta 2, Rust 1.100.0, cross-built
x86_64-pc-windows-gnullvm(LLVM-MinGW, clang 23.1.6),--release --locked,xcl.exerun under Wine with no game in sight (a freshXCL_DATA_ROOT,XCL_NETWORK=0). Headc8f75a5, which contains main47efa2e.xcl preflight(andxcl preflight auto, same output):Both runs exit 0 (no
Level::Erroron this host), and the arm is genuinely new: the same argument against a build of main without this PR prints the usage text and exits0x2, so before this changepreflightis not a command at all.xcl --helpat this head lists it with its description, andxcl --versionprintsxcl 0.1.0.Two things the Mac run suggests, both small:
xgameruntime.dllsends a Wine user somewhere they cannot go. On CrossOver there is no Microsoft Store and no Gaming Services to install; the honest advice there is "expected on Wine - XCL's own replacements are used". A second line for a Wine host, or wording like "install Gaming Services (Windows) / not available under Wine", would keep the warning from reading like a fix that cannot be applied. Worth noting the warning itself is correct: the DLL really is absent here.One harness note, for anyone else trying this under CrossOver:
wine --cx-app xcl.exe --helpnever reaches xcl - CrossOver's own option parser consumes--helpand prints Wine's help. With a--before the application's arguments (--cx-app xcl.exe -- --help) the argument arrives and the real usage text appears. That is a CrossOver wrapper quirk, not anything about this change.Not tested here: a host where a check is
Level::Error(so the exit-code-1 path is unverified), thereport.jsonside of the checks, Windows, and a machine missing DXC.Host: macOS 27.2.1 (Apple silicon, M5 Pro), CrossOver 26, D3DMetal; local inference unloaded and the bottle's wineserver stopped for each run; the run had no game folder and its data root was empty before it. AI use: GPT-6 Luna cross-built the tree, ran the four commands and drafted this comment; the printed lines and exit codes are from those runs.
@fromthemoonx on GitHub · 2026-11-24 11:33 UTC · original
Native Windows / NVIDIA run, since Not tested lists NVIDIA. It complements the macOS run above.
Tested
stable-x86_64-pc-windows-msvc; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0); debugc8f75a542aaaec505e733164871b4eae199d0c21, which is on currentmain47efa2e:cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4: 741 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.xcl preflight(exit 0): No line for the system XGameRuntime, SM 6.6 or mesh shaders, which I read as "all present" here (it's installed, and the card has both).XCL_D3D12_DEBUG=1, withpreflight nvidia, and withXCL_DXC_DIRset to an empty folder: identical output, exit 0. With an emptyXCL_DXC_DIR, DXC is still found in the SDK folder.xcl preflight 7(no adapter 7 on this machine) andxcl preflight extraboth check the RTX 3060 and exit 0, with no line saying the requested adapter wasn't found or the value wasn't understood.xcl --helplistsxcl preflight [gpu].Not tested
preflight <name>picks the named one.AI use
@teidenzero on GitHub · 2026-11-24 14:51 UTC · original
Windows 10 run at
c8f75a5, where the SM 6.6 check depends on the Agility SDKMachine: NVIDIA GeForce RTX 4090 24 GB, driver 621.24 (32.0.16.2124); AMD Ryzen 7 3700X; Windows 10 Pro 22H2 build 19045.6466 (the inbox D3D12 stops at SM 6.5); Rust 1.100.0
stable-x86_64-pc-windows-msvc, debug build ofxclat this commit; DXC 1.8.2502.11 from the Windows SDK. A valid Agility SDK 1.620.2 was in%LOCALAPPDATA%\XCL\D3D12\for every run.xcl preflight, one run per case:XCL_D3D12_DIRnot setXCL_D3D12_DIR= the NuGet package root (wrong)ERROR: … no SM 6.6 (Agility SDK unavailable: XCL_D3D12_DIR=<root> has no D3D12Core.dll) (has 6.5): shaders cannot runD3D12Core.dllinD3D12\next toxcl.exeD3D12\next toxcl.exeXCL_D3D12_DIR=<root>\build\native\bin\x64The subcommand and its exit codes work as described, and the error names the variable and the folder it checked.
Two things about the checks themselves (
preflight.rs, already onmain, not in this diff):XCL_D3D12_DIRis the only folder searched. When the SDK is unavailable through the variable, the hint could say to fix or unsetXCL_D3D12_DIR(the driver here is current).Not tested
gpuargument other than the default, a release build.xcl runand a smoke run: no title here.AI use
@Kalmarv on GitHub · 2026-11-24 17:03 UTC · original
Regression pair for
c8f75a5againstmain47efa2e(this PR's base), for the Regression run section. Both runs pass: no device removal, no crash, 102 % ofmain's frames, 98 % of its peak commit.Tested
scripts/smoke.ps1, the same retail title for 60 s each:mainat47efa2e(this PR's base) first, then this PR's head, one after the other on the same machine.main47efa2e:this PR,
c8f75a5:Not tested
xcl preflightitself: the smoke run starts the title withxcl runand doesn't call it, so this shows only thatxcl runis unchanged.cargo test --workspace, AMD, Linux.AI use: Claude Code (Claude Opus 5.5)
@DavidM1911 on GitHub · 2026-11-25 09:04 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.