Shaders: honor --precompile for a single shader file #637
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/642"
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?
Imported from ivall/xcl. Originally posted by CallMeBrado on 2026-11-24T02:49:14Z.
What is in it
xcl shaders file.dxbc --precompileprinted shader stats and exited successfully, but the cache stayed empty. The single-file path returned before the CLI checked--precompile.--precompilestill prints stats.Tested
cargo test --workspace -- --test-threads=4reported 687 passed, 0 failed, 41 ignored. Two GPU tests skipped internally for lack of wave64:gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware.Regression run
Main
PR
Not tested
AI use
Imported from ivall/xcl. Originally posted by mdberkey on 2026-11-24T03:02:41Z.
Review: APPROVED
Verified
cargo build --locked --workspace --jobs 3: passed (only the pre-existingfetch_updatedeprecation warning).cargo test --locked --workspace --no-fail-fast --jobs 3 -- --test-threads=4 --show-output: 687 passed, 0 failed, 41 ignored. Skipped: 2 no wave64, 1 nod3d12SDKLayers.dll, 1 no D3D12 debug layer.f1e90c1and fails on3db536e(exit 101) with the old stats output, so it catches the regression.44871e939431b2e3_ps.bin), empty cache:f1e90c1→compiled 1, already cached 0, errors 0, one 2,860-byte DXIL cache entry;3db536e→ stats only, 0 cache files.Not verified
Review
LGTM. Non-blocking: the new test checks that a single file reaches the precompile path, but with a part-less DXBC it cannot assert that a cache entry is written. A minimal valid console shader fixture with a cache-count assertion would pin the whole fix in CI; the real-shader run above covers it meanwhile.
AI use: OpenCode (DeepSeek V4.1 Flash Free) ran the checks and drafted this; I checked it.
Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T03:24:55Z.
Test run of
f1e90c149b5ff9e8a260c424d6dd53c0fe816031on AMD RDNA4. I merged it onto currentmain91f9a5elocally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 693 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 652 passed, 0 failed, 21 ignoredSKIPPED;precompile_accepts_a_single_filepasses.Review: A single file now goes through the same precompiler as a directory or pack, reusing the bytes the CLI already read (
Cow::Borrowed), and without--precompileit still prints stats. I found nothing to change.Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Imported from ivall/xcl. Originally posted by Alpha325 on 2026-11-25T02:29:10Z.
I reused XCL’s synthetic compute shader builder to exercise single-file precompilation through DXC on Windows 11 with an RX 9060 XT and DXC 1.9.2602.17.
f1e90c1:shaders compute.dxbc --precompile --split 0 --only cswrote one 3,080-byte.dxilfile containing a DXIL part.18c105a: the same command printed shader statistics and wrote zero cache entries. The new test failed as expected.--only psleft a separate empty cache untouched.shaders_e2etests and bothgpu_compute_e2etests passed on the PR, with zero skips.The patch shares the existing synthetic shader builder between the test suites. No runtime code changed. AI use — OpenAI Codex (GPT-6) wrote and ran the fixture and drafted this report.
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T02:54:03Z.
Test of XCL PR #642 at clean detached head
f1e90c149b5ff9e8a260c424d6dd53c0fe816031. GitHub andrefs/pull/642/headstill matched the tested commit, and the PR was open at 2026-11-25T02:46:26.0766439Z. I found no Arc A770 report for this test and head in the PR discussion or issue #42.Tested
Windows 11 Enterprise Evaluation 26200.9974, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust and Cargo 1.100.0 x86_64-pc-windows-msvc, unoptimized test profile. The configured DXC directory contained
dxcompiler.dllanddxil.dllversion 1.9.2609.5.Process environment for the build and test used
CARGO_TARGET_DIR=L:/XclTooling/pr2014-1c971de6/target,CARGO_INCREMENTAL=0,CARGO_PROFILE_DEV_DEBUG=0,CARGO_PROFILE_TEST_DEBUG=0,XCL_ADAPTER=A770, andXCL_DXC_DIR=%LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64.TEMPandTMPwereL:/XclTooling/pr642/tempfor build andL:/XclTooling/pr642/temp/testfor execution. The test process usedXCL_DXIL_CACHE=L:/XclTooling/pr642/shader-cacheandXCL_DATA_ROOT=L:/XclTooling/pr642/xcl-data. The DXIL directory also contains any on-disk translated-shader entries made by this path.Prebuild command and exact prebuilt test invocation, expressed as PowerShell calls:
Build exit 0. Test exit 0. Libtest reported
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.73s. GPUSKIPPEDmarkers: 0.The test invoked
xcl shaders <fixture> --precompile --split 0withXCL_DXC_THREADS=1and asserted a successful child exit,precompiling 1, andcompiled 0, already cached 0, errors 0. The fixture is a 32-byte synthetic DXBC container with zero parts. A file watcher recorded creation, change, and deletion ofxcl-single-shader-1440.dxbcunder the private test temp directory. The watched temp, shader cache and data roots contained 0 entries before and 0 entries after, with 0 filesystem events in the cache and data roots during execution.The explicit split argument bypassed GPU probing, and the fixture runs without
--pipelines. This CLI check ran on the Arc host without acquiring the GPU lock.Not tested
GPU execution, DXC compilation, shader or PSO cache population with a compilable program, baseline comparison on main, full workspace suite, release profile, other adapters, and retail-title smoke runs.
AI use
T3 Code / Codex (gpt-6.2-sol) ran the checked-in test, inspected the local outputs, and drafted this report.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T12:31:42Z.
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:42:46Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:51:50Z.
Triage (#1607) – head
f1e90c1No open or merged PR makes
--precompileaccept a single shader file. Main still ends a single non-RPF file in the analysis branch unless--export-hlsl/--measure-pso/ the milestone option is given. #1816 does the same routing for--direct. It is a separate flag, but the two touch the same branch and will conflict.The branch is based on a much older shaders.rs. On current main the smallest fix may be to add
--precompileto the condition that already buildsInput::Files(vec![path])for a single file, rather than addingInput::Single.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.