Shaders: list offline precompile options in CLI help #2213

Merged
Creaa merged 1 commit from upstream-pr/2223 into main 2026-11-25 18:14:05 +00:00
Creaa commented 2026-11-25 10:21:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Creaa on 2026-11-25T10:21:10Z.


List the offline shader precompile options in xcl --help so users can find the workflow documented in the README. Fixes #2216.

What is in it

  • The shader help describes --precompile, --only STAGE, --pipelines and --used-only.
  • A CLI test checks all four options in the top-level help output.

Tested

  • Windows 11 build 26300, i7-13700F, RTX 4070 (driver 617.14), rustc 1.100.0. Debug workspace tests and release smoke builds.
  • cargo test -p xcl --test shaders_e2e help_lists_shader_precompile_options -- --exact failed on the original help at 568e7db7 and passed with the fix.
  • .\scripts\test.ps1 --show-output at 5db200e5 ran cargo build --workspace and cargo test --workspace -- --test-threads=4 --show-output. Cargo reported 1155 passed, 0 failed, 46 ignored. The suite logged 27 GPU skips within the passing tests: 20 wave64 cases, 3 unsupported wave32 per-lane cases, 2 missing debug-layer cases, 1 heap-window case and 1 driver-cache case.

Regression run

Built each clean revision with cargo build --release -p xcl and ran .\scripts\smoke.ps1 -Game <folder> -Title RetailTitle -Seconds 60. In the first pair, main showed 1,621 frames at 11,952 MB peak commit and the PR showed 1,572 at 19,558 MB, above the 125% memory threshold. Both exited normally with zero crashes and device removals. Repeating in reverse order gave the following results.

Main (ran second)

xcl-smoke v1
commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb
gpu: NVIDIA GeForce RTX 4070
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 1566 (PresentX 1566)
presents per 2 s (last 3): 47 56 40
device removals: 0
crashes: 0
peak commit: 20977 MB

PR (ran first)

xcl-smoke v1
commit: 5db200e5094e81f889fdac75be71c343ee31b54a
gpu: NVIDIA GeForce RTX 4070
title: RetailTitle
seconds: 60
exit: 0x0
frames shown: 1579 (PresentX 1579)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 11435 MB

Not tested

  • AMD, native wave64 and the optional XCL_SAMPLE_* inputs listed by the test script. The CLI test exercises help output. The cause of the peak-memory variation was not established.

AI use

  • OpenAI Codex (GPT-6, exact variant unknown) wrote the help text, test and PR description and ran the checks.
<!-- greyfinch-sync:ivall/xcl:issue:6602262010 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2223). Originally posted by [Creaa](https://github.com/Creaa) on 2026-11-25T10:21:10Z. --- List the offline shader precompile options in `xcl --help` so users can find the workflow documented in the README. Fixes #2216. **What is in it** - The shader help describes `--precompile`, `--only STAGE`, `--pipelines` and `--used-only`. - A CLI test checks all four options in the top-level help output. **Tested** - Windows 11 build 26300, i7-13700F, RTX 4070 (driver 617.14), rustc 1.100.0. Debug workspace tests and release smoke builds. - `cargo test -p xcl --test shaders_e2e help_lists_shader_precompile_options -- --exact` failed on the original help at `568e7db7` and passed with the fix. - `.\scripts\test.ps1 --show-output` at `5db200e5` ran `cargo build --workspace` and `cargo test --workspace -- --test-threads=4 --show-output`. Cargo reported 1155 passed, 0 failed, 46 ignored. The suite logged 27 GPU skips within the passing tests: 20 wave64 cases, 3 unsupported wave32 per-lane cases, 2 missing debug-layer cases, 1 heap-window case and 1 driver-cache case. **Regression run** Built each clean revision with `cargo build --release -p xcl` and ran `.\scripts\smoke.ps1 -Game <folder> -Title RetailTitle -Seconds 60`. In the first pair, main showed 1,621 frames at 11,952 MB peak commit and the PR showed 1,572 at 19,558 MB, above the 125% memory threshold. Both exited normally with zero crashes and device removals. Repeating in reverse order gave the following results. Main (ran second) ``` xcl-smoke v1 commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb gpu: NVIDIA GeForce RTX 4070 title: RetailTitle seconds: 60 exit: 0x0 frames shown: 1566 (PresentX 1566) presents per 2 s (last 3): 47 56 40 device removals: 0 crashes: 0 peak commit: 20977 MB ``` PR (ran first) ``` xcl-smoke v1 commit: 5db200e5094e81f889fdac75be71c343ee31b54a gpu: NVIDIA GeForce RTX 4070 title: RetailTitle seconds: 60 exit: 0x0 frames shown: 1579 (PresentX 1579) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 11435 MB ``` **Not tested** - AMD, native wave64 and the optional `XCL_SAMPLE_*` inputs listed by the test script. The CLI test exercises help output. The cause of the peak-memory variation was not established. **AI use** - OpenAI Codex (GPT-6, exact variant unknown) wrote the help text, test and PR description and ran the checks.
raylitebull commented 2026-11-25 11:09:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T11:00:43Z.


Code review on 5db200e:

  • Help text accurately documents --precompile, --only STAGE, --pipelines, and --used-only, and help_lists_shader_precompile_options asserts all four flags in xcl --help; CI (Build and test + PR description) is green and CLEAN.

Remaining before merge: Independent AMD test/CLI verification on 5db200e.

<!-- greyfinch-sync:ivall/xcl:comment:7160467798 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2223#issuecomment-7160467798). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T11:00:43Z. --- Code review on `5db200e`: - Help text accurately documents `--precompile`, `--only STAGE`, `--pipelines`, and `--used-only`, and `help_lists_shader_precompile_options` asserts all four flags in `xcl --help`; CI (`Build and test` + `PR description`) is green and `CLEAN`. **Remaining before merge:** Independent **AMD** test/CLI verification on `5db200e`.
itsonewi commented 2026-11-25 11:09:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by itsonewi on 2026-11-25T11:01:32Z.


Is the AMD run needed for this diff? The new test only spawns xcl --help and reads stdout; it never opens a device, compiles a shader or touches D3D12. The help string is platform-independent, and Build and test (Windows, no GPU) already compiles the binary and runs that exact test on 5db200e. An AMD machine would exercise the same string comparison.

If the AMD check is a blanket rule for every PR, that is fine - I just wanted to note that this diff has no GPU-specific path to verify.

<!-- greyfinch-sync:ivall/xcl:comment:7160485952 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2223#issuecomment-7160485952). Originally posted by [itsonewi](https://github.com/itsonewi) on 2026-11-25T11:01:32Z. --- Is the AMD run needed for this diff? The new test only spawns `xcl --help` and reads stdout; it never opens a device, compiles a shader or touches D3D12. The help string is platform-independent, and `Build and test (Windows, no GPU)` already compiles the binary and runs that exact test on `5db200e`. An AMD machine would exercise the same string comparison. If the AMD check is a blanket rule for every PR, that is fine - I just wanted to note that this diff has no GPU-specific path to verify.
raylitebull commented 2026-11-25 11:09:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T11:04:52Z.


@itsonewi Confirmed that the test itself only checks \xcl --help\ stdout with no GPU path; the gate here requires independent second-host / cross-vendor verification on the head commit before merging, so a quick pass on another machine (Windows/AMD) is still needed.

<!-- greyfinch-sync:ivall/xcl:comment:7160560082 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2223#issuecomment-7160560082). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T11:04:52Z. --- @itsonewi Confirmed that the test itself only checks \xcl --help\ stdout with no GPU path; the gate here requires independent second-host / cross-vendor verification on the head commit before merging, so a quick pass on another machine (Windows/AMD) is still needed.
itsSio commented 2026-11-25 12:06:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by itsSio on 2026-11-25T11:13:29Z.


Tested

Independent Windows/AMD check requested above, on clean 5db200e5094e81f889fdac75be71c343ee31b54a. Windows 11 Pro 26200 and x64 MSVC on both PCs, unoptimized dev/test with debug info off. cargo build --workspace --locked succeeded on both. The exact CLI test (cargo test -p xcl --test shaders_e2e --locked help_lists_shader_precompile_options -- --exact --nocapture) was 1 passed / 0 failed / 0 ignored / 0 skipped on each. On the Radeon machine, both binaries exited 0 for xcl --help: --precompile, --only, --pipelines and --used-only were absent on parent 568e7db7729c8fa6c8f0f4b32d798faaf11462bb and present on the head. The help test itself does not exercise GPU code.

cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --nocapture:

GPU / driver CPU, RAM, toolchain Passed / failed / ignored Runtime SKIPPED
Radeon RDNA2 iGPU / 32.0.21043.5001 Ryzen 7 9800X3D, 32 GiB; Rust 1.97.0, DXC/DXIL 1.9.2609.5 1154 / 1 / 46 8
RTX 2080 SUPER / 32.0.16.1088 Ryzen 5 5600X, 16 GiB; Rust 1.99.1, DXC/DXIL 1.8.2502.11 1155 / 0 / 46 27

Both logged unavailable driver-cache control and heap windows. Radeon also logged six wave32/wave64 per-lane f16/f32 refusals; the RTX 2080 SUPER logged 20 native-wave64 skips, three wave32 per-lane refusals and two missing D3D12 debug-layer skips.

The only Radeon workspace failure was gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 (#2115). I ran that test alone (cargo test -p xcl --lib --locked gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 -- --exact --test-threads=1 --nocapture) on the exact parent, on the same Radeon and DXC. It failed there with the same mismatch: seed 540: res[833] = 0x7, CPU 0x6 (0 passed / 1 failed / 0 ignored / 0 skipped). It predates the CLI change; the original Radeon workspace run is still recorded as failing.

Not tested

Retail smoke, optional game samples, Intel, or performance. The parent comparison was the CLI output and targeted Radeon fuzz test, not a full parent workspace run.

AI use

Ran via Samaritan:

  • OpenCode with OpenAI GPT-6.2 Sol (openai/gpt-6.2-sol): ran the two-PC tests and the targeted parent check, verified the logs and wrote this report. No subagents contributed to this check.
<!-- greyfinch-sync:ivall/xcl:comment:7160760846 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2223#issuecomment-7160760846). Originally posted by [itsSio](https://github.com/itsSio) on 2026-11-25T11:13:29Z. --- **Tested** Independent Windows/AMD check requested above, on clean `5db200e5094e81f889fdac75be71c343ee31b54a`. Windows 11 Pro 26200 and x64 MSVC on both PCs, unoptimized dev/test with debug info off. `cargo build --workspace --locked` succeeded on both. The exact CLI test (`cargo test -p xcl --test shaders_e2e --locked help_lists_shader_precompile_options -- --exact --nocapture`) was **1 passed / 0 failed / 0 ignored / 0 skipped** on each. On the Radeon machine, both binaries exited 0 for `xcl --help`: `--precompile`, `--only`, `--pipelines` and `--used-only` were absent on parent `568e7db7729c8fa6c8f0f4b32d798faaf11462bb` and present on the head. The help test itself does not exercise GPU code. `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --nocapture`: | GPU / driver | CPU, RAM, toolchain | Passed / failed / ignored | Runtime SKIPPED | | --- | --- | ---: | ---: | | Radeon RDNA2 iGPU / `32.0.21043.5001` | Ryzen 7 9800X3D, 32 GiB; Rust 1.97.0, DXC/DXIL 1.9.2609.5 | **1154 / 1 / 46** | 8 | | RTX 2080 SUPER / `32.0.16.1088` | Ryzen 5 5600X, 16 GiB; Rust 1.99.1, DXC/DXIL 1.8.2502.11 | **1155 / 0 / 46** | 27 | Both logged unavailable driver-cache control and heap windows. Radeon also logged six wave32/wave64 per-lane f16/f32 refusals; the RTX 2080 SUPER logged 20 native-wave64 skips, three wave32 per-lane refusals and two missing D3D12 debug-layer skips. The only Radeon workspace failure was `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` (#2115). I ran that test alone (`cargo test -p xcl --lib --locked gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 -- --exact --test-threads=1 --nocapture`) on the exact parent, on the same Radeon and DXC. It failed there with the same mismatch: `seed 540: res[833] = 0x7, CPU 0x6` (0 passed / 1 failed / 0 ignored / 0 skipped). It predates the CLI change; the original Radeon workspace run is still recorded as failing. **Not tested** Retail smoke, optional game samples, Intel, or performance. The parent comparison was the CLI output and targeted Radeon fuzz test, not a full parent workspace run. **AI use** Ran via Samaritan: - OpenCode with OpenAI GPT-6.2 Sol (`openai/gpt-6.2-sol`): ran the two-PC tests and the targeted parent check, verified the logs and wrote this report. No subagents contributed to this check.
thiagocalile commented 2026-11-25 17:07:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thiagocalile on 2026-11-25T16:45:16Z.


Independent test report for head 5db200e5094e81f889fdac75be71c343ee31b54a on an AMD Radeon RX 6600 (8 GB VRAM, RDNA2, native wave64).

Tested

  • Hardware: AMD Radeon RX 6600 (8146 MiB VRAM, RDNA2, native wave64 + mesh shaders, driver 32.0.21045.29003, XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.8.2502.11.
  • XCL_ADAPTER=radeon cargo test --no-fail-fast -p xcl --test shaders_e2e -- --test-threads=4: 5 passed, 0 failed, 0 ignored (0 skipped).

Not tested: full workspace test suite on this head, NVIDIA/Intel GPUs, or Linux/Wine (CLI help / test-only PR, no smoke run needed).

AI use: Antigravity (Gemini 4 Neon) ran the builds, tests, and smoke runs and drafted this report; the account owner reviewed and approved posting.

<!-- greyfinch-sync:ivall/xcl:comment:7168479680 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2223#issuecomment-7168479680). Originally posted by [thiagocalile](https://github.com/thiagocalile) on 2026-11-25T16:45:16Z. --- Independent test report for head `5db200e5094e81f889fdac75be71c343ee31b54a` on an **AMD Radeon RX 6600** (8 GB VRAM, RDNA2, native wave64). **Tested** - Hardware: AMD Radeon RX 6600 (8146 MiB VRAM, RDNA2, native wave64 + mesh shaders, driver `32.0.21045.29003`, `XCL_ADAPTER=radeon`), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (`10.0.26200.0`), Rust `1.100.0` (`stable-x86_64-pc-windows-msvc`), DXC `1.8.2502.11`. - `XCL_ADAPTER=radeon cargo test --no-fail-fast -p xcl --test shaders_e2e -- --test-threads=4`: **5 passed, 0 failed, 0 ignored** (`0` skipped). **Not tested:** full workspace test suite on this head, NVIDIA/Intel GPUs, or Linux/Wine (CLI help / test-only PR, no smoke run needed). **AI use:** Antigravity (Gemini 4 Neon) ran the builds, tests, and smoke runs and drafted this report; the account owner reviewed and approved posting.
upipibi commented 2026-11-25 18:04:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-25T18:00:20Z.


NVIDIA test report for 5db200e (head as is, base 568e7db), as asked in #1607's NVIDIA list. RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11, debug, after cargo build --workspace:

  • cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2: 1146 passed, 0 failed, 46 ignored. The end-to-end title tests pass.
  • main 0829441 on the same machine, same command: 1263 passed, 0 failed, 46 ignored (the PR's base is older, so it has fewer tests).
  • Skipped hle::xaudio2, because its tests fail or hang on this machine on main too. The PR doesn't touch it.
  • SKIPPED lines: 25: 20 no wave64 on this card, 3 f16/f32 forms the per-lane path refuses, 1 no heap windows, and 1 PSO measurement that needs Developer Mode to turn the driver cache off.

AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run.

<!-- greyfinch-sync:ivall/xcl:comment:7170304087 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2223#issuecomment-7170304087). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-25T18:00:20Z. --- NVIDIA test report for `5db200e` (head as is, base `568e7db`), as asked in #1607's NVIDIA list. RTX 3070 8 GB (Ampere, 32-lane waves), driver 616.56, Windows 11, debug, after `cargo build --workspace`: - `cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2`: **1146 passed, 0 failed, 46 ignored**. The end-to-end title tests pass. - `main` `0829441` on the same machine, same command: 1263 passed, 0 failed, 46 ignored (the PR's base is older, so it has fewer tests). - Skipped `hle::xaudio2`, because its tests fail or hang on this machine on `main` too. The PR doesn't touch it. - SKIPPED lines: 25: 20 `no wave64` on this card, 3 f16/f32 forms the per-lane path refuses, 1 no heap windows, and 1 PSO measurement that needs Developer Mode to turn the driver cache off. AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run.
upstream-sync closed this pull request 2026-11-25 19:07:53 +00:00
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!2213
No description provided.