Shaders: honour --direct for a single console shader file #1816

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

@⁠Daydream3r on GitHub · 2026-11-24 21:06 UTC · original
Daydream3r:fix-direct-single-shader-input → main · +29 −3 · 3 files · 1 commits · open

xcl shaders shader.bin --direct returned ordinary statistics before reaching the direct-DXIL dispatcher; the same shader in a folder ran the direct sweep. Route single files through the existing direct dispatcher so validation and size-limit options apply consistently. Independent of #1799's JSON metadata change.

Rebased onto main 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6. The conflict was two independently added test blocks in shaders_e2e.rs; both main's argument-validation tests and this regression are retained.

What is in it

  • crates/xcl/src/shaders.rs: parse the direct flag once and include direct mode in single-file routing.
  • crates/xcl/tests/shaders_e2e.rs: synthetic folder/single-file JSON comparison and direct text-output regression, requiring no GPU/DXC/game data. README example included.

Tested

  • RTX 5070 Ti 16 GB, NVIDIA 621.01; Ryzen 7 9800X3D, 64 GB RAM; Windows 11 Pro 25H2 26200.6584; Rust 1.100.0 MSVC, DXC/DXIL 1.9.2609.5. Release build/smoke, debug tests.
  • cargo build --release --workspace --locked: passed on clean main and clean head 2ebdf2f8beb86058a34dc229d78b0e87fff29c7e.
  • cargo test --workspace --locked --no-fail-fast -- --test-threads=4: head 1247 passed, 4 failed, 46 ignored; clean main 1246 passed, same 4 failed, 46 ignored; both exit 101. The new regression executed and passed. Optional XCL_SAMPLE_* inputs unset.
  • Four failures on both are gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_{0,1,2,3}, CreateComputePipelineState 0x8007000E. This update does not make the adapter's full suite green.
  • Identical 26 explicit SKIPPED lines: 20 no native wave64, 3 refused per-lane forms (V_MUL_F16, V_PK_MUL_F16, V_CVT_F16_F32), 2 missing D3D12 debug-layer checks, 1 no heap windows. Passing-return skips are not coverage.
  • git diff --check: passed.

Regression run
Official scripts/smoke.ps1, same retail package 1.0.2.1, 60 s, no input, isolated copies of the same saved data/cache seed, networking off. Head run performed after the rebased commit was pushed. Startup/menu coverage only; no claim these runs exercise the CLI fix or rendered gameplay.

main:

xcl-smoke v1
commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6
gpu: NVIDIA GeForce RTX 5070 Ti
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1590 (PresentX 1590)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15927 MB

head:

xcl-smoke v1
commit: 2ebdf2f8beb86058a34dc229d78b0e87fff29c7e
gpu: NVIDIA GeForce RTX 5070 Ti
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1625 (PresentX 1625)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16420 MB

Not tested
AMD/Intel/native wave64, Linux/Wine, game-data sample coverage, or world rendering. The remaining four baseline GPU-fuzz failures are unresolved; no translator-coverage or world-loading fix claimed.

AI use
Codex desktop, GPT-6 (exact variant not exposed): original implementation/regression/docs, conflict resolution retaining both test blocks, actual local builds/tests/smoke runs and this description. No game data or derived shader binaries in the diff.

**@⁠Daydream3r** on GitHub · 2026-11-24 21:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/1816) `Daydream3r:fix-direct-single-shader-input` → `main` · +29 −3 · 3 files · 1 commits · open `xcl shaders shader.bin --direct` returned ordinary statistics before reaching the direct-DXIL dispatcher; the same shader in a folder ran the direct sweep. Route single files through the existing direct dispatcher so validation and size-limit options apply consistently. Independent of #1799's JSON metadata change. Rebased onto `main 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6`. The conflict was two independently added test blocks in `shaders_e2e.rs`; both main's argument-validation tests and this regression are retained. **What is in it** - `crates/xcl/src/shaders.rs`: parse the direct flag once and include direct mode in single-file routing. - `crates/xcl/tests/shaders_e2e.rs`: synthetic folder/single-file JSON comparison and direct text-output regression, requiring no GPU/DXC/game data. README example included. **Tested** - RTX 5070 Ti 16 GB, NVIDIA 621.01; Ryzen 7 9800X3D, 64 GB RAM; Windows 11 Pro 25H2 26200.6584; Rust 1.100.0 MSVC, DXC/DXIL 1.9.2609.5. Release build/smoke, debug tests. - `cargo build --release --workspace --locked`: passed on clean main and clean head `2ebdf2f8beb86058a34dc229d78b0e87fff29c7e`. - `cargo test --workspace --locked --no-fail-fast -- --test-threads=4`: head **1247 passed, 4 failed, 46 ignored**; clean main **1246 passed, same 4 failed, 46 ignored**; both exit 101. The new regression executed and passed. Optional `XCL_SAMPLE_*` inputs unset. - Four failures on both are `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_{0,1,2,3}`, `CreateComputePipelineState 0x8007000E`. This update does not make the adapter's full suite green. - Identical 26 explicit SKIPPED lines: 20 no native wave64, 3 refused per-lane forms (V_MUL_F16, V_PK_MUL_F16, V_CVT_F16_F32), 2 missing D3D12 debug-layer checks, 1 no heap windows. Passing-return skips are not coverage. - `git diff --check`: passed. **Regression run** Official `scripts/smoke.ps1`, same retail package 1.0.2.1, 60 s, no input, isolated copies of the same saved data/cache seed, networking off. Head run performed after the rebased commit was pushed. Startup/menu coverage only; no claim these runs exercise the CLI fix or rendered gameplay. main: ``` xcl-smoke v1 commit: 1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6 gpu: NVIDIA GeForce RTX 5070 Ti title: retail-title seconds: 60 exit: 0x0 frames shown: 1590 (PresentX 1590) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15927 MB ``` head: ``` xcl-smoke v1 commit: 2ebdf2f8beb86058a34dc229d78b0e87fff29c7e gpu: NVIDIA GeForce RTX 5070 Ti title: retail-title seconds: 60 exit: 0x0 frames shown: 1625 (PresentX 1625) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16420 MB ``` **Not tested** AMD/Intel/native wave64, Linux/Wine, game-data sample coverage, or world rendering. The remaining four baseline GPU-fuzz failures are unresolved; no translator-coverage or world-loading fix claimed. **AI use** Codex desktop, GPT-6 (exact variant not exposed): original implementation/regression/docs, conflict resolution retaining both test blocks, actual local builds/tests/smoke runs and this description. No game data or derived shader binaries in the diff.
Route a single shader through the direct sweep instead of returning ordinary statistics before the mode is dispatched. Cover both JSON and text output with a synthetic CLI regression.

Assisted-by: Codex desktop (GPT-6)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:06:08 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 00:28 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 00:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/1816#issuecomment-7148542644) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 06:19 UTC · original

Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current main on the new head — needs another rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-26 06:19 UTC · [original](https://github.com/xcl-dev/xcl/pull/1816#issuecomment-7184325921) Re-verification on RTX 3060 Ti (Windows 11): still a **merge conflict with current `main`** on the new head — needs another rebase before it can be tested.
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/shaders.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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