Shaders: precompile FSPX-only compute shaders from folders #2822
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!2822
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2822"
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?
@CryingLaughing on GitHub · 2026-11-26 14:35 UTC · original
CryingLaughing:fix/precompile-fspx-compute→main· +82 −10 · 3 files · 1 commits · closed without mergingPart of #2453. This addresses the separate FSPX input-admission gap. #2515 covers native descriptor and cache-key parity.
Folder precompile skipped valid ACCC/FSPX compute shaders when the Xbox parser found no XDAT. Admit them as compute shaders and pass them through the same stage filter, used-shader filter, translation, and optional native pipeline build.
What is in it
Tested
Rebased head
70ad0a5dc718af6e6b72e18155ee32f0e2b8d229on8b957bec6f82495aec940944c6bf47faa02db590. Windows 11 25H2 build 26200.9974, Core i5-13600K, RTX 4080 driver 621.01, Rust 1.100.0 x64 MSVC, DXC/DXIL 1.8.2502.11, debug.The current head passed the focused synthetic CLI check (1 passed, 0 failed, 0 ignored, no capability skips).
--only pscompiled zero shaders,--only cscompiled one, and--only cs --pipelinesbuilt one native PSO, refused zero, and saved one nonempty driver blob without loading a cached blob.cargo build --workspace --locked -j 4passed.cargo test --workspace --locked -j 4 -- --test-threads=4 --show-outputreported 1,447 passed, 0 failed, 47 ignored across 38 harnesses. The pass count includes 29 explicit capability skips and 10 messages for unset optional sample inputs.On the original clean parent
b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, the same synthetic fixture compiled zero compute shaders and failed its focused assertion. At prior head74843bdc52bc8503cf5a0d1565a42a76cf8e0ec9, an independent Windows RTX 5070 Ti Laptop run verified input filtering and warm driver-blob reuse. Earlier Windows runOn rebased head
70ad0a5and its actual parent8b957be, independent RX 9070 testing under Wine (Mesa 26.3.1-arch3.5) passed the focused synthetic fixture in all three head processes. The base failed all three at compute-shader admission. A 28-process CLI comparison covered filtering and native PSO cache reuse. A separate test-onlyprepare_for_launchfixture built one native PSO, and both fresh warm processes accepted the same 112-byte driver blob. The no-op shader used HLSL fallback when direct DXIL was enabled. Rebased Wine runIndependent native Windows release verification on an RTX 3080 Ti with driver 621.35 compared clean main and this exact head using XCL’s synthetic title. Main reported zero compiled shaders and one error, then exited 2 before guest entry. The head compiled one shader, made one native pipeline with zero refusals, and reached an exit-0 guest in both fresh runs. Independent launcher verification
Regression run
Matched retail smoke is pending for the rebased head. The prior-head pair retained 99.4% of baseline frames, used 97.6% of baseline peak commit, and reported zero crashes or device removals.
Not tested
@ettehn on GitHub · 2026-11-26 14:41 UTC · original
Independent Windows check on
74843bdc52bc8503cf5a0d1565a42a76cf8e0ec9againstb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7. RTX 5070 Ti Laptop (621.24), Windows 11 x64 build 26200, Rust 1.97.1 MSVC, DXC/DXIL 1.8.2502.11.cargo test --locked --offline -p xcl --test gpu_compute_e2e -j 2 folder_precompile_includes_fspx_only_compute -- --test-threads=1 --nocapture: 1 passed, 0 failed, 0 ignored, no capability skips. The same synthetic ACCC-only input gavecompiled 0, errors 0on the base with--precompile --only cs --split 1.--precompile --only cs --split 1 --used-only: a nonmatchingused-pipelines.txtentry skipped the shader. With the matching key,--pipelinesmade 1 PSO and refused 0. The driver-cache counter was 0 on the first run and 1 on the second, in separate processes. Results matched withXCL_DIRECT_DXIL=0and=1. With=1the cold log explicitly showed the HLSL fallback for this container.The checks used a synthetic shader. No retail smoke run. OpenAI Codex (6.2sol) assisted with verification.
@Anon64 on GitHub · 2026-11-26 14:55 UTC · original
Regression run of
74843bdon a newer retail title: no device removal, no crash, frames and commit within the limits.Setup: RTX 3060 12 GB (NVIDIA 581.80), i9-14900KF, Windows 11 26200, release builds of main
b49be18(this PR's base) and of this PR's exact head,scripts/smoke.ps1 -Game <title>for 60 s withXCL_NETWORK=0and A pressed every 4 s from 20 s. Main ran before and after this PR and peaked at 24,953 and 25,032 MB.main:
this PR:
99 % of main's frames, 97 % of its peak commit. One run each.
Not tested: the suite on this head; whether the title reaches the code this PR changes in its first 60 s; AMD.
AI use: Claude Code (Claude Opus 5.5) ran these runs on this machine and wrote this report.
@SzczepanGrela on GitHub · 2026-11-26 15:04 UTC · original · edited 2026-11-26 15:59 UTC
RX 9070 / Wine recheck after the rebase, including the current pre-entry shader-preparation path.
Tested
70ad0a5dc718af6e6b72e18155ee32f0e2b8d229against main8b957bec6f82495aec940944c6bf47faa02db590.8293130ebe370b1+(local asserts-disabled build), DXC/DXIL 1.9.2602.17, Rust 1.97.1, releasex86_64-pc-windows-gnu.XCL_NETWORK=0; private enabled XCL/vkd3d/Mesa caches and one DXC/pipeline worker in the persistent CLI and startup checks.cfg(test)startup fixture; removing it reconstructs the pinned production-source hashes. No original assertion was changed.This updates the existing report for
74843bdc52bc8503cf5a0d1565a42a76cf8e0ec9/b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, whose paired CLI results were the same. The additional startup check below targets the API now present in main.Original integration fixture
folder_precompile_includes_fspx_only_compute, three fresh processes per revision:--pipelinesmakes one native pipeline, refuses zero and saves a nonempty driver blob.compiled 0, already cached 0, errors 0). It does not reach that fixture's native-pipeline branch.Persistent CLI checks
The retained 160-byte synthetic ACCC/FSPX input contains only
S_ENDPGM, no XDAT. SHA-256:dde5396609bd1736b06900fa7d4ab84765b41da792274aa4616c23da4a351dc7.Seven fresh-process cases per revision with both
XCL_DIRECT_DXIL=0and1, 28 CLI processes total:--only ps--only cs, translation only--used-onlykey--used-only, cold/warmAll CLI processes exit 0 with zero errors/refusals. Each head native-cache family holds one 112-byte
.pso; warm processes report acceptance of the supplied blob and retain its filename and SHA-256. Main writes none. With direct flag 1, cold translation explicitly logsdirect DXIL fallback stage=CS,not a console shader container,HLSL path. These flag-1 checks do not establish direct-lowering coverage.Pre-entry preparation, no guest launch
The added test calls the existing
prepare_for_launchon a private directory containing only the same input asshaders/compute.dxbc. It uses four runtime memory windows, HLSL, an explicit RX 9070 adapter, and one cold process followed by two fresh warm processes sharing its private cache.total=1,done=1,Ok(()); compiled 1, errors 0, native pipelines 1, refused 0. Driver-cache acceptance is 0, 1, 1. The same 112-byte blob persists unchanged.total=1,done=1, thenShader preparation stopped: 1 record failures, 0 refused pipelines, 0 over the size cap. Compiled 0, native pipelines 0; no driver blob.All 12 libtest summaries, 28 CLI logs, input bytes, persistent cache files, cold/warm identities, source inventories and executable hashes were independently checked. No runtime capability skips or ignored tests. These are 40 top-level processes, with the main-control failures above intentional admission checks.
Build:
cargo test --offline --locked --release --target x86_64-pc-windows-gnu -p xcl --lib --test gpu_compute_e2e --no-run. Under GE-Proton Wine: integration executable withfolder_precompile_includes_fspx_only_compute --exact --nocapture --test-threads=1; local unit fixture withshaders::workflow_fspx_launch_preparation_synthetic --exact --nocapture --test-threads=1. CLI:xcl.exe shaders <owned-fixture-folder> --precompile --only cs --split 1 [--pipelines] [--used-only]; PS control uses--only ps. InheritedXCL_*flags are cleared before the explicit settings.Not tested
GPU dispatch/output from the no-op shader, a guest or preparation UI launch, retail inputs,
scripts/smoke.ps1, full suite, native Windows, other GPUs, cross-driver cache reuse, performance or FPS. Native PSO construction and cache acceptance are the hardware checks.AI use
OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the rebased diff, ran the original fixture and paired CLI matrix, added the local synthetic startup fixture, independently verified the evidence and updated this report. Publication authorized by the account owner.
74843bdc52to70ad0a5dc7@upipibi on GitHub · 2026-11-26 17:05 UTC · original
NVIDIA test report for
70ad0a5: RTX 3070 8 GB (Ampere, driver 616.56), Windows 11 26100, Rust 1.100.0, DXC 1.8.2502.11, debug.Head
70ad0a5on main8b957be(merge-base8b957be).cargo test -p xcl --test gpu_compute_e2e folder_precompile_includes_fspx_only_compute -- --test-threads=1: 3 of 3 runs passed, not skipped.cargo test -p xcl --lib -- --skip hle::xaudio2 --test-threads=4: 1309 passed, 0 failed, 27 ignored. SKIPPED: 21 no wave64, 3 per-lane forms the translator refuses, 1 needs Developer Mode.No driver resets. Lib tests only; no title run.
AI-assisted (Claude Code, Claude Sonnet 5.5).
@thehollowedone on GitHub · 2026-11-26 17:22 UTC · original
Independent normal-launch check on current head
70ad0a5against clean main8b957bec. I used a scratch copy of XCL's own console test title with the 160-byte synthetic ACCC/FSPX compute shader from this PR's fixture. No retail files were used.Windows 11 build 26300, RTX 3080 Ti 12 GB (621.35), Ryzen 7 9800X3D, rustc 1.99.1 MSVC, DXC 1.8.2502.11, release builds.
cargo build --offline --locked --release -p xcl --bin xclpassed on both revisions. Both launches usedXCL_ADAPTER=NVIDIA,XCL_NETWORK=0,XCL_PREPARE=0,XCL_PSO_PRELOAD=0,XCL_DXC_THREADS=2, and isolated data/DXIL cache folders.scripts/smoke.ps1 -Game <synthetic title> -Seconds 60 -StartupTimeoutSeconds 30reached pre-entry preparation, then reported compiled 0, errors 1 and exited 0x2 before the guest started. The smoke script could not print a block because XCL did not print a log path on this error path.xcl run <same synthetic title> -- --hellowith a fresh cache reported compiled 1, already cached 0, errors 0; pipelines made on the GPU 1, refused 0. The test title finished with failures 0, and XCL exited 0x0. A second run with another fresh cache/data root gave the same result.This exercises pre-entry shader admission in the normal launcher, beyond the
xcl shadersCLI test. It is not a pairedxcl-smokeregression run: the test title exits after its checks, before the timer can record numeric frames and peak commit. Retail-title use of this FSPX path and the resulting compute shader's GPU output were not tested.AI use: Codex (GPT-6.2 Sol) inspected the diff, prepared the synthetic fixture, ran and checked these builds and launches, and drafted this report. I checked every claim before posting.
@andrewDoing on GitHub · 2026-11-27 03:51 UTC · original
I checked the GPU dispatch left open in #2822 using a synthetic FSPX-only compute container on head
70ad0a5dc718af6e6b72e18155ee32f0e2b8d229. The test-only overlay wraps XCL’s existing mirror shader inACCC/FSPX. It writes both its own thread coordinates and a second thread’s coordinates read through group-shared memory. No game files were used.On a native Windows RTX 5070,
xcl shaders --precompile --only psadmitted zero shaders. The compute-stage run compiled one. With--pipelines, it built one native pipeline with zero refusals and left one driver blob. I used the HLSL translation path and split wave64.Two fresh runtime processes then created and dispatched the same FSPX shader through XCL’s
CreateComputePipelineStatehook. With an empty cache, the process observed zero driver-cache hits and zero stale retries. With the offline-prepared cache, it observed one hit and zero stale retries. Each dispatch ran six groups of 128 threads and returned all 1,536 expected output words. The focused integration test passed with no capability skip.This verifies that a fresh runtime can use the offline-prepared pipeline and produce the expected GPU data for one synthetic FSPX compute shader. It does not measure retail world-load performance.
AI use: OpenAI Codex with GPT-6.2 Astra adapted the synthetic fixture and ran the checks; Codex coordinated and prepared this report.
Pull request closed