Scripts: report shader disassembly failures in layout checks #1088

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

@⁠broccolize on GitHub · 2026-11-24 11:27 UTC · original
broccolize:tooling/layout-disasm-errors → main · +40 −1 · 2 files · 1 commits · open

The shader layout checker used the disassembler’s stdout even when the child failed. That could produce a successful process exit and a zero-count summary. Report the file and disassembler error and propagate the failure.

What is in it

  • Check the exit status of xcl disasm before inspecting its output.
  • Use a synthetic shader and a failing child-process fixture to verify the diagnostic and exit status.

Tested

Clean head d17e8d946753f8bb679d2045590389fbec9a406c. Windows 11 build 26300, Intel Core i5-10300H, NVIDIA GeForce GTX 1650 driver 32.0.16.1714, Rust 1.100.0 MSVC, debug.

  • cargo build --locked --workspace passed.
  • cargo test --locked --workspace -- --test-threads=4 --show-output reported 741 passed, 0 failed, 41 ignored.
  • python -B -m unittest discover -s scripts -p test_check_layout.py passed.
  • The first workspace run hit the frame-clock timing assertion in statistics_name_each_frames_origin_and_rescheduled_handles_outlive_the_clock_tick. The reported counts are from the full rerun.
  • Runtime skips reported by the suite
    • SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64
    • SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64
    • SKIPPED placed_title_textures_share_vram_and_preserve_pixels: this adapter makes no reserved cube with mips
    • mklink /J unavailable – link case skipped
    • SKIPPED test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dll
    • SKIPPED uploads_start_from_each_subresources_state: no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D))

Not tested

Layout checks on extracted retail shaders.

AI use

Codex implemented the change, ran verification

**@⁠broccolize** on GitHub · 2026-11-24 11:27 UTC · [original](https://github.com/xcl-dev/xcl/pull/1088) `broccolize:tooling/layout-disasm-errors` → `main` · +40 −1 · 2 files · 1 commits · open The shader layout checker used the disassembler’s stdout even when the child failed. That could produce a successful process exit and a zero-count summary. Report the file and disassembler error and propagate the failure. **What is in it** - Check the exit status of `xcl disasm` before inspecting its output. - Use a synthetic shader and a failing child-process fixture to verify the diagnostic and exit status. **Tested** Clean head `d17e8d946753f8bb679d2045590389fbec9a406c`. Windows 11 build 26300, Intel Core i5-10300H, NVIDIA GeForce GTX 1650 driver 32.0.16.1714, Rust 1.100.0 MSVC, debug. - `cargo build --locked --workspace` passed. - `cargo test --locked --workspace -- --test-threads=4 --show-output` reported **741 passed, 0 failed, 41 ignored**. - `python -B -m unittest discover -s scripts -p test_check_layout.py` passed. - The first workspace run hit the frame-clock timing assertion in `statistics_name_each_frames_origin_and_rescheduled_handles_outlive_the_clock_tick`. The reported counts are from the full rerun. - Runtime skips reported by the suite - SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64 - SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64 - SKIPPED placed_title_textures_share_vram_and_preserve_pixels: this adapter makes no reserved cube with mips - mklink /J unavailable – link case skipped - SKIPPED test_title_draws_with_a_root_signature_under_the_debug_layer: no d3d12SDKLayers.dll - SKIPPED uploads_start_from_each_subresources_state: no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)) **Not tested** Layout checks on extracted retail shaders. **AI use** Codex implemented the change, ran verification
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:43:00 +00:00
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 14:15 UTC · original

Tested exact head d17e8d9, script tests only, since this PR has no test report yet.

Tested

  • Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here).
  • python -m pytest scripts/test_check_layout.py at the head: 1 passed.
  • The PR's test file(s) against current main's script (930e8b4): 1 failed: test_disassembler_failure_stops_the_scan. So the new test catches the problem the PR fixes.
  • #1196 rewrites the same loop in check_layout.py (into check_directory()) and does not check xcl disasm's exit code, so the two conflict (git merge-tree reports a conflict) and whichever lands second needs this check carried over.

Not tested

  • PowerShell 7, the CI workflow itself, a game (no runtime code changed).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 14:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/1088#issuecomment-7134088006) Tested exact head `d17e8d9`, script tests only, since this PR has no test report yet. **Tested** - Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here). - `python -m pytest scripts/test_check_layout.py` at the head: 1 passed. - The PR's test file(s) against current main's script (`930e8b4`): 1 failed: `test_disassembler_failure_stops_the_scan`. So the new test catches the problem the PR fixes. - #1196 rewrites the same loop in `check_layout.py` (into `check_directory()`) and does not check `xcl disasm`'s exit code, so the two conflict (`git merge-tree` reports a conflict) and whichever lands second needs this check carried over. **Not tested** - PowerShell 7, the CI workflow itself, a game (no runtime code changed). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 01:18 UTC · original

Tested

Clean detached worktree at PR head d17e8d946753f8bb679d2045590389fbec9a406c. git status --porcelain=v1 --untracked-files=all was empty before and after testing. Windows 11 Enterprise Evaluation 25H2 x64 (build 26200.9974), AMD Ryzen 7 3800X, portable CPython 3.13.7 x64.

  • python -B -m unittest discover -s scripts -p test_check_layout.py -v passed 1 test, with 0 failed, 0 ignored, and 0 skipped.
  • python -B L:/XclTooling/pr1088-d17e8d9/verify_cli.py ran python -B scripts/re/check_layout.py <synthetic-dir> in a separate process for each of three fixture directories. A standalone stub at the ignored target/debug/xcl.exe path supplied synthetic disassembly and recorded which files it received. All 3 cases passed, with 0 failed, 0 ignored, and 0 skipped.
    • A successful child produced one in-bounds load. The checker exited 0 and printed loads on parameter boundaries: 1, off: 0 on stdout.
    • A child that returned 7 and emitted both a diagnostic on stderr and usable disassembly on stdout caused the checker to exit 7. The checker printed the input filename, exit code, and child stderr diagnostic on stderr, and left stdout empty.
    • A child that returned 9 and emitted a diagnostic only on stdout caused the checker to exit 9 and relay the filename, exit code, and diagnostic on stderr. The checker again left stdout empty. In both failure cases the stub's invocation log contained only the first file, confirming that the checker stopped before the next input.

Not tested

The real xcl disasm executable, retail shaders or game assets, the Cargo workspace build and tests, GPU execution, and CI.

AI use

Codex (gpt-6.2-sol) wrote the temporary fixtures and harness, ran the tests, and wrote this report.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 01:18 UTC · [original](https://github.com/xcl-dev/xcl/pull/1088#issuecomment-7149414030) **Tested** Clean detached worktree at PR head `d17e8d946753f8bb679d2045590389fbec9a406c`. `git status --porcelain=v1 --untracked-files=all` was empty before and after testing. Windows 11 Enterprise Evaluation 25H2 x64 (build 26200.9974), AMD Ryzen 7 3800X, portable CPython 3.13.7 x64. - `python -B -m unittest discover -s scripts -p test_check_layout.py -v` passed 1 test, with 0 failed, 0 ignored, and 0 skipped. - `python -B L:/XclTooling/pr1088-d17e8d9/verify_cli.py` ran `python -B scripts/re/check_layout.py <synthetic-dir>` in a separate process for each of three fixture directories. A standalone stub at the ignored `target/debug/xcl.exe` path supplied synthetic disassembly and recorded which files it received. All 3 cases passed, with 0 failed, 0 ignored, and 0 skipped. - A successful child produced one in-bounds load. The checker exited 0 and printed `loads on parameter boundaries: 1, off: 0` on stdout. - A child that returned 7 and emitted both a diagnostic on stderr and usable disassembly on stdout caused the checker to exit 7. The checker printed the input filename, exit code, and child stderr diagnostic on stderr, and left stdout empty. - A child that returned 9 and emitted a diagnostic only on stdout caused the checker to exit 9 and relay the filename, exit code, and diagnostic on stderr. The checker again left stdout empty. In both failure cases the stub's invocation log contained only the first file, confirming that the checker stopped before the next input. **Not tested** The real `xcl disasm` executable, retail shaders or game assets, the Cargo workspace build and tests, GPU execution, and CI. **AI use** Codex (gpt-6.2-sol) wrote the temporary fixtures and harness, ran the tests, and wrote this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 08:38 UTC · original

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

  • cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 08:38 UTC · [original](https://github.com/xcl-dev/xcl/pull/1088#issuecomment-7157296437) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun. Thanks!
Author
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-26 00:06 UTC · original · edited 2026-11-26 00:13 UTC

On d17e8d946753f8bb679d2045590389fbec9a406c, I compared this checker with #2151 at aa825c088e65db380f67a112e0474e56ea841b6a using two synthetic DXBC files and a native disassembler stand-in. It returned 23 on the first file in four cases: stderr only, stdout only, both streams, and neither. This PR reported the filename and exit code, preferred stderr when both were present, relayed stdout when it was the only diagnostic, and stopped before the second file in all four cases. With two successful results it checked both loads. python -B -m unittest discover -s scripts -p "test_*.py" on this head passed 10/10.

#2151 continues scanning after an error and returns an aggregate status of 1. Its current head drops a stdout-only diagnostic. This one-line follow-up and regression assertion on #2151 preserve that message while retaining batch semantics. I ran the five cases on both PRs and again on the follow-up (15 native CLI runs). Windows 11, Core i7-13700, Python 3.14.3; synthetic inputs only. No real disassembly, retail shader, or GPU run. OpenAI Codex (GPT-6) wrote the fixtures and follow-up and ran the checks.

**@⁠RavenCurseBurg** on GitHub · 2026-11-26 00:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/1088#issuecomment-7178403801) · edited 2026-11-26 00:13 UTC On `d17e8d946753f8bb679d2045590389fbec9a406c`, I compared this checker with #2151 at `aa825c088e65db380f67a112e0474e56ea841b6a` using two synthetic DXBC files and a native disassembler stand-in. It returned 23 on the first file in four cases: stderr only, stdout only, both streams, and neither. This PR reported the filename and exit code, preferred stderr when both were present, relayed stdout when it was the only diagnostic, and stopped before the second file in all four cases. With two successful results it checked both loads. `python -B -m unittest discover -s scripts -p "test_*.py"` on this head passed 10/10. #2151 continues scanning after an error and returns an aggregate status of 1. Its current head drops a stdout-only diagnostic. This [one-line follow-up and regression assertion on #2151](https://github.com/RavenCurseBurg/xcl/commit/1272701ae58bbf705c85c9d2fa9564f9c87476ef) preserve that message while retaining batch semantics. I ran the five cases on both PRs and again on the follow-up (15 native CLI runs). Windows 11, Core i7-13700, Python 3.14.3; synthetic inputs only. No real disassembly, retail shader, or GPU run. OpenAI Codex (GPT-6) wrote the fixtures and follow-up and ran the checks.
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/1088/head:github-bot/gh-1088'
git switch 'github-bot/gh-1088'

Merge

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