Shaders: report direct shader dump failures #1745

Open
NemesisDawn wants to merge 1 commit from upstream-pr/1755 into main
NemesisDawn commented 2026-11-24 20:16:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by NemesisDawn on 2026-11-24T20:16:54Z.


Require a usable output directory for direct shader dumps and return a failure when a file cannot be written. Keep the sweep summary visible.

What is in it

  • crates/xcl/src/shaders.rs handles missing destinations and write errors. crates/xcl/tests/shaders_e2e.rs adds both regression cases.

Tested

  • At 7c9bab2, both regression cases passed on Windows using a standalone CLI fixture compiled with rustc 1.100.0. The fixture uses synthetic shader input and exercises a real file-write failure.

Regression run

  • Pending comparable retail-title runs on upstream main and this PR’s commit.

Not tested

  • Full XCL build, Cargo workspace suite on a GPU, and retail-title smoke runs.

AI use

  • OpenAI Codex (GPT-6, exact variant unavailable) wrote the patch and regression tests, ran the focused checks, and drafted this description.
<!-- greyfinch-sync:ivall/xcl:issue:5479626425 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1755). Originally posted by [NemesisDawn](https://github.com/NemesisDawn) on 2026-11-24T20:16:54Z. --- Require a usable output directory for direct shader dumps and return a failure when a file cannot be written. Keep the sweep summary visible. **What is in it** - `crates/xcl/src/shaders.rs` handles missing destinations and write errors. `crates/xcl/tests/shaders_e2e.rs` adds both regression cases. **Tested** - At `7c9bab2`, both regression cases passed on Windows using a standalone CLI fixture compiled with `rustc` 1.100.0. The fixture uses synthetic shader input and exercises a real file-write failure. **Regression run** - Pending comparable retail-title runs on upstream `main` and this PR’s commit. **Not tested** - Full XCL build, Cargo workspace suite on a GPU, and retail-title smoke runs. **AI use** - OpenAI Codex (GPT-6, exact variant unavailable) wrote the patch and regression tests, ran the focused checks, and drafted this description.
Anon64 commented 2026-11-24 21:09:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-24T20:28:47Z.


Regression run for this PR: head 7c9bab2, based on main b9b6ea6. RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release, XCL_NETWORK=0, A pressed every 4 s from 20 s, scripts/smoke.ps1 on a retail title for 60 s, back to back with the main run.

main b9b6ea6:

xcl-smoke v1
commit: b9b6ea62080cc62fc19e212033372d01c6214e5c
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1552 (PresentX 1552)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 91656 MB

this PR:

xcl-smoke v1
commit: 7c9bab2507780ff9c13267eab71351703b7a3fd3
gpu: NVIDIA GeForce RTX 3060
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1599 (PresentX 1600)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 94726 MB

No device removals or crashes; 103 % of main's frames, 103 % of its peak commit.

This is the second pair. In the first pair (also back to back) peak commit was 23.4 GB on main and 57.4 GB on this PR, both with 0 crashes; the second pair shows that spread comes from the preload, not from this PR.

Peak commit on this machine is mostly the pipeline preload's DXC compiles (#1035) and varies a lot from run to run, so it says little about this PR.

Not tested: the whole suite; the xcl shaders direct-dump path this PR changes (the title run does not use it).

Written with Claude Code (Claude Opus 5.5) from runs on this machine.

<!-- greyfinch-sync:ivall/xcl:comment:7143608700 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1755#issuecomment-7143608700). Originally posted by [Anon64](https://github.com/Anon64) on 2026-11-24T20:28:47Z. --- Regression run for this PR: head `7c9bab2`, based on `main` `b9b6ea6`. RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release, `XCL_NETWORK=0`, A pressed every 4 s from 20 s, `scripts/smoke.ps1` on a retail title for 60 s, back to back with the `main` run. main `b9b6ea6`: ``` xcl-smoke v1 commit: b9b6ea62080cc62fc19e212033372d01c6214e5c gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1552 (PresentX 1552) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 91656 MB ``` this PR: ``` xcl-smoke v1 commit: 7c9bab2507780ff9c13267eab71351703b7a3fd3 gpu: NVIDIA GeForce RTX 3060 title: retail-title seconds: 60 exit: 0x0 frames shown: 1599 (PresentX 1600) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 94726 MB ``` No device removals or crashes; 103 % of main's frames, 103 % of its peak commit. This is the second pair. In the first pair (also back to back) peak commit was 23.4 GB on `main` and 57.4 GB on this PR, both with 0 crashes; the second pair shows that spread comes from the preload, not from this PR. Peak commit on this machine is mostly the pipeline preload's DXC compiles (#1035) and varies a lot from run to run, so it says little about this PR. **Not tested:** the whole suite; the `xcl shaders` direct-dump path this PR changes (the title run does not use it). Written with Claude Code (Claude Opus 5.5) from runs on this machine.
futurepro62 commented 2026-11-24 21:30:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T21:19:37Z.


Full-suite run, since this PR has no test report yet. Tested exact head 7c9bab2 (on its base b9b6ea6).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record: 889 passed, 0 failed, 42 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: direct_dump_requires_a_directory, direct_dump_reports_an_output_write_failure.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 891 passed, 0 failed, 42 ignored. SKIPPED: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows), pso_measurement_compiles_an_exact_synthetic_record (cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)).
  • Two tests were skipped with --skip on NVIDIA. Both fail on main 7f7e768 too, not because of this PR: under XCL_REQUIRE_GPU=mesh, runner::skip_test turns their skips into failures. heap_window_out_of_memory_falls_back_to_the_switch_form skips when XCL_HEAP_WINDOWS is unset (#1651), and shaders::tests::pso_measurement_compiles_an_exact_synthetic_record skips because Developer Mode is off on this PC (it cannot disable the driver cache). The AMD run does not set XCL_REQUIRE_GPU, so there both just print SKIPPED.

Not tested

  • a release build, a game (test run only).

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:7144781237 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1755#issuecomment-7144781237). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T21:19:37Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `7c9bab2` (on its base `b9b6ea6`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record`: **889 passed, 0 failed, 42 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `direct_dump_requires_a_directory`, `direct_dump_reports_an_output_write_failure`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **891 passed, 0 failed, 42 ignored**. SKIPPED: `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows), `pso_measurement_compiles_an_exact_synthetic_record` (cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)). - Two tests were skipped with `--skip` on NVIDIA. Both fail on main `7f7e768` too, not because of this PR: under `XCL_REQUIRE_GPU=mesh`, `runner::skip_test` turns their skips into failures. `heap_window_out_of_memory_falls_back_to_the_switch_form` skips when `XCL_HEAP_WINDOWS` is unset (#1651), and `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record` skips because Developer Mode is off on this PC (it cannot disable the driver cache). The AMD run does not set `XCL_REQUIRE_GPU`, so there both just print SKIPPED. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
DavidM1911 commented 2026-11-24 23:08:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T23:04:39Z.


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:7146985886 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1755#issuecomment-7146985886). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T23:04:39Z. --- 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:49 +00:00 (Migrated from github.com)

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


XCL PR #1755 — Direct shader dump failure reporting

Verified 7c9bab2507780ff9c13267eab71351703b7a3fd3 on a clean detached checkout on STOR-WINLAB. Windows 11 x64 build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 (driver 32.0.101.9175), DXC 1.9.2609.5, rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Dev and test profiles were unoptimized with debug info and incremental compilation disabled.

Tested

  • cargo build --workspace and cargo test --workspace --no-run succeeded outside the Arc mutex. The latter built 19 test executables.
  • cargo test -p xcl --test shaders_e2e direct_dump_ with XCL_ADAPTER=NONE_CPU_ONLY outside the mutex: 2 passed, 0 failed, 0 ignored, 0 explicit skips. The tests verified exit code 2 and stderr for a missing --dump argument, a following --json flag, and an existing file used as the dump directory. They also checked that the existing file was preserved. A synthetic shader produced a byte-for-byte guest dump. Replacing that output file with a directory made the rerun report the write failure and exit 2.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 ran once under Invoke-ArcTest.ps1 with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1. Cargo exited 101. All 20 result lines in pr1755-suite.log (19 test executables and 1 doctest suite) sum to 873 passed, 18 failed, and 42 ignored. Both direct dump tests passed in this run.

Workspace failures and skips

17 library GPU tests failed with compute pipeline creation errors (0x80070057) or assertion mismatches. The test-title integration test failed at D3D12.X dynamic depth bias (RSSetDepthBiasX), where the top-right pixel was blue instead of green. The log has 7 lines starting with SKIPPED : two for missing wave64, two for missing debug-layer support, and one each for tiled resources tier < 2, driver cache control, and missing heap windows. These skips provide no coverage.

Not tested

Matched main baseline, retail-title smoke runs, AMD or NVIDIA adapters, and sample-dependent paths (XCL_SAMPLE_* unset).

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 pr1755-suite.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7152581875 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1755#issuecomment-7152581875). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T04:09:28Z. --- ## XCL PR #1755 — Direct shader dump failure reporting Verified `7c9bab2507780ff9c13267eab71351703b7a3fd3` on a clean detached checkout on STOR-WINLAB. Windows 11 x64 build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 (driver 32.0.101.9175), DXC 1.9.2609.5, rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Dev and test profiles were unoptimized with debug info and incremental compilation disabled. **Tested** - `cargo build --workspace` and `cargo test --workspace --no-run` succeeded outside the Arc mutex. The latter built 19 test executables. - `cargo test -p xcl --test shaders_e2e direct_dump_` with `XCL_ADAPTER=NONE_CPU_ONLY` outside the mutex: 2 passed, 0 failed, 0 ignored, 0 explicit skips. The tests verified exit code 2 and stderr for a missing `--dump` argument, a following `--json` flag, and an existing file used as the dump directory. They also checked that the existing file was preserved. A synthetic shader produced a byte-for-byte guest dump. Replacing that output file with a directory made the rerun report the write failure and exit 2. - `cargo test --workspace --no-fail-fast -- --test-threads=4` ran once under `Invoke-ArcTest.ps1` with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`. Cargo exited 101. All 20 result lines in `pr1755-suite.log` (19 test executables and 1 doctest suite) sum to 873 passed, 18 failed, and 42 ignored. Both direct dump tests passed in this run. **Workspace failures and skips** 17 library GPU tests failed with compute pipeline creation errors (0x80070057) or assertion mismatches. The test-title integration test failed at D3D12.X dynamic depth bias (`RSSetDepthBiasX`), where the top-right pixel was blue instead of green. The log has 7 lines starting with `SKIPPED `: two for missing wave64, two for missing debug-layer support, and one each for tiled resources tier < 2, driver cache control, and missing heap windows. These skips provide no coverage. **Not tested** Matched `main` baseline, retail-title smoke runs, AMD or NVIDIA adapters, and sample-dependent paths (`XCL_SAMPLE_*` unset). **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 `pr1755-suite.log` and published.
github-actions[bot] commented 2026-11-28 20:17:44 +00:00 (Migrated from github.com)

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


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:7245180891 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1755#issuecomment-7245180891). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T20:17:44Z. --- 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:40:04 +00:00 (Migrated from github.com)

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


Triage (#1607) – head 7c9bab2

No other open PR reports --direct --dump failures. Part of it is now on main: since #2266 (9a7e0ed), --dump without a value or followed by another -- flag is rejected by cli::Parser::value ("--dump needs a value"), so the new expected a directory after --dump branch and the first half of direct_dump_requires_a_directory no longer apply.
Still missing on main: the create_dir_all failure and the per-file write failures in direct_sweep (both let _ = there). The PR conflicts with main, where direct_sweep now reads opts.dump; a rebase should keep only that part and adjust the test's expected message.
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:7303134015 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1755#issuecomment-7303134015). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:40:04Z. --- **Triage (#1607)** – head 7c9bab2 No other open PR reports `--direct --dump` failures. Part of it is now on main: since #2266 (`9a7e0ed`), `--dump` without a value or followed by another `--` flag is rejected by `cli::Parser::value` ("--dump needs a value"), so the new `expected a directory after --dump` branch and the first half of `direct_dump_requires_a_directory` no longer apply. Still missing on main: the `create_dir_all` failure and the per-file write failures in `direct_sweep` (both `let _ =` there). The PR conflicts with main, where `direct_sweep` now reads `opts.dump`; a rebase should keep only that part and adjust the test's expected message. 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/1755:upstream-pr/1755'
git switch 'upstream-pr/1755'

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