Shaders: include direct sweep settings and exclusions in JSON #1789

Open
Daydream3r wants to merge 1 commit from upstream-pr/1799 into main
Daydream3r commented 2026-11-24 20:53:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Daydream3r on 2026-11-24T20:53:46Z.


Direct shader sweeps could evaluate fewer programs than requested without explaining size exclusions in JSON, and omitted the seed/options needed to reproduce the selection. Add a run object alongside the existing coverage fields; their names and location remain unchanged.

Rebased onto main 082944135cd2b96288470a595861fa608eee08dc. The conflict was adjacent README additions: both main's dispatch-splitting documentation and this JSON metadata documentation are retained. The implementation and regression test applied without changes.

What is in it

  • crates/xcl/src/shaders.rs: report sampling seed/limits, selected records, oversized-program skips and the recorded translation/validation options, including effective --hash overrides.
  • crates/xcl/tests/shaders_e2e.rs: synthetic CLI regression for size exclusion, unlimited sampling and exact-hash overrides, requiring no GPU/DXC/game data.
  • README.md: document the metadata fields and serial sampling for repeatable selection.

Tested

  • RTX 5070 Ti 16 GB, NVIDIA 621.01; Ryzen 7 9800X3D, 64 GB RAM; Windows 11 Pro 25H2 26200.6584; Rust 1.100.0 MSVC, DXC/DXIL 1.9.2609.5. Release builds/CLI/smoke, debug tests.
  • cargo build --release --workspace --locked: passed on clean main and clean head 1e7541986cbf31b9cda0367a0b06fc073c05718e.
  • cargo test --workspace --locked --no-fail-fast -- --test-threads=4: head 1269 passed, 4 failed, 46 ignored; clean main 1268 passed, 4 failed, 46 ignored, both exit 101. The metadata regression executed and passed. Optional XCL_SAMPLE_* inputs unset.
  • The four failures on both revisions are gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_{0,1,2,3}, CreateComputePipelineState 0x8007000E; they remain unresolved.
  • Identical 27 explicit SKIPPED lines: 21 no native wave64, 3 refused per-lane cases (V_MUL_F16, V_PK_MUL_F16, V_CVT_F16_F32), 2 missing D3D12 debug-layer checks, 1 no heap windows. Passing-return skips are not coverage.
  • Release CLI on a local shader pack: xcl shaders <pack> --direct --sample 32 --seed 20261124 --validate --compare --max-bytes 16384 --timeout 10 --threads 1 --json: exit 0. run reports seed 20261124, 32 selected records and 1 size exclusion; coverage reports 31 evaluated/translated, 0 unsupported, 0 validator failures/panics/timeouts. Effective metadata assertions also passed. This does not claim GPU execution/output parity.
  • git diff --check: passed.

Regression run
Official scripts/smoke.ps1, same retail package 1.0.2.1, 60 s, no input, networking off, isolated copies of the same saved data/cache seed. Head run performed after pushing the rebased commit. Startup/menu coverage only; these runs do not exercise the JSON command or confirm world rendering.

main:

xcl-smoke v1
commit: 082944135cd2b96288470a595861fa608eee08dc
gpu: NVIDIA GeForce RTX 5070 Ti
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1638 (PresentX 1638)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16370 MB

head:

xcl-smoke v1
commit: 1e7541986cbf31b9cda0367a0b06fc073c05718e
gpu: NVIDIA GeForce RTX 5070 Ti
title: retail-title
seconds: 60
exit: 0x0
frames shown: 1604 (PresentX 1604)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15793 MB

Not tested
AMD/Intel/native wave64, Linux/Wine, game-data sample coverage in the full suite, rendered gameplay or GPU output parity. This CLI metadata change does not claim to fix loading or the four baseline GPU-fuzz failures.

AI use
Codex desktop, GPT-6 (exact variant not exposed): original implementation/regression/docs, conflict resolution, actual local builds/tests/CLI/smoke runs and this description. No game data or derived shader binaries in the diff.

<!-- greyfinch-sync:ivall/xcl:issue:5480149808 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1799). Originally posted by [Daydream3r](https://github.com/Daydream3r) on 2026-11-24T20:53:46Z. --- Direct shader sweeps could evaluate fewer programs than requested without explaining size exclusions in JSON, and omitted the seed/options needed to reproduce the selection. Add a `run` object alongside the existing coverage fields; their names and location remain unchanged. Rebased onto `main 082944135cd2b96288470a595861fa608eee08dc`. The conflict was adjacent README additions: both main's dispatch-splitting documentation and this JSON metadata documentation are retained. The implementation and regression test applied without changes. **What is in it** - `crates/xcl/src/shaders.rs`: report sampling seed/limits, selected records, oversized-program skips and the recorded translation/validation options, including effective `--hash` overrides. - `crates/xcl/tests/shaders_e2e.rs`: synthetic CLI regression for size exclusion, unlimited sampling and exact-hash overrides, requiring no GPU/DXC/game data. - `README.md`: document the metadata fields and serial sampling for repeatable selection. **Tested** - RTX 5070 Ti 16 GB, NVIDIA 621.01; Ryzen 7 9800X3D, 64 GB RAM; Windows 11 Pro 25H2 26200.6584; Rust 1.100.0 MSVC, DXC/DXIL 1.9.2609.5. Release builds/CLI/smoke, debug tests. - `cargo build --release --workspace --locked`: passed on clean main and clean head `1e7541986cbf31b9cda0367a0b06fc073c05718e`. - `cargo test --workspace --locked --no-fail-fast -- --test-threads=4`: head **1269 passed, 4 failed, 46 ignored**; clean main **1268 passed, 4 failed, 46 ignored**, both exit 101. The metadata regression executed and passed. Optional `XCL_SAMPLE_*` inputs unset. - The four failures on both revisions are `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_{0,1,2,3}`, `CreateComputePipelineState 0x8007000E`; they remain unresolved. - Identical 27 explicit SKIPPED lines: 21 no native wave64, 3 refused per-lane cases (V_MUL_F16, V_PK_MUL_F16, V_CVT_F16_F32), 2 missing D3D12 debug-layer checks, 1 no heap windows. Passing-return skips are not coverage. - Release CLI on a local shader pack: `xcl shaders <pack> --direct --sample 32 --seed 20261124 --validate --compare --max-bytes 16384 --timeout 10 --threads 1 --json`: exit 0. `run` reports seed 20261124, 32 selected records and 1 size exclusion; coverage reports 31 evaluated/translated, 0 unsupported, 0 validator failures/panics/timeouts. Effective metadata assertions also passed. This does not claim GPU execution/output parity. - `git diff --check`: passed. **Regression run** Official `scripts/smoke.ps1`, same retail package 1.0.2.1, 60 s, no input, networking off, isolated copies of the same saved data/cache seed. Head run performed after pushing the rebased commit. Startup/menu coverage only; these runs do not exercise the JSON command or confirm world rendering. main: ``` xcl-smoke v1 commit: 082944135cd2b96288470a595861fa608eee08dc gpu: NVIDIA GeForce RTX 5070 Ti title: retail-title seconds: 60 exit: 0x0 frames shown: 1638 (PresentX 1638) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16370 MB ``` head: ``` xcl-smoke v1 commit: 1e7541986cbf31b9cda0367a0b06fc073c05718e gpu: NVIDIA GeForce RTX 5070 Ti title: retail-title seconds: 60 exit: 0x0 frames shown: 1604 (PresentX 1604) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15793 MB ``` **Not tested** AMD/Intel/native wave64, Linux/Wine, game-data sample coverage in the full suite, rendered gameplay or GPU output parity. This CLI metadata change does not claim to fix loading or the four baseline GPU-fuzz failures. **AI use** Codex desktop, GPT-6 (exact variant not exposed): original implementation/regression/docs, conflict resolution, actual local builds/tests/CLI/smoke runs and this description. No game data or derived shader binaries in the diff.
DavidM1911 commented 2026-11-25 00:09:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T00:05:00Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7148118971 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1799#issuecomment-7148118971). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T00:05:00Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~23 ignored. Thanks!
DavidM1911 commented 2026-11-26 07:03:32 +00:00 (Migrated from github.com)

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


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:7184323187 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1799#issuecomment-7184323187). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T06:19:46Z. --- 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.
luckyteagirl commented 2026-11-26 10:52:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T10:52:53Z.

Review: COMMENTED


On 1e7541986cbf31b9cda0367a0b06fc073c05718e, could the JSON run.selected_records field count records that pass --hash, or be named/documented as the pre-filter candidate count? The hash branch replaces order with all input indices, and the new field uses order.len(); the actual hash comparison happens later in the worker. Thus a pack with 26,503 records and one matching hash reports 26,503 selected records, and an unmatched hash in a one-record pack reports 1 selected record despite no match. This makes the machine-readable run metadata misleading for the targeted hash workflow. I verified the control flow from exact-head source; I did not run a pack.

AI use: OpenAI Codex (GPT-6.2 Sol) found and checked the path; OpenAI Codex (GPT-6.2 Astra) independently checked the source and wrote this review.

<!-- greyfinch-sync:ivall/xcl:review:6072837075 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1799#pullrequestreview-6072837075). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T10:52:53Z. **Review:** COMMENTED --- On `1e7541986cbf31b9cda0367a0b06fc073c05718e`, could the JSON `run.selected_records` field count records that pass `--hash`, or be named/documented as the pre-filter candidate count? The hash branch replaces `order` with all input indices, and the new field uses `order.len()`; the actual hash comparison happens later in the worker. Thus a pack with 26,503 records and one matching hash reports 26,503 selected records, and an unmatched hash in a one-record pack reports 1 selected record despite no match. This makes the machine-readable run metadata misleading for the targeted hash workflow. I verified the control flow from exact-head source; I did not run a pack. AI use: OpenAI Codex (GPT-6.2 Sol) found and checked the path; OpenAI Codex (GPT-6.2 Astra) independently checked the source and wrote this review.
github-actions[bot] commented 2026-12-01 02:34:00 +00:00 (Migrated from github.com)

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


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

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


Triage (#1607) – head 1e75419

No open or merged PR makes the same change. Main's direct_sweep still prints rep.json(top) alone. The run object reads the values after the --hash override (sample 0, max_bytes 0), as the README line says. Splicing {"run":..., onto &report[1..] is safe because Report::json always starts with {"stages":. No problems found in the diff. It conflicts with main and needs a rebase.
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:7303326790 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1799#issuecomment-7303326790). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:49:43Z. --- **Triage (#1607)** – head 1e75419 No open or merged PR makes the same change. Main's `direct_sweep` still prints `rep.json(top)` alone. The `run` object reads the values after the `--hash` override (sample 0, max_bytes 0), as the README line says. Splicing `{"run":...,` onto `&report[1..]` is safe because `Report::json` always starts with `{"stages":`. No problems found in the diff. It conflicts with main and needs a rebase. 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/1799:upstream-pr/1799'
git switch 'upstream-pr/1799'

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