shader: say which descriptor dword changed after loading and how #131

Manually merged
github merged 1 commit from github-bot/gh-131 into main 2026-11-26 19:08:27 +00:00 AGit
Owner

@⁠Olima34 on GitHub · 2026-11-26 18:02 UTC · original
Olima34:fix/shader-descriptor-changed-causes → main · +217 −3 · 3 files · 2 commits · merged 2026-11-26 19:01 UTC

A refusal split, like #118: it names the form instead of lowering it.

Why. "a descriptor changed after loading" is the largest unclaimed shader refusal in the newest tester log (#123, commit 182c14f): 34 unique compute shaders. The message doesn't say what changed, so there is nothing safe to lower yet. The V# layout (RDNA2 ISA §8.1.5) allows several candidate forms (a base-address offset, a changed num_records, a merged control word), and each needs different host support.

What. In resource.rs, the classifier (Tracer::changed) takes the s_load of the first loaded dword as the reference. It finds the first dword that is no longer that load's next one and names what made it, after the same prefix so existing tallies still group them: a descriptor changed after loading: dword N followed by

  • is a constant;
  • comes from another load or place in it;
  • masked or merged (s_and, s_or, s_bfi...);
  • added to (s_add, s_sub...);
  • shifted, multiplied or extracted (s_lshl, s_mul, s_bfe...);
  • chosen by a select or a join;
  • is a program input;
  • computed otherwise.

The strings are static (concat! over N = 0..7). There is no panic path: without a reference or a mismatch it falls back to "dword 0 comes from another load". Nothing new is lowered.

Tests.

  • New: a_descriptor_changed_after_loading_says_which_dword_and_how checks s_mov s10, 64 → "dword 2 is a constant", and s_add/s_addc on s[8:9] → "dword 0 added to". It fails on main.
  • Updated: the two resource.rs tests that asserted the old text. The old exact text appears nowhere else in crates/, Windows-only tests included.

victory-shader and victory-gpu tests (arm64), Windows clippy and cargo xtask policy pass. Once a tester log on this commit names the dominant form, I'll lower that one.

Update: added a victory-gpu host-path test, pipeline::changed_descriptor_tests::the_host_refuses_a_descriptor_changed_after_loading_naming_the_dword. It builds the container from the title's compute pieces (compute_container), translates it with the host's own options (native::shaders::translate), and checks the refusal text. On main it fails with the old generic message. Rebased on current main.

**@⁠Olima34** on GitHub · 2026-11-26 18:02 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/131) `Olima34:fix/shader-descriptor-changed-causes` → `main` · +217 −3 · 3 files · 2 commits · merged 2026-11-26 19:01 UTC A refusal split, like #118: it names the form instead of lowering it. **Why.** "a descriptor changed after loading" is the largest unclaimed shader refusal in the newest tester log (#123, commit 182c14f): 34 unique compute shaders. The message doesn't say what changed, so there is nothing safe to lower yet. The V# layout (RDNA2 ISA §8.1.5) allows several candidate forms (a base-address offset, a changed num_records, a merged control word), and each needs different host support. **What.** In `resource.rs`, the classifier (`Tracer::changed`) takes the `s_load` of the first loaded dword as the reference. It finds the first dword that is no longer that load's next one and names what made it, after the same prefix so existing tallies still group them: `a descriptor changed after loading: dword N` followed by - `is a constant`; - `comes from another load or place in it`; - `masked or merged (s_and, s_or, s_bfi...)`; - `added to (s_add, s_sub...)`; - `shifted, multiplied or extracted (s_lshl, s_mul, s_bfe...)`; - `chosen by a select or a join`; - `is a program input`; - `computed otherwise`. The strings are static (`concat!` over N = 0..7). There is no panic path: without a reference or a mismatch it falls back to "dword 0 comes from another load". Nothing new is lowered. **Tests.** - New: `a_descriptor_changed_after_loading_says_which_dword_and_how` checks `s_mov s10, 64` → "dword 2 is a constant", and `s_add`/`s_addc` on `s[8:9]` → "dword 0 added to". It fails on main. - Updated: the two `resource.rs` tests that asserted the old text. The old exact text appears nowhere else in `crates/`, Windows-only tests included. victory-shader and victory-gpu tests (arm64), Windows clippy and `cargo xtask policy` pass. Once a tester log on this commit names the dominant form, I'll lower that one. **Update:** added a victory-gpu host-path test, `pipeline::changed_descriptor_tests::the_host_refuses_a_descriptor_changed_after_loading_naming_the_dword`. It builds the container from the title's compute pieces (`compute_container`), translates it with the host's own options (`native::shaders::translate`), and checks the refusal text. On main it fails with the old generic message. Rebased on current main.
"a descriptor changed after loading" did not say what changed. It now names the first dword that is no longer the load's next one and what made it: a constant, another load or place in it, a mask or merge, an addition, a shift, multiply or extract, a select or join, a program input, or anything else. Nothing new is lowered: the next tester log tells which forms the 34 compute programs of issue #123 use.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 18:04:15 +00:00
github-bot force-pushed github-bot/gh-131 from cf15592ef0 to 159e063622 2026-11-26 18:25:37 +00:00 Compare
Author
Owner

@⁠LakshanSivakumar on GitHub · 2026-11-26 18:56 UTC · original · approved these changes

Reviewed and tested together with the other open PRs on main (macOS x86_64 tests for shader, hle, loader and gpu, the setup shell tests, and Windows clippy). Thanks!

**@⁠LakshanSivakumar** on GitHub · 2026-11-26 18:56 UTC · [original](https://github.com/LakshanSivakumar/Native-Victory-macOS/pull/131#pullrequestreview-6079229103) · **approved these changes** Reviewed and tested together with the other open PRs on main (macOS x86_64 tests for shader, hle, loader and gpu, the setup shell tests, and Windows clippy). Thanks!
github manually merged commit e92696340b into main 2026-11-26 19:08:27 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.