Shaders: precompile FSPX-only compute shaders from folders #2822

Open
github-bot wants to merge 1 commit from github-bot/gh-2822 into main AGit
Owner

@⁠CryingLaughing on GitHub · 2026-11-26 14:35 UTC · original
CryingLaughing:fix/precompile-fspx-compute → main · +78 −6 · 3 files · 1 commits · open

Part 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

  • Use the existing FSPX parser when XDAT parsing finds no shader. Preserve the stage and interface of inputs with XDAT.
  • Add an end-to-end CLI test with one synthetic ACCC-only compute shader and isolated cache directories.

Tested

  • Head 74843bdc52bc8503cf5a0d1565a42a76cf8e0ec9 on b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7. 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.

  • With the same fixture on main, --precompile --only cs reported zero compiled and zero errors, failing the focused assertion (0/1/0). On the fixed tree the fixture passed 1/0/0 with no capability skips. --only cs compiled one shader, --only ps compiled zero, and --only cs --pipelines built one native PSO, refused zero, and saved one nonempty driver blob from a cold cache.

  • cargo build --workspace --locked -j 4 passed. cargo test --workspace --locked -j 4 -- --test-threads=4 --show-output reported 1,436 passed, 0 failed, 47 ignored across 37 harnesses. The pass count includes 29 capability skips.

  • Independent RTX 5070 Ti Laptop verification passed the exact CLI fixture. Additional checks filtered a nonmatching --used-only key and reused the driver blob in the second process with a matching key. Both direct-mode settings agreed, and the direct-enabled run reported the HLSL fallback for this input. Independent CLI check

Regression run

Independent retail smoke by Anon64 compared release builds of main and this exact head on an RTX 3060 12 GB (driver 581.80), Core i9-14900KF, and Windows 11 build 26200. The 60-second runs used the same title. The head retained 99.4% of the baseline frames and used 97.6% of its peak commit, with zero crashes or device removals. The run did not establish whether the title reached the changed code.

main:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1461 (PresentX 1461)
presents per 2 s (last 3): 10 6 5
device removals: 0
crashes: 0
peak commit: 24953 MB

PR:

xcl-smoke v1
commit: 74843bdc52bc8503cf5a0d1565a42a76cf8e0ec9
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1452 (PresentX 1453)
presents per 2 s (last 3): 13 4 1
device removals: 0
crashes: 0
peak commit: 24351 MB

Not tested

  • Retail-title use of FSPX and AMD or Intel adapters.
**@⁠CryingLaughing** on GitHub · 2026-11-26 14:35 UTC · [original](https://github.com/xcl-dev/xcl/pull/2822) `CryingLaughing:fix/precompile-fspx-compute` → `main` · +78 −6 · 3 files · 1 commits · open Part of #2453. This addresses [the separate FSPX input-admission gap](https://git.gtahub.st/github/xcl-dev--xcl/issues/2453). #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** - Use the existing FSPX parser when XDAT parsing finds no shader. Preserve the stage and interface of inputs with XDAT. - Add an end-to-end CLI test with one synthetic ACCC-only compute shader and isolated cache directories. **Tested** - Head `74843bdc52bc8503cf5a0d1565a42a76cf8e0ec9` on `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`. 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. - With the same fixture on `main`, `--precompile --only cs` reported zero compiled and zero errors, failing the focused assertion (0/1/0). On the fixed tree the fixture passed 1/0/0 with no capability skips. `--only cs` compiled one shader, `--only ps` compiled zero, and `--only cs --pipelines` built one native PSO, refused zero, and saved one nonempty driver blob from a cold cache. - `cargo build --workspace --locked -j 4` passed. `cargo test --workspace --locked -j 4 -- --test-threads=4 --show-output` reported **1,436 passed, 0 failed, 47 ignored** across 37 harnesses. The pass count includes 29 capability skips. - Independent RTX 5070 Ti Laptop verification passed the exact CLI fixture. Additional checks filtered a nonmatching `--used-only` key and reused the driver blob in the second process with a matching key. Both direct-mode settings agreed, and the direct-enabled run reported the HLSL fallback for this input. [Independent CLI check](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2822) **Regression run** [Independent retail smoke by Anon64](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2822) compared release builds of main and this exact head on an RTX 3060 12 GB (driver 581.80), Core i9-14900KF, and Windows 11 build 26200. The 60-second runs used the same title. The head retained 99.4% of the baseline frames and used 97.6% of its peak commit, with zero crashes or device removals. The run did not establish whether the title reached the changed code. main: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 3060 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1461 (PresentX 1461) presents per 2 s (last 3): 10 6 5 device removals: 0 crashes: 0 peak commit: 24953 MB ``` PR: ``` xcl-smoke v1 commit: 74843bdc52bc8503cf5a0d1565a42a76cf8e0ec9 gpu: NVIDIA GeForce RTX 3060 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1452 (PresentX 1453) presents per 2 s (last 3): 13 4 1 device removals: 0 crashes: 0 peak commit: 24351 MB ``` **Not tested** - Retail-title use of FSPX and AMD or Intel adapters.
Recognize ACCC/FSPX compute inputs when the metadata parser finds no XDAT. Keep the existing stage filter, runtime translation, and native pipeline cache path. Part of #2453.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 14:36:48 +00:00
Author
Owner

@⁠ettehn on GitHub · 2026-11-26 14:41 UTC · original

Independent Windows check on 74843bdc52bc8503cf5a0d1565a42a76cf8e0ec9 against b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7. 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 gave compiled 0, errors 0 on the base with --precompile --only cs --split 1.
  • Additional CLI checks on the head with --precompile --only cs --split 1 --used-only: a nonmatching used-pipelines.txt entry skipped the shader. With the matching key, --pipelines made 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 with XCL_DIRECT_DXIL=0 and =1. With =1 the 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.

**@⁠ettehn** on GitHub · 2026-11-26 14:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/2822#issuecomment-7195176433) Independent Windows check on `74843bdc52bc8503cf5a0d1565a42a76cf8e0ec9` against `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`. 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 gave `compiled 0, errors 0` on the base with `--precompile --only cs --split 1`. - Additional CLI checks on the head with `--precompile --only cs --split 1 --used-only`: a nonmatching `used-pipelines.txt` entry skipped the shader. With the matching key, `--pipelines` made 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 with `XCL_DIRECT_DXIL=0` and `=1`. With `=1` the 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.
Author
Owner

@⁠Anon64 on GitHub · 2026-11-26 14:55 UTC · original

Regression run of 74843bd on 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 with XCL_NETWORK=0 and 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:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1461 (PresentX 1461)
presents per 2 s (last 3): 10 6 5
device removals: 0
crashes: 0
peak commit: 24953 MB

this PR:

xcl-smoke v1
commit: 74843bdc52bc8503cf5a0d1565a42a76cf8e0ec9
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1452 (PresentX 1453)
presents per 2 s (last 3): 13 4 1
device removals: 0
crashes: 0
peak commit: 24351 MB

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.

**@⁠Anon64** on GitHub · 2026-11-26 14:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/2822#issuecomment-7195532497) **Regression run of `74843bd` on 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 with `XCL_NETWORK=0` and 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: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 3060 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1461 (PresentX 1461) presents per 2 s (last 3): 10 6 5 device removals: 0 crashes: 0 peak commit: 24953 MB ``` this PR: ``` xcl-smoke v1 commit: 74843bdc52bc8503cf5a0d1565a42a76cf8e0ec9 gpu: NVIDIA GeForce RTX 3060 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1452 (PresentX 1453) presents per 2 s (last 3): 13 4 1 device removals: 0 crashes: 0 peak commit: 24351 MB ``` 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.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2822/head:github-bot/gh-2822'
git switch 'github-bot/gh-2822'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2822'
git switch 'github-bot/gh-2822'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2822'
git switch 'github-bot/gh-2822'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2822'
git switch 'main'
git merge --squash 'github-bot/gh-2822'
git switch 'main'
git merge --ff-only 'github-bot/gh-2822'
git switch 'main'
git merge 'github-bot/gh-2822'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.