xcl disasm: a failed --fssm write exits non-zero #1701

Open
b3IKK wants to merge 1 commit from upstream-pr/1711 into main
b3IKK commented 2026-11-24 19:32:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-24T19:32:50Z.


xcl disasm <console shader> --fssm out printed xcl disasm: <name>: <error> when the FSSM could not be saved and then returned 0, so a script that extracts FSSMs saw success while the file was missing. A --fssm with no file name after it was ignored the same way.

This saves through save_fssm(), carries the failure out of print_xbox(), returns 2 from run() when a file the user asked for could not be written, and makes --fssm without a value an error before anything is read. The disassembly itself is still printed in both cases.

What is in it

  • crates/xcl/src/disasm.rs: add save_fssm() and print_xbox(...) -> bool; run() returns 2 on a failed --fssm write or a nameless --fssm; add test a_failed_fssm_write_exits_2 (a synthetic XDAT/XBCH container from the xbox test helpers, writing onto a directory) — fails on main with left: 0, right: 2.

Tested

  • hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1)
  • .\scripts\test.ps1 (cargo build --workspace + cargo test --workspace -- --test-threads=4): 960 passed, 0 failed, 43 ignored (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses, no heap windows, and cannot disable the driver cache (Windows Developer Mode is required))
  • cargo test -p xcl --lib disasm: 1 passed, 0 failed

Regression run

main (1d027e5, clean tree, no local changes):

xcl-smoke v1
commit: 1d027e5c76c9a86a7ee2ca1cc677edf0be95d331
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1645 (PresentX 1645)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14611 MB

PR (f59458d, clean tree, no local changes):

xcl-smoke v1
commit: f59458df682ae596c062aded56497c989e38794a
gpu: NVIDIA GeForce RTX 5080
title: 9cc6a39e
seconds: 60
exit: 0x0
frames shown: 1394 (PresentX 1394)
presents per 2 s (last 3): 20 5 3
device removals: 0
crashes: 0
peak commit: 21690 MB

(Two runs of this head — 1428 and 1394 frames — both with the translated-shader and pipeline caches cold right after the test suite; the title spends the minute rebuilding them. It is the same binary as the main run, whose block is the one above.)

Not tested

  • AMD GPUs and native wave64 hardware
  • other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine

AI use

  • OpenCode, Gemini 4 Neon: audited xcl disasm, wrote the fix and the end-to-end test (and confirmed it fails without the fix), rebased onto 1d027e5, ran the test suite and scripts/smoke.ps1 regression runs with #677's title hashing, and drafted this PR description.
<!-- greyfinch-sync:ivall/xcl:issue:5478950384 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1711). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-24T19:32:50Z. --- `xcl disasm <console shader> --fssm out` printed `xcl disasm: <name>: <error>` when the FSSM could not be saved and then returned **0**, so a script that extracts FSSMs saw success while the file was missing. A `--fssm` with no file name after it was ignored the same way. This saves through `save_fssm()`, carries the failure out of `print_xbox()`, returns **2** from `run()` when a file the user asked for could not be written, and makes `--fssm` without a value an error before anything is read. The disassembly itself is still printed in both cases. **What is in it** - `crates/xcl/src/disasm.rs`: add `save_fssm()` and `print_xbox(...) -> bool`; `run()` returns 2 on a failed `--fssm` write or a nameless `--fssm`; add test `a_failed_fssm_write_exits_2` (a synthetic XDAT/XBCH container from the `xbox` test helpers, writing onto a directory) — fails on `main` with `left: 0, right: 2`. **Tested** - hardware (GPU + driver, CPU), Windows build, Rust version, debug / release: NVIDIA GeForce RTX 5080 (driver 32.0.16.1088), AMD Ryzen 9 9950X3D, Windows 11 10.0.26300, Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`), DXC 1.9.2609.5, debug (`scripts/test.ps1`) and release (`scripts/smoke.ps1`) - `.\scripts\test.ps1` (`cargo build --workspace` + `cargo test --workspace -- --test-threads=4`): 960 passed, 0 failed, 43 ignored (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses, `no heap windows`, and `cannot disable the driver cache (Windows Developer Mode is required)`) - `cargo test -p xcl --lib disasm`: 1 passed, 0 failed **Regression run** main (`1d027e5`, clean tree, no local changes): ``` xcl-smoke v1 commit: 1d027e5c76c9a86a7ee2ca1cc677edf0be95d331 gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1645 (PresentX 1645) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14611 MB ``` PR (`f59458d`, clean tree, no local changes): ``` xcl-smoke v1 commit: f59458df682ae596c062aded56497c989e38794a gpu: NVIDIA GeForce RTX 5080 title: 9cc6a39e seconds: 60 exit: 0x0 frames shown: 1394 (PresentX 1394) presents per 2 s (last 3): 20 5 3 device removals: 0 crashes: 0 peak commit: 21690 MB ``` (Two runs of this head — 1428 and 1394 frames — both with the translated-shader and pipeline caches cold right after the test suite; the title spends the minute rebuilding them. It is the same binary as the main run, whose block is the one above.) **Not tested** - AMD GPUs and native wave64 hardware - other titles (Minecraft Preview, Unicorn Overlord, Fortnite, XDefiant) and Linux / Wine **AI use** - OpenCode, Gemini 4 Neon: audited `xcl disasm`, wrote the fix and the end-to-end test (and confirmed it fails without the fix), rebased onto `1d027e5`, ran the test suite and `scripts/smoke.ps1` regression runs with #677's title hashing, and drafted this PR description.
b3IKK commented 2026-11-24 22:06:55 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by b3IKK on 2026-11-24T21:58:22Z.


Rebased onto 1d027e5 and re-ran: 960 passed, 0 failed, 43 ignored, and the blocks above use the current scripts/smoke.ps1 (#677's hashed itle: line). Note the PR block's frame count: two runs of this head both came in around 1400 frames with the caches cold after the suite (the title rebuilds its translated shaders in the minute) — same binary, no crashes, no device removals.

<!-- greyfinch-sync:ivall/xcl:comment:7145632367 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1711#issuecomment-7145632367). Originally posted by [b3IKK](https://github.com/b3IKK) on 2026-11-24T21:58:22Z. --- Rebased onto 1d027e5 and re-ran: 960 passed, 0 failed, 43 ignored, and the blocks above use the current scripts/smoke.ps1 (#677's hashed itle: line). Note the PR block's frame count: two runs of this head both came in around 1400 frames with the caches cold after the suite (the title rebuilds its translated shaders in the minute) — same binary, no crashes, no device removals.
DavidM1911 commented 2026-11-24 23:08:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T22:18:57Z.


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 under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified main.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7146078048 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1711#issuecomment-7146078048). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T22:18:57Z. --- 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 under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodified `main`.) Thanks!
JJAutoCompare commented 2026-11-25 04:10:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:04:10Z.


XCL PR #1711 verification

Clean PR head f59458df682ae596c062aded56497c989e38794a on STOR-WINLAB. Windows 11 Enterprise Evaluation x64 (10.0.26200.9974), AuthenticAMD family 23 model 113, Intel Arc A770 (16 GB) with driver 32.0.101.9175, DXC 1.9.2609.5, and rustc 1.100.0 (0ef1bc386 2026-11-09) on x86_64-pc-windows-msvc. Unoptimized dev and test profiles with debug info and incremental compilation disabled.

Tested

  • cargo build --workspace and cargo test --workspace --no-run succeeded outside the Arc lock. The latter produced 19 test binaries.
  • cargo test -p xcl --lib disasm::tests::a_failed_fssm_write_exits_2 -- --exact with XCL_ADAPTER=NONE_CPU_ONLY outside the lock gave 1 passed, 0 failed, 0 ignored. With a synthetic Xbox shader, a directory destination returned 2, a writable destination returned 0 and saved bytes starting with FSSM, and a missing filename returned 2.
  • xcl.exe disasm <nonexistent-input.xbs> --fssm returned process exit code 2 and printed xcl disasm: --fssm needs a file name.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 ran once inside Invoke-ArcTest.ps1 with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1. Cargo exited 101. Across 20 result lines (19 test binaries and one doctest target), libtest reported 941 passed, 19 failed, 43 ignored. The FSSM test and the existing disassembly byte-range CLI test passed.

Workspace failures and skips

  • The library target had 18 failures. Fourteen reported CreateComputePipelineState error 0x80070057. Four had assertion mismatches involving FMA contraction, implicit LOD sampling, f16 high-half preservation, or wave64 pixel reductions.
  • The end-to-end title test failed its RSSetDepthBiasX check. The top-right pixel was blue instead of green.
  • pr1711-suite.log contained 25 lines starting with SKIPPED . These represent 17 missing-wave64 cases, three refused wave32 per-lane cases, two debug-layer cases, and one each for tiling tier, driver-cache control, and heap windows. These skips are excluded from coverage even when libtest reports success. Retail sample paths also skipped with XCL_SAMPLE_* unset.

Not tested

No matched main run, retail-title smoke run, or other GPU. The suite failures have no matched baseline for comparison.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1711-suite.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7152499613 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1711#issuecomment-7152499613). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T04:04:10Z. --- # XCL PR #1711 verification Clean PR head `f59458df682ae596c062aded56497c989e38794a` on STOR-WINLAB. Windows 11 Enterprise Evaluation x64 (`10.0.26200.9974`), AuthenticAMD family 23 model 113, Intel Arc A770 (16 GB) with driver `32.0.101.9175`, DXC `1.9.2609.5`, and rustc `1.100.0 (0ef1bc386 2026-11-09)` on `x86_64-pc-windows-msvc`. Unoptimized dev and test profiles with debug info and incremental compilation disabled. **Tested** - `cargo build --workspace` and `cargo test --workspace --no-run` succeeded outside the Arc lock. The latter produced 19 test binaries. - `cargo test -p xcl --lib disasm::tests::a_failed_fssm_write_exits_2 -- --exact` with `XCL_ADAPTER=NONE_CPU_ONLY` outside the lock gave 1 passed, 0 failed, 0 ignored. With a synthetic Xbox shader, a directory destination returned 2, a writable destination returned 0 and saved bytes starting with `FSSM`, and a missing filename returned 2. - `xcl.exe disasm <nonexistent-input.xbs> --fssm` returned process exit code 2 and printed `xcl disasm: --fssm needs a file name`. - `cargo test --workspace --no-fail-fast -- --test-threads=4` ran once inside `Invoke-ArcTest.ps1` with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`. Cargo exited 101. Across 20 result lines (19 test binaries and one doctest target), libtest reported **941 passed, 19 failed, 43 ignored**. The FSSM test and the existing disassembly byte-range CLI test passed. **Workspace failures and skips** - The library target had 18 failures. Fourteen reported `CreateComputePipelineState` error `0x80070057`. Four had assertion mismatches involving FMA contraction, implicit LOD sampling, f16 high-half preservation, or wave64 pixel reductions. - The end-to-end title test failed its `RSSetDepthBiasX` check. The top-right pixel was blue instead of green. - `pr1711-suite.log` contained 25 lines starting with `SKIPPED `. These represent 17 missing-wave64 cases, three refused wave32 per-lane cases, two debug-layer cases, and one each for tiling tier, driver-cache control, and heap windows. These skips are excluded from coverage even when libtest reports success. Retail sample paths also skipped with `XCL_SAMPLE_*` unset. **Not tested** No matched `main` run, retail-title smoke run, or other GPU. The suite failures have no matched baseline for comparison. **AI use** T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1711-suite.log` and published.
DavidM1911 commented 2026-11-26 07:03:31 +00:00 (Migrated from github.com)

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


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:7184279934 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1711#issuecomment-7184279934). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T06:17:16Z. --- 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:14 +00:00 (Migrated from github.com)

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


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:7273258687 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1711#issuecomment-7273258687). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-30T08:43:14Z. --- 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:33:39 +00:00 (Migrated from github.com)

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


Triage (#1607) – head f59458d

Update (rechecked against main 6bfb5c51): withdrawn from the close list; recommendation: keep open. #1140 also conflicts with main, and this PR also rejects --fssm with no file name (exit 2) and tests it through run(). One of the two should land after a rebase.

#1140 makes the same change in crates/xcl/src/disasm.rs: print_xbox returns whether every --fssm write succeeded and run exits 2 after still printing the listing. #1140 was opened earlier, its build check is green, and it tests the path end to end in tests/disasm_e2e.rs.
This PR also adds an error for --fssm given without a file name. That part is not in #1140 and could be offered there or as its own small PR.
No problems found in the diff.
Recommendation: close (duplicate of #1140).

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run.

<!-- greyfinch-sync:ivall/xcl:comment:7303013454 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1711#issuecomment-7303013454). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:33:39Z. --- **Triage (#1607)** – head f59458d **Update (rechecked against main 6bfb5c51): withdrawn from the close list; recommendation: keep open.** #1140 also conflicts with main, and this PR also rejects `--fssm` with no file name (exit 2) and tests it through `run()`. One of the two should land after a rebase. #1140 makes the same change in `crates/xcl/src/disasm.rs`: `print_xbox` returns whether every `--fssm` write succeeded and `run` exits 2 after still printing the listing. #1140 was opened earlier, its build check is green, and it tests the path end to end in `tests/disasm_e2e.rs`. This PR also adds an error for `--fssm` given without a file name. That part is not in #1140 and could be offered there or as its own small PR. No problems found in the diff. ~~Recommendation: close (duplicate of #1140).~~ AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run.
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/1711:upstream-pr/1711'
git switch 'upstream-pr/1711'

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