Scripts: report shader disassembly failures in layout checks #1079

Open
broccolize wants to merge 1 commit from upstream-pr/1088 into main
broccolize commented 2026-11-24 11:27:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by broccolize on 2026-11-24T11:27:26Z.


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

<!-- greyfinch-sync:ivall/xcl:issue:5471253377 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1088). Originally posted by [broccolize](https://github.com/broccolize) on 2026-11-24T11:27:26Z. --- 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
futurepro62 commented 2026-11-24 15:05:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T14:15:35Z.


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.
<!-- greyfinch-sync:ivall/xcl:comment:7134088006 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1088#issuecomment-7134088006). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T14:15:35Z. --- 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.
JJAutoCompare commented 2026-11-25 02:08:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T01:18:28Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7149414030 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1088#issuecomment-7149414030). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T01:18:28Z. --- **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.
DavidM1911 commented 2026-11-25 09:08:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T08:38:52Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7157296437 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1088#issuecomment-7157296437). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T08:38:52Z. --- 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!
RavenCurseBurg commented 2026-11-26 01:05:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-26T00:06:33Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7178403801 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1088#issuecomment-7178403801). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-26T00:06:33Z. --- 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.
github-actions[bot] commented 2026-11-29 20:44:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:44:56Z.


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:7262326675 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1088#issuecomment-7262326675). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T20:44:56Z. --- 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.
broccolize commented 2026-11-30 11:22:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by broccolize on 2026-11-30T11:22:16Z.


This makes the layout checker report disassembler failures and stop on the first failed input. The tested patch is awaiting maintainer review.

<!-- greyfinch-sync:ivall/xcl:comment:7276930732 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1088#issuecomment-7276930732). Originally posted by [broccolize](https://github.com/broccolize) on 2026-11-30T11:22:16Z. --- This makes the layout checker report disassembler failures and stop on the first failed input. The tested patch is awaiting maintainer review.
Foniass commented 2026-12-01 04:47:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:47:41Z.


Triage (#1607) – head d17e8d9

#2151 also reports xcl disasm failures in scripts/re/check_layout.py, as part of a larger CLI rewrite: it counts the failures, keeps scanning and exits 1. This PR stops at the first failure with xcl's exit code. #1196 rewrites the same line without checking the return code.
No problems found in the diff.
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:7301107592 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1088#issuecomment-7301107592). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T04:47:41Z. --- **Triage (#1607)** – head d17e8d9 #2151 also reports `xcl disasm` failures in scripts/re/check_layout.py, as part of a larger CLI rewrite: it counts the failures, keeps scanning and exits 1. This PR stops at the first failure with xcl's exit code. #1196 rewrites the same line without checking the return code. No problems found in the diff. 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/1088:upstream-pr/1088'
git switch 'upstream-pr/1088'

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/1088'
git switch 'upstream-pr/1088'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1088'
git switch 'upstream-pr/1088'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1088'
git switch 'main'
git merge --squash 'upstream-pr/1088'
git switch 'main'
git merge --ff-only 'upstream-pr/1088'
git switch 'main'
git merge 'upstream-pr/1088'
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!1079
No description provided.