README: document xcl shaders --json #2372

Open
romeawayfromhome-rgb wants to merge 2 commits from upstream-pr/2382 into main
romeawayfromhome-rgb commented 2026-11-25 17:33:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by romeawayfromhome-rgb on 2026-11-25T17:33:56Z.


The xcl shaders command accepts --json, which prints the shader corpus statistics as JSON, but the README command block does not mention it. This documents the flag on the existing --top example line so the README matches crates/xcl/src/shaders.rs and the built-in HELP in crates/xcl/src/main.rs.

What is in it

  • README.md: add [--json] to the xcl shaders D:\data\shaders.rpf --top 50 line and note in its trailing comment that --json prints the statistics as JSON.

Tested
No build or test suite was run locally, because this environment is Linux with no Rust toolchain and XCL needs Windows and a GPU. Verification was by reading crates/xcl/src/shaders.rs (the --json argument check and the print routine, which prints the statistics as JSON), the built-in HELP in crates/xcl/src/main.rs, and README.md at base commit 68a284a596.

Regression run
Not applicable: README-only, with no runtime change, so no smoke run was done.

Not tested
The Windows build, the GPU test suite, and any title run were not run; CI must validate.

AI use
Prepared with Muse Spark AI assistance.

<!-- greyfinch-sync:ivall/xcl:issue:5496106956 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2382). Originally posted by [romeawayfromhome-rgb](https://github.com/romeawayfromhome-rgb) on 2026-11-25T17:33:56Z. --- The `xcl shaders` command accepts `--json`, which prints the shader corpus statistics as JSON, but the README command block does not mention it. This documents the flag on the existing `--top` example line so the README matches `crates/xcl/src/shaders.rs` and the built-in HELP in `crates/xcl/src/main.rs`. **What is in it** - `README.md`: add `[--json]` to the `xcl shaders D:\data\shaders.rpf --top 50` line and note in its trailing comment that `--json` prints the statistics as JSON. **Tested** No build or test suite was run locally, because this environment is Linux with no Rust toolchain and XCL needs Windows and a GPU. Verification was by reading `crates/xcl/src/shaders.rs` (the `--json` argument check and the print routine, which prints the statistics as JSON), the built-in HELP in `crates/xcl/src/main.rs`, and `README.md` at base commit 68a284a596bd558b6bd9db6eedda6d6aa178c360. **Regression run** Not applicable: README-only, with no runtime change, so no smoke run was done. **Not tested** The Windows build, the GPU test suite, and any title run were not run; CI must validate. **AI use** Prepared with Muse Spark AI assistance.
DavidM1911 commented 2026-11-25 20:08:30 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T19:12:04Z.


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

  • cargo test -p xcl --lib: 1 real failure, deterministic (also fails --test-threads=1, 1219/1):
gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier
  assertion failed: group barriers in the program (lower_dxil.rs:1155)

The lowered program is missing an expected group barrier (or emits one where none is expected). Needs a fix before merge.

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7171958058 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2382#issuecomment-7171958058). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T19:12:04Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: **1 real failure**, deterministic (also fails `--test-threads=1`, 1219/1): ``` gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier assertion failed: group barriers in the program (lower_dxil.rs:1155) ``` The lowered program is missing an expected group barrier (or emits one where none is expected). Needs a fix before merge. — Devin
romeawayfromhome-rgb commented 2026-11-25 22:06:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by romeawayfromhome-rgb on 2026-11-25T21:45:32Z.


Fresh RTX 2080 evidence: I re-ran the XCL suite on current main (6d12f58) and the main lib suite passed 1298/0 (26 ignored), so the reported a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier failure did not reproduce there. The only failure was the separate e2e present/report assertion (presents: 0). This suggests the lib failure may be branch/head-specific or already fixed upstream; a rebase/recheck may clear it.

— Clifford (AI), conducted by LegendaryGodKing

<!-- greyfinch-sync:ivall/xcl:comment:7175501366 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2382#issuecomment-7175501366). Originally posted by [romeawayfromhome-rgb](https://github.com/romeawayfromhome-rgb) on 2026-11-25T21:45:32Z. --- Fresh RTX 2080 evidence: I re-ran the XCL suite on current main (6d12f58) and the main lib suite passed 1298/0 (26 ignored), so the reported a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier failure did not reproduce there. The only failure was the separate e2e present/report assertion (presents: 0). This suggests the lib failure may be branch/head-specific or already fixed upstream; a rebase/recheck may clear it. — Clifford (AI), conducted by LegendaryGodKing
luckyteagirl commented 2026-11-26 08:48:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T08:48:31Z.

Review: COMMENTED


At exact head d9fe609 (base 68a284a, current main b49be18), the new example xcl shaders … --top 50 [--json] suggests --json emits the same top-50 statistics. In shaders.rs, the JSON branch builds mnemonics from all of ranked.iter() and returns before the text branch's .take(top); --top 50 --json therefore still emits every mnemonic. This is a source-only check; I did not run a pack.

Could the README show separate text and JSON examples, or say explicitly that --top limits only text output? That preserves the useful full JSON behavior while making the example accurate.

AI assistance: GPT-6.2 Sol found the mismatch; GPT-6.2 Astra verified the exact-head README and implementation.

<!-- greyfinch-sync:ivall/xcl:review:6070951936 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2382#pullrequestreview-6070951936). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T08:48:31Z. **Review:** COMMENTED --- At exact head `d9fe609` (base `68a284a`, current main `b49be18`), the new example `xcl shaders … --top 50 [--json]` suggests `--json` emits the same top-50 statistics. In `shaders.rs`, the JSON branch builds `mnemonics` from all of `ranked.iter()` and returns before the text branch's `.take(top)`; `--top 50 --json` therefore still emits every mnemonic. This is a source-only check; I did not run a pack. Could the README show separate text and JSON examples, or say explicitly that `--top` limits only text output? That preserves the useful full JSON behavior while making the example accurate. AI assistance: GPT-6.2 Sol found the mismatch; GPT-6.2 Astra verified the exact-head README and implementation.
romeawayfromhome-rgb commented 2026-11-26 12:06:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by romeawayfromhome-rgb on 2026-11-26T11:07:03Z.


Thanks — verified against the source in crates/xcl/src/shaders.rs print(): the JSON branch maps every ranked mnemonic with no .take(top), while .take(top) applies only in the text branch, so --top limits only the text output. Updated in 96671e6: the README now shows separate text and JSON examples, with the JSON line noting it emits every mnemonic. This was a source-only check; the pack was not run, matching your caveat.

<!-- greyfinch-sync:ivall/xcl:comment:7190289396 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2382#issuecomment-7190289396). Originally posted by [romeawayfromhome-rgb](https://github.com/romeawayfromhome-rgb) on 2026-11-26T11:07:03Z. --- Thanks — verified against the source in crates/xcl/src/shaders.rs print(): the JSON branch maps every ranked mnemonic with no .take(top), while .take(top) applies only in the text branch, so --top limits only the text output. Updated in 96671e6: the README now shows separate text and JSON examples, with the JSON line noting it emits every mnemonic. This was a source-only check; the pack was not run, matching your caveat.
github-actions[bot] commented 2026-12-01 02:34:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:34:04Z.


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:7298755081 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2382#issuecomment-7298755081). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-12-01T02:34:04Z. --- 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 07:57:41 +00:00 (Migrated from github.com)

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


Triage (#1607) – head 96671e6

No open or merged PR documents xcl shaders --json; the related README PRs by the same author (#2236, #2450, #2522, #2627, #2657, #2699, #2728, #3088) each document a different flag. The line matches shaders.rs::print, where the JSON lists every ranked mnemonic and --top only limits the text table.
Nit: the # comment column is not aligned with the lines around it. It conflicts with main's README now (the surrounding lines moved).
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:7304696864 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2382#issuecomment-7304696864). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:57:41Z. --- **Triage (#1607)** – head 96671e6 No open or merged PR documents `xcl shaders --json`; the related README PRs by the same author (#2236, #2450, #2522, #2627, #2657, #2699, #2728, #3088) each document a different flag. The line matches `shaders.rs::print`, where the JSON lists every ranked mnemonic and `--top` only limits the text table. Nit: the `#` comment column is not aligned with the lines around it. It conflicts with main's README now (the surrounding lines moved). 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/2382:upstream-pr/2382'
git switch 'upstream-pr/2382'

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