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

Open
Daydream3r wants to merge 1 commit from upstream-pr/1816 into main
Daydream3r commented 2026-11-24 21:06:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Daydream3r on 2026-11-24T21:06:03Z.


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.

<!-- greyfinch-sync:ivall/xcl:issue:5480332069 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1816). Originally posted by [Daydream3r](https://github.com/Daydream3r) on 2026-11-24T21:06:03Z. --- `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.
DavidM1911 commented 2026-11-25 01:10:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T00:28:14Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7148542644 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1816#issuecomment-7148542644). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T00:28:14Z. --- 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 commented 2026-11-26 07:03:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T06:19:55Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7184325921 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1816#issuecomment-7184325921). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T06:19:55Z. --- 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.
github-actions[bot] commented 2026-11-30 08:43:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:43:22Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7273261612 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1816#issuecomment-7273261612). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-30T08:43:22Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 06:52:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:52:55Z.


Triage (#1607) – head 2ebdf2f

#642 has a similar title but routes a single file for --precompile and does not touch --direct; it is not the same change. Main still sends a single non-RPF file given with --direct to the plain statistics path (only export/measure/milestone get Input::Files). No problems found in the diff; it conflicts with main's option parsing (opts.direct).
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7303390279 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1816#issuecomment-7303390279). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:52:55Z. --- **Triage (#1607)** – head 2ebdf2f #642 has a similar title but routes a single file for `--precompile` and does not touch `--direct`; it is not the same change. Main still sends a single non-RPF file given with `--direct` to the plain statistics path (only export/measure/milestone get `Input::Files`). No problems found in the diff; it conflicts with main's option parsing (`opts.direct`). Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1816:upstream-pr/1816'
git switch 'upstream-pr/1816'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/1816'
git switch 'upstream-pr/1816'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1816'
git switch 'upstream-pr/1816'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1816'
git switch 'main'
git merge --squash 'upstream-pr/1816'
git switch 'main'
git merge --ff-only 'upstream-pr/1816'
git switch 'main'
git merge 'upstream-pr/1816'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1806
No description provided.