Shaders: --precompile exits with 1 when it did not build everything #2105

Closed
github-bot wants to merge 1 commit from gh-pr/2105/head into gh-pr/2105/base
Owner

@⁠jakubjuste-byte on GitHub · 2026-11-25 04:25 UTC · original
precompile-exit-status → main · +65 −7 · 2 files · 1 commits · closed without merging

Closed by the author.

**@⁠jakubjuste-byte** on GitHub · 2026-11-25 04:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/2105) `precompile-exit-status` → `main` · +65 −7 · 2 files · 1 commits · closed without merging Closed by the author.
`xcl shaders <src> --precompile` returned 0 whatever happened (only "no
GPU device" returned 2), so the precompile wrappers could not trust the
exit code: a program that did not translate or compile only showed in
the summary's error count, a refused pipeline only in the --pipelines
line, and a record that did not unpack (or a file that could not be
read) or that did not parse was skipped with no counter at all.

Such records are now counted, printed on a line of their own after the
summary ("records that did not unpack or parse N") and named among the
error examples. They count whatever --only asks for, since their stage
is not known. The summary line itself is unchanged: the wrapper scripts
match it with a regex anchored at both ends.

The exit status is 1 when errors, unreadable records or refused
pipelines are above 0 (precompile_status). The stages --only leaves out
and the GS halves left to the runtime are not failures. VS / PS / MS
programs that do not translate completely are still left out without a
count.

set_memory_reserve(2) moves to the caller in run(), so the unit test
does not lower the DXC memory reserve for the rest of the test process.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:18:52 +00:00
github-bot closed this pull request 2026-11-26 05:18:53 +00:00
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-25 05:54 UTC · original

Independent native Windows CLI check on exact PR head 3023ab21e596e814791385459fa964bc02278bc8, compared with current main 6020a33b16ba2de25b3aef5947552f2dc1831f09.

Hardware/toolchain: Windows 11 build 26200, Ryzen 9 5980HX, Radeon RX 6800M (driver 30.0.13002.13003), Rust 1.99.0 MSVC, DXC/DXIL 1.9.2609.5. The CLI cases below did not use the GPU.

  • cargo build --locked --workspace -j 2 on the PR head: passed.
  • cargo test --locked -p xcl --lib -j 2 precompile_fails_when_a_record_does_not_unpack_or_parse -- --test-threads=1 --show-output: 1 passed, 0 failed, 0 ignored.
  • Built xcl.exe shaders <folder-with-one-garbage.bin> --precompile --only ps on main: exit 0, compiled 0, already cached 0, errors 0. Same fixture and arguments on the PR head: exit 1, records that did not unpack or parse 1, and the bad filename is printed. This is a direct CLI check of the changed behavior, separate from the unit test's direct call to precompile.
  • Adding --limit 0 asks for no records: exit 0 on both revisions; the PR prints records that did not unpack or parse 0.

The fixture contains only the text not a console shader. I did not check a valid shader pack, GPU pipeline refusal, or a retail title run. Logs and the repeatable CLI harness are local; no game data was used or uploaded.

AI-assisted testing and report drafting with OpenAI Codex (GPT-6); I checked the exact revisions, exit codes, and logs before posting.

**@⁠luckyteagirl** on GitHub · 2026-11-25 05:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/2105#issuecomment-7154248307) Independent native Windows CLI check on exact PR head `3023ab21e596e814791385459fa964bc02278bc8`, compared with current `main` `6020a33b16ba2de25b3aef5947552f2dc1831f09`. Hardware/toolchain: Windows 11 build 26200, Ryzen 9 5980HX, Radeon RX 6800M (driver `30.0.13002.13003`), Rust 1.99.0 MSVC, DXC/DXIL 1.9.2609.5. The CLI cases below did not use the GPU. - `cargo build --locked --workspace -j 2` on the PR head: passed. - `cargo test --locked -p xcl --lib -j 2 precompile_fails_when_a_record_does_not_unpack_or_parse -- --test-threads=1 --show-output`: 1 passed, 0 failed, 0 ignored. - Built `xcl.exe shaders <folder-with-one-garbage.bin> --precompile --only ps` on `main`: exit **0**, `compiled 0, already cached 0, errors 0`. Same fixture and arguments on the PR head: exit **1**, `records that did not unpack or parse 1`, and the bad filename is printed. This is a direct CLI check of the changed behavior, separate from the unit test's direct call to `precompile`. - Adding `--limit 0` asks for no records: exit **0** on both revisions; the PR prints `records that did not unpack or parse 0`. The fixture contains only the text `not a console shader`. I did not check a valid shader pack, GPU pipeline refusal, or a retail title run. Logs and the repeatable CLI harness are local; no game data was used or uploaded. AI-assisted testing and report drafting with OpenAI Codex (GPT-6); I checked the exact revisions, exit codes, and logs before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 06:02 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 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 06:02 UTC · [original](https://github.com/xcl-dev/xcl/pull/2105#issuecomment-7154384211) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.