startup: refuse compute buffer loads through a modified descriptor (#2901) #2910

Merged
Holastor merged 1 commit from upstream-pr/2910 into main 2026-11-27 10:08:59 +00:00
Holastor commented 2026-11-26 19:08:27 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Holastor on 2026-11-26T19:08:27Z.


Change

Fixes #2901
Refs #2618

When translating compute buffer loads (such as buffer_load_dword ... offen or non-indexed loads), Stage.buffer_address() resolved the resource key solely via self.descriptor(), which looks only at word 0. If earlier scalar instructions edited or overwritten words 1–3 (stride, NUM_RECORDS, or format/OOB) without a proven transformation, the load translated anyway instead of refusing, emitting invalid DXIL / HLSL Load() operations on unvalidated or zero-sized resources.

  • Add Stage.load_descriptor(tok, what, *, stride0_ok=False, raw_conversion_ok=False) to validate 4-word descriptor operands against symbol table entries and modification tracking before emitting buffer loads.
  • Call self.descriptor(tok) first in load_descriptor(), preserving the precedence of existing select-word and branch-join rejections (holds a select of descriptor data and holds a word joined at a branch target) so integration controls and mutation tests (load-check-removed, join-check-removed) distinguish them from generic descriptor modifications.
  • Like store_descriptor(), allow proven stride-0 and structured-to-raw transformations for non-indexed loads (stride0_ok=not idxen, raw_conversion_ok=not idxen), while refusing modified descriptors with buffer load through a modified descriptor (or indexed load through a modified descriptor when idxen is set).
  • Document the conditions under which stride-0 and structured-to-raw conversions are proven safe paths in Stage.load_descriptor().
  • Preserve the existing indexed modified-descriptor guard in buffer_address() across both idxen and offen and idxen paths (if key in getattr(self.pipe, 'modified', ()): raise Unsupported('indexed load through a modified descriptor')), ensuring formatted buffer loads (is_formatted=True) continue to refuse when any modification of that descriptor is tracked, even if the load operands themselves remain intact.
  • Add test cases in both tests/startup_gfx2hlsl_compute_check.py and tests/startup_gfx2hlsl_load_desc_check.py verifying that an instruction deriving a descriptor word to a separate SGPR (s_and_b32 s21, s13, 0xc000ffff) immediately before LOAD_L in L-uint is refused with indexed load through a modified descriptor.
  • Register new test fixture in CTest and CI check lists.

Verification

Commit 7b44bda6, rebased on upstream/main at 0e704468. Windows 11, Python 3.14.

python -B tests/startup_gfx2hlsl_load_desc_check.py
python -B tests/startup_gfx2hlsl_cselect_descnum_check.py controls
python -B tests/startup_gfx2hlsl_compute_check.py
python -B tests/compute_load_format_check.py
python -B tests/docs_links_check.py
python -B tests/bidi_controls_check.py
python -B tests/run_checks_parallel_check.py
  • Controls: All verification commands pass (0 failures).
    • Base case A translates cleanly with Load and Store.
    • All 6 edits from #2901 (descnum copy w1, descnum copy w2, descnum copy w3, descnum alu w2, in-place and 0 w2, constant 0 w2) are tested for both loads and stores:
      • Loads refuse with buffer load through a modified descriptor.
      • Stores refuse with buffer store through a modified descriptor.
    • Proven stride-0 clear on raw load (s_and_b32 s13, s13, 0xc000ffff) translates cleanly.
    • Unproven stride mask (0xc000fff0) on load is refused.
    • Proven structured-to-raw conversion on load descriptor (raw_conversion_ok=True with s_bfe_u32 stride extraction, s_and_b32 stride clear, s_mul_i32 record count scale, and oob3 setup) translates cleanly.
    • Invalid/incomplete raw conversion (e.g. constant multiplier instead of extracted stride) is refused with buffer load through a modified descriptor.
    • Formatted indexed load through a modified descriptor: inserting s_and_b32 s21, s13, 0xc000ffff immediately before LOAD_L in L-uint refuses with indexed load through a modified descriptor.
    • Rebased integration: startup_gfx2hlsl_cselect_descnum_check.py controls passes all tests and all 5 negative control mutants (zero-arm-dropped, load-check-removed, alu-check-removed, join-check-removed, high-word-unchecked) with 0 failures.
    • Negative control (mutant): Under a pre-fix mutant where Stage.load_descriptor bypasses validation and forwards directly to self.descriptor(tok), all 6 load edits translate silently into v5 = r0.Load(a + 0);, reproducing the issue reported in #2901.

Evidence and follow-up

  • Registration: tests/cmake/startup_gfx2hlsl_load_desc.cmake, tests/checks/python-linux/startup_gfx2hlsl_load_desc.txt.
  • Follow-up: Does not measure console behavior or a title.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5515759250 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2910). Originally posted by [Holastor](https://github.com/Holastor) on 2026-11-26T19:08:27Z. --- ## Change Fixes #2901 Refs #2618 When translating compute buffer loads (such as `buffer_load_dword ... offen` or non-indexed loads), `Stage.buffer_address()` resolved the resource key solely via `self.descriptor()`, which looks only at word 0. If earlier scalar instructions edited or overwritten words 1–3 (`stride`, `NUM_RECORDS`, or `format`/OOB) without a proven transformation, the load translated anyway instead of refusing, emitting invalid DXIL / HLSL `Load()` operations on unvalidated or zero-sized resources. - Add `Stage.load_descriptor(tok, what, *, stride0_ok=False, raw_conversion_ok=False)` to validate 4-word descriptor operands against symbol table entries and modification tracking before emitting buffer loads. - Call `self.descriptor(tok)` first in `load_descriptor()`, preserving the precedence of existing select-word and branch-join rejections (`holds a select of descriptor data` and `holds a word joined at a branch target`) so integration controls and mutation tests (`load-check-removed`, `join-check-removed`) distinguish them from generic descriptor modifications. - Like `store_descriptor()`, allow proven stride-0 and structured-to-raw transformations for non-indexed loads (`stride0_ok=not idxen`, `raw_conversion_ok=not idxen`), while refusing modified descriptors with `buffer load through a modified descriptor` (or `indexed load through a modified descriptor` when `idxen` is set). - Document the conditions under which stride-0 and structured-to-raw conversions are proven safe paths in `Stage.load_descriptor()`. - Preserve the existing indexed modified-descriptor guard in `buffer_address()` across both `idxen and offen` and `idxen` paths (`if key in getattr(self.pipe, 'modified', ()): raise Unsupported('indexed load through a modified descriptor')`), ensuring formatted buffer loads (`is_formatted=True`) continue to refuse when any modification of that descriptor is tracked, even if the load operands themselves remain intact. - Add test cases in both `tests/startup_gfx2hlsl_compute_check.py` and `tests/startup_gfx2hlsl_load_desc_check.py` verifying that an instruction deriving a descriptor word to a separate SGPR (`s_and_b32 s21, s13, 0xc000ffff`) immediately before `LOAD_L` in `L-uint` is refused with `indexed load through a modified descriptor`. - Register new test fixture in CTest and CI check lists. ## Verification Commit 7b44bda6, rebased on upstream/main at 0e704468. Windows 11, Python 3.14. ```powershell python -B tests/startup_gfx2hlsl_load_desc_check.py python -B tests/startup_gfx2hlsl_cselect_descnum_check.py controls python -B tests/startup_gfx2hlsl_compute_check.py python -B tests/compute_load_format_check.py python -B tests/docs_links_check.py python -B tests/bidi_controls_check.py python -B tests/run_checks_parallel_check.py ``` - **Controls:** All verification commands pass (0 failures). - Base case A translates cleanly with `Load` and `Store`. - All 6 edits from #2901 (`descnum copy w1`, `descnum copy w2`, `descnum copy w3`, `descnum alu w2`, `in-place and 0 w2`, `constant 0 w2`) are tested for both loads and stores: - Loads refuse with `buffer load through a modified descriptor`. - Stores refuse with `buffer store through a modified descriptor`. - Proven stride-0 clear on raw load (`s_and_b32 s13, s13, 0xc000ffff`) translates cleanly. - Unproven stride mask (`0xc000fff0`) on load is refused. - Proven structured-to-raw conversion on load descriptor (`raw_conversion_ok=True` with `s_bfe_u32` stride extraction, `s_and_b32` stride clear, `s_mul_i32` record count scale, and `oob3` setup) translates cleanly. - Invalid/incomplete raw conversion (e.g. constant multiplier instead of extracted stride) is refused with `buffer load through a modified descriptor`. - Formatted indexed load through a modified descriptor: inserting `s_and_b32 s21, s13, 0xc000ffff` immediately before `LOAD_L` in `L-uint` refuses with `indexed load through a modified descriptor`. - Rebased integration: `startup_gfx2hlsl_cselect_descnum_check.py controls` passes all tests and all 5 negative control mutants (`zero-arm-dropped`, `load-check-removed`, `alu-check-removed`, `join-check-removed`, `high-word-unchecked`) with 0 failures. - **Negative control (mutant):** Under a pre-fix mutant where `Stage.load_descriptor` bypasses validation and forwards directly to `self.descriptor(tok)`, all 6 load edits translate silently into `v5 = r0.Load(a + 0);`, reproducing the issue reported in #2901. ## Evidence and follow-up - Registration: `tests/cmake/startup_gfx2hlsl_load_desc.cmake`, `tests/checks/python-linux/startup_gfx2hlsl_load_desc.txt`. - Follow-up: Does not measure console behavior or a title. AI-assisted.
KelboLive commented 2026-11-26 20:24:41 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-26T20:24:41Z.

Review: COMMENTED


startup: refuse compute buffer loads through a modified descriptor

Important correctness/security fix. When scalar ops silently modify descriptor words 1–3 (stride, NUM_RECORDS, format/OOB), the buffer load should refuse and not proceed with invalid metadata. The fix correctly distinguishes formatted vs. unformatted buffer loads.

Observations

  • ✅ New is_formatted parameter cleanly separates the two cases: formatted loads use the original descriptor path, unformatted loads go through load_descriptor() with stricter validation
  • ✅ stride0_ok=not idxen, raw_conversion_ok=not idxen correctly handles indexed vs non-indexed loads
  • ✅ The test covers 7 descriptor manipulation scenarios — copy to w1/w2/w3, ALU on w2, in-place AND, constant overwrite
  • ✅ Test construction is careful: registers are mapped correctly, SOP2/SOP1 encoding matches gfx2hlsl conventions
  • ✅ cmake + python-linux CI check files added properly

Verification needed

  • Please verify that WORDS_A is exported from startup_gfx2hlsl_compute_check — the import of C uses WORDS_A directly

Edge cases to check

  • Does the is_formatted flag propagate correctly through op_s_buffer_load_dwordx8 and dwordx16? (These call buffer_address() with is_formatted — worth verifying the call chain.)

Verdict: Correctness fix with thorough test coverage. Ready to merge pending the WORDS_A verification.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6080121010 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2910#pullrequestreview-6080121010). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-26T20:24:41Z. **Review:** COMMENTED --- **startup: refuse compute buffer loads through a modified descriptor** Important correctness/security fix. When scalar ops silently modify descriptor words 1–3 (stride, NUM_RECORDS, format/OOB), the buffer load should refuse and not proceed with invalid metadata. The fix correctly distinguishes formatted vs. unformatted buffer loads. ### Observations - ✅ New `is_formatted` parameter cleanly separates the two cases: formatted loads use the original descriptor path, unformatted loads go through `load_descriptor()` with stricter validation - ✅ `stride0_ok=not idxen, raw_conversion_ok=not idxen` correctly handles indexed vs non-indexed loads - ✅ The test covers 7 descriptor manipulation scenarios — copy to w1/w2/w3, ALU on w2, in-place AND, constant overwrite - ✅ Test construction is careful: registers are mapped correctly, SOP2/SOP1 encoding matches gfx2hlsl conventions - ✅ cmake + python-linux CI check files added properly ### Verification needed - Please verify that `WORDS_A` is exported from `startup_gfx2hlsl_compute_check` — the import of `C` uses `WORDS_A` directly ### Edge cases to check - Does the `is_formatted` flag propagate correctly through `op_s_buffer_load_dwordx8` and `dwordx16`? (These call `buffer_address()` with `is_formatted` — worth verifying the call chain.) **Verdict:** Correctness fix with thorough test coverage. Ready to merge pending the `WORDS_A` verification.
thepatrickworld commented 2026-11-26 20:42:32 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-26T20:42:32Z.


SMEM buffer loads are the one buffer-load path still resolved through descriptor() on c88bbd68

Measurements only, no code change.

At c88bbd68 raw MUBUF loads go through the new load_descriptor(), formatted loads already compare all four words in mubuf_format() (tools/startup/gfx2hlsl.py:6925-6928), and Stage.op_s_buffer_load_dword (:6251) still resolves its resource through self.descriptor(ops[1]), which returns the key from word 0's desc symbol (the s[104:107] operand is the only case that checks the other three). So the six edits your fixture refuses on MUBUF are accepted on the SMEM path.

Probe

Linux, Python 3.11.16, no device. It reuses WORDS_A, EDITS and translate_code from your fixture, removes the two 8-byte instructions the fixture owns (the MUBUF load at LOAD_SITE, the buffer_store_dwordx2 at STORE_A), keeps everything else, and inserts s_buffer_load_dword s24, s[12:15], s11 offset:0x10 (060620f410000016: opcode 0x08, sbase=12, sdst=24, soffset=11, imm=16).

no edit        ->  s24 = r0.Load(0x00000000u + 16);
all six edits  ->  s24 = r0.Load(0x00000000u + 16);     ('constant 0 w2' also emits s14 = 0)

Your own fixture passes unchanged on this head (compute buffer load modified descriptor checks passed, rc=0).

Control

Re-routing that single line to self.load_descriptor(ops[1], 'buffer load') refuses all six edits with buffer load through a modified descriptor, keeps the no-edit case translating, and your fixture still passes (rc=0). That was an experiment, not a patch: the file was restored and git status --porcelain --untracked-files=no is empty.

What this does and does not show

The emitted load is the resource plus an offset; NUM_RECORDS and OOB_SELECT are not modelled on this path, so an edit of DW2/DW3 cannot change the emitted text — if it diverges, it diverges at the descriptor's bound fields, and I did not measure that on a device. The narrower question is whether the "unproven descriptor -> refuse" rule should apply here too. Your body says the change "does not affect existing formatted loads or buffer stores", which reads as non-regression rather than as scope; SMEM is not mentioned.

Limits

  • Compute pipeline and the dword form only; the handler is shared by the x2/x4/x8/x16 forms and by the other stages, not exercised here.
  • There is no s_buffer_store_* handler (def op_s_buffer_store does not exist), so the store path is not a comparable caller.
  • No device run: this is a translation result.

If SMEM is deliberately out of scope, one line in the body or a follow-up issue closes it; otherwise load_descriptor(ops[1], 'buffer load') makes the two paths agree. Whether SMEM should pass stride0_ok=True (it has no idxen, so no indexed twin) is your call.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7202992896 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2910#issuecomment-7202992896). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-26T20:42:32Z. --- **SMEM buffer loads are the one buffer-load path still resolved through `descriptor()` on `c88bbd68`** Measurements only, no code change. At `c88bbd68` raw MUBUF loads go through the new `load_descriptor()`, formatted loads already compare all four words in `mubuf_format()` (`tools/startup/gfx2hlsl.py:6925-6928`), and `Stage.op_s_buffer_load_dword` (`:6251`) still resolves its resource through `self.descriptor(ops[1])`, which returns the key from word 0's `desc` symbol (the `s[104:107]` operand is the only case that checks the other three). So the six edits your fixture refuses on MUBUF are accepted on the SMEM path. ### Probe Linux, Python 3.11.16, no device. It reuses `WORDS_A`, `EDITS` and `translate_code` from your fixture, removes the two 8-byte instructions the fixture owns (the MUBUF load at `LOAD_SITE`, the `buffer_store_dwordx2` at `STORE_A`), keeps everything else, and inserts `s_buffer_load_dword s24, s[12:15], s11 offset:0x10` (`060620f410000016`: opcode `0x08`, `sbase=12`, `sdst=24`, `soffset=11`, `imm=16`). ``` no edit -> s24 = r0.Load(0x00000000u + 16); all six edits -> s24 = r0.Load(0x00000000u + 16); ('constant 0 w2' also emits s14 = 0) ``` Your own fixture passes unchanged on this head (`compute buffer load modified descriptor checks passed`, rc=0). ### Control Re-routing that single line to `self.load_descriptor(ops[1], 'buffer load')` refuses all six edits with `buffer load through a modified descriptor`, keeps the no-edit case translating, and your fixture still passes (rc=0). That was an experiment, not a patch: the file was restored and `git status --porcelain --untracked-files=no` is empty. ### What this does and does not show The emitted load is the resource plus an offset; `NUM_RECORDS` and `OOB_SELECT` are not modelled on this path, so an edit of DW2/DW3 cannot change the emitted text — if it diverges, it diverges at the descriptor's bound fields, and I did not measure that on a device. The narrower question is whether the "unproven descriptor -> refuse" rule should apply here too. Your body says the change "does not affect existing formatted loads or buffer stores", which reads as non-regression rather than as scope; SMEM is not mentioned. ### Limits - Compute pipeline and the `dword` form only; the handler is shared by the x2/x4/x8/x16 forms and by the other stages, not exercised here. - There is no `s_buffer_store_*` handler (`def op_s_buffer_store` does not exist), so the store path is not a comparable caller. - No device run: this is a translation result. If SMEM is deliberately out of scope, one line in the body or a follow-up issue closes it; otherwise `load_descriptor(ops[1], 'buffer load')` makes the two paths agree. Whether SMEM should pass `stride0_ok=True` (it has no `idxen`, so no indexed twin) is your call. _AI-assisted._
Holastor commented 2026-11-26 20:50:06 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Holastor on 2026-11-26T20:50:06Z.


Thanks for the review and positive verdict @KelboLive!

Regarding the two points:

  1. WORDS_A export: Confirmed — WORDS_A is defined as a module-level global at line 99 of tests/startup_gfx2hlsl_compute_check.py (alongside STORE_A at line 703). The import import startup_gfx2hlsl_compute_check as C; W = C.WORDS_A works cleanly across all environments and CI.
  2. op_s_buffer_load_dword* call chain: The op_s_buffer_load_dwordx16 signature in the diff appeared only because it immediately precedes def buffer_address() in Stage. Scalar SMEM buffer loads (s_buffer_load_dword*) do not call buffer_address() (they use smem_soffset() directly). buffer_address() is called exclusively for vector MUBUF/MTBUF operations:
    • buffer_load: defaults to is_formatted=False (validated via load_descriptor());
    • buffer_store: is_formatted=False;
    • formatted_buffer_load: passes is_formatted=True (as MTBUF has its own separate descriptor validation and binding).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7203120137 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2910#issuecomment-7203120137). Originally posted by [Holastor](https://github.com/Holastor) on 2026-11-26T20:50:06Z. --- Thanks for the review and positive verdict @KelboLive! Regarding the two points: 1. **`WORDS_A` export**: Confirmed — `WORDS_A` is defined as a module-level global at line 99 of `tests/startup_gfx2hlsl_compute_check.py` (alongside `STORE_A` at line 703). The import `import startup_gfx2hlsl_compute_check as C; W = C.WORDS_A` works cleanly across all environments and CI. 2. **`op_s_buffer_load_dword*` call chain**: The `op_s_buffer_load_dwordx16` signature in the diff appeared only because it immediately precedes `def buffer_address()` in `Stage`. Scalar SMEM buffer loads (`s_buffer_load_dword*`) do not call `buffer_address()` (they use `smem_soffset()` directly). `buffer_address()` is called exclusively for vector MUBUF/MTBUF operations: - `buffer_load`: defaults to `is_formatted=False` (validated via `load_descriptor()`); - `buffer_store`: `is_formatted=False`; - `formatted_buffer_load`: passes `is_formatted=True` (as MTBUF has its own separate descriptor validation and binding).
Holastor commented 2026-11-26 20:52:32 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Holastor on 2026-11-26T20:52:32Z.


Thank you for the thorough probe and measurement @thepatrickworld!

On closer inspection against the full test suite (specifically tests/startup_gfx2hlsl_heap_word_check.py), scalar SMEM buffer loads (s_buffer_load_dword*) intentionally have different contract semantics: tests/startup_gfx2hlsl_heap_word_check.py:126 explicitly tests that an s_buffer_load_dword through a modified descriptor continues translating without immediate refusal, but invalidates heap word provenance so that downstream s_load of the resource heap record refuses at manifest time.

Routing SMEM through load_descriptor() broke those existing test contracts across the Linux test runner. Therefore, in commit 7234e021:

  • Reverted op_s_buffer_load_dword to self.descriptor(), keeping scalar SMEM loads in their existing contract and leaving Issue #2901 focused strictly on vector MUBUF buffer loads.
  • Added getattr(self.pipe, 'modified', ()) in load_descriptor() and store_descriptor() so bare probe pipelines without modification tracking are safely supported without AttributeError.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7203160585 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2910#issuecomment-7203160585). Originally posted by [Holastor](https://github.com/Holastor) on 2026-11-26T20:52:32Z. --- Thank you for the thorough probe and measurement @thepatrickworld! On closer inspection against the full test suite (specifically `tests/startup_gfx2hlsl_heap_word_check.py`), scalar SMEM buffer loads (`s_buffer_load_dword*`) intentionally have different contract semantics: `tests/startup_gfx2hlsl_heap_word_check.py:126` explicitly tests that an `s_buffer_load_dword` through a modified descriptor continues translating without immediate refusal, but invalidates heap word provenance so that downstream `s_load` of the resource heap record refuses at manifest time. Routing SMEM through `load_descriptor()` broke those existing test contracts across the Linux test runner. Therefore, in commit 7234e021: - Reverted `op_s_buffer_load_dword` to `self.descriptor()`, keeping scalar SMEM loads in their existing contract and leaving Issue #2901 focused strictly on vector MUBUF buffer loads. - Added `getattr(self.pipe, 'modified', ())` in `load_descriptor()` and `store_descriptor()` so bare probe pipelines without modification tracking are safely supported without `AttributeError`.
R0Y00 commented 2026-11-27 05:23:08 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T05:23:08Z.

Review: COMMENTED


Integration finding at 7234e021 with current main e62e3a5e (which includes #2903). The new load-descriptor controls pass, but startup_gfx2hlsl_cselect_descnum_controls fails six cases. A select copied into words 1–3 or joined at a branch/loop now hits generic buffer load through a modified descriptor first, masking the existing select/join rejection and its mutation checks. Please rebase and run both startup_gfx2hlsl_load_desc_controls and startup_gfx2hlsl_cselect_descnum_controls. The controls should still distinguish removal of the existing select/join guards while preserving the generic refusal for other writes.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6083830630 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2910#pullrequestreview-6083830630). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-27T05:23:08Z. **Review:** COMMENTED --- Integration finding at `7234e021` with current main `e62e3a5e` (which includes #2903). The new load-descriptor controls pass, but `startup_gfx2hlsl_cselect_descnum_controls` fails six cases. A select copied into words 1–3 or joined at a branch/loop now hits generic `buffer load through a modified descriptor` first, masking the existing select/join rejection and its mutation checks. Please rebase and run both `startup_gfx2hlsl_load_desc_controls` and `startup_gfx2hlsl_cselect_descnum_controls`. The controls should still distinguish removal of the existing select/join guards while preserving the generic refusal for other writes.
KelboLive commented 2026-11-27 05:43:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-27T05:43:23Z.

Review: COMMENTED


What works

  1. Solid defense-in-depth: the new Stage.load_descriptor() validates all 4
    descriptor words against symbol table entries, preventing buffer loads
    through modified/overwritten descriptors.
  2. The test fixture correctly exercises 6 edit modes (copy to w1/w2/w3,
    alu modify w2, in-place and zero w2, constant zero w2) and verifies each
    is refused.
  3. The load tests are well-structured - they verify the refusal happens
    both in gfx2hlsl translations and in the compute pipeline, and that an
    unmodified load still succeeds.

Issues

  1. load_descriptor() has stride0_ok=False and raw_conversion_ok=False
    flags. The comments explain these allow proven safe transformations, but
    the conditions under which stride-0 is considered 'proven' should be
    clearly documented so future maintainers understand the safe paths.
  2. The tests use hardcoded opcodes (sop2/sop1) rather than symbolic names
    like other tests in the codebase. This is acceptable given the test names
    clarify the edit, but consider whether symbolic helpers from the existing
    infrastructure are available.
  3. No test for the raw_conversion_ok flag - verify it's tested when a
    described raw format is passed with raw_conversion_ok=True.

Recommendations

  • Add documentation on when stride-0 and raw conversions are 'proven'.
  • Consider adding a test case for the raw_conversion_ok=True path.

Overall

Important security fix for buffer loads through modified descriptors.
Good test coverage with clear refusal patterns. Approvable.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6083966614 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2910#pullrequestreview-6083966614). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-27T05:43:23Z. **Review:** COMMENTED --- ## What works 1. Solid defense-in-depth: the new Stage.load_descriptor() validates all 4 descriptor words against symbol table entries, preventing buffer loads through modified/overwritten descriptors. 2. The test fixture correctly exercises 6 edit modes (copy to w1/w2/w3, alu modify w2, in-place and zero w2, constant zero w2) and verifies each is refused. 3. The load tests are well-structured - they verify the refusal happens both in gfx2hlsl translations and in the compute pipeline, and that an unmodified load still succeeds. ## Issues 1. `load_descriptor()` has `stride0_ok=False` and `raw_conversion_ok=False` flags. The comments explain these allow proven safe transformations, but the conditions under which stride-0 is considered 'proven' should be clearly documented so future maintainers understand the safe paths. 2. The tests use hardcoded opcodes (sop2/sop1) rather than symbolic names like other tests in the codebase. This is acceptable given the test names clarify the edit, but consider whether symbolic helpers from the existing infrastructure are available. 3. No test for the `raw_conversion_ok` flag - verify it's tested when a described raw format is passed with raw_conversion_ok=True. ## Recommendations - Add documentation on when stride-0 and raw conversions are 'proven'. - Consider adding a test case for the raw_conversion_ok=True path. ## Overall Important security fix for buffer loads through modified descriptors. Good test coverage with clear refusal patterns. Approvable.
Holastor commented 2026-11-27 08:33:05 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Holastor on 2026-11-27T08:33:05Z.


Addressed in commit 98ab777f and rebased cleanly onto latest upstream/main (3b6c38a8):

  1. Precedence for select / branch join checks (@R0Y00):

    • In Stage.load_descriptor(), self.descriptor(tok) is now evaluated first before symbol table word-comparison checks.
    • This ensures existing select_word(tok) and joined_word(tok) rejections (holds a select of descriptor data and holds a word joined at a branch target) take precedence over generic modification refusals, allowing integration controls to pass and negative control mutants (load-check-removed, join-check-removed) to cleanly distinguish the removal of those guards.
    • Verified that both tests/startup_gfx2hlsl_load_desc_check.py and tests/startup_gfx2hlsl_cselect_descnum_check.py controls pass with 0 failures (including all 5 negative control mutants).
  2. Documentation & raw conversion test coverage (@KelboLive):

    • Added docstring documentation in Stage.load_descriptor() explaining when stride0_ok (non-indexed buffer loads where stride is not consulted by hardware) and raw_conversion_ok (the 5-instruction RDNA2 structured-to-raw sequence: stride extraction, stride zeroing, record-count scaling, and raw OOB bit configuration) are proven safe transformations.
    • Added test coverage in tests/startup_gfx2hlsl_load_desc_check.py verifying that a proven structured-to-raw conversion on a buffer load descriptor translates cleanly with raw_conversion_ok=True, while invalid conversions (e.g. constant multiplier instead of the extracted stride) are refused.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7213658326 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2910#issuecomment-7213658326). Originally posted by [Holastor](https://github.com/Holastor) on 2026-11-27T08:33:05Z. --- Addressed in commit 98ab777f and rebased cleanly onto latest `upstream/main` (`3b6c38a8`): 1. **Precedence for select / branch join checks (@R0Y00):** - In `Stage.load_descriptor()`, `self.descriptor(tok)` is now evaluated first before symbol table word-comparison checks. - This ensures existing `select_word(tok)` and `joined_word(tok)` rejections (`holds a select of descriptor data` and `holds a word joined at a branch target`) take precedence over generic modification refusals, allowing integration controls to pass and negative control mutants (`load-check-removed`, `join-check-removed`) to cleanly distinguish the removal of those guards. - Verified that both `tests/startup_gfx2hlsl_load_desc_check.py` and `tests/startup_gfx2hlsl_cselect_descnum_check.py controls` pass with 0 failures (including all 5 negative control mutants). 2. **Documentation & raw conversion test coverage (@KelboLive):** - Added docstring documentation in `Stage.load_descriptor()` explaining when `stride0_ok` (non-indexed buffer loads where stride is not consulted by hardware) and `raw_conversion_ok` (the 5-instruction RDNA2 structured-to-raw sequence: stride extraction, stride zeroing, record-count scaling, and raw OOB bit configuration) are proven safe transformations. - Added test coverage in `tests/startup_gfx2hlsl_load_desc_check.py` verifying that a proven structured-to-raw conversion on a buffer load descriptor translates cleanly with `raw_conversion_ok=True`, while invalid conversions (e.g. constant multiplier instead of the extracted stride) are refused.
R0Y00 commented 2026-11-27 08:41:31 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T08:41:31Z.

Review: CHANGES_REQUESTED


The previously reported diagnostic-precedence failures are fixed at 98ab777f. On current main 0e704468 plus this PR, the descriptor-load, cselect_descnum controls (including all five mutants), heap-word and compute translation suites pass.

One formatted path changes despite the stated intent to preserve it. buffer_address now skips load_descriptor for formatted loads, but the old indexed key in self.pipe.modified guard was also deleted. I inserted s_and_b32 s21, s13, 0xc000ffff immediately before LOAD_L in the source-built L-uint compute fixture. This writes a derived descriptor word to a separate SGPR and leaves the actual four operand words intact. 0e704468 refuses the indexed formatted load with indexed load through a modified descriptor. 98ab777f publishes a binding and translates it because the specialized check only sees the unchanged four registers. Please preserve the indexed formatted guard and add this case, or document and validate an intentional expansion of that route separately.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6085511449 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2910#pullrequestreview-6085511449). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-27T08:41:31Z. **Review:** CHANGES_REQUESTED --- The previously reported diagnostic-precedence failures are fixed at `98ab777f`. On current `main` `0e704468` plus this PR, the descriptor-load, `cselect_descnum controls` (including all five mutants), heap-word and compute translation suites pass. One formatted path changes despite the stated intent to preserve it. `buffer_address` now skips `load_descriptor` for formatted loads, but the old indexed `key in self.pipe.modified` guard was also deleted. I inserted `s_and_b32 s21, s13, 0xc000ffff` immediately before `LOAD_L` in the source-built `L-uint` compute fixture. This writes a derived descriptor word to a separate SGPR and leaves the actual four operand words intact. `0e704468` refuses the indexed formatted load with `indexed load through a modified descriptor`. `98ab777f` publishes a binding and translates it because the specialized check only sees the unchanged four registers. Please preserve the indexed formatted guard and add this case, or document and validate an intentional expansion of that route separately.
Holastor commented 2026-11-27 09:05:56 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Holastor on 2026-11-27T09:05:56Z.


Addressed in commit 7b44bda6 (rebased on upstream/main at 0e704468):

Preserved Indexed Formatted Load Guard (@R0Y00)

  • In Stage.buffer_address(), restored the key in getattr(self.pipe, 'modified', ()) guard in both if idxen and offen: and elif idxen::
    if key in getattr(self.pipe, 'modified', ()):
        raise Unsupported('indexed load through a modified descriptor')
    
  • Because formatted buffer loads pass through buffer_address(..., is_formatted=True), any prior modification derived from descriptor key (such as writing a derived word to a separate SGPR via s_and_b32 s21, s13, 0xc000ffff) triggers this guard and refuses with indexed load through a modified descriptor, preserving the existing behavior from 0e704468.
  • Added test coverage in both tests/startup_gfx2hlsl_compute_check.py (check_formatted_loads()) and tests/startup_gfx2hlsl_load_desc_check.py:
    • Verified that inserting s_and_b32 s21, s13, 0xc000ffff immediately before LOAD_L in L-uint refuses with indexed load through a modified descriptor.

Test Verification

python -B tests/startup_gfx2hlsl_load_desc_check.py
python -B tests/startup_gfx2hlsl_cselect_descnum_check.py controls
python -B tests/startup_gfx2hlsl_compute_check.py
python -B tests/compute_load_format_check.py
python -B tests/docs_links_check.py
python -B tests/bidi_controls_check.py
python -B tests/run_checks_parallel_check.py

All passed with 0 failures on Windows 11 / Python 3.14 (including all 5 negative control mutants in cselect_descnum_check.py controls).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7214276875 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2910#issuecomment-7214276875). Originally posted by [Holastor](https://github.com/Holastor) on 2026-11-27T09:05:56Z. --- Addressed in commit `7b44bda6` (rebased on `upstream/main` at `0e704468`): ### Preserved Indexed Formatted Load Guard (@R0Y00) - In `Stage.buffer_address()`, restored the `key in getattr(self.pipe, 'modified', ())` guard in both `if idxen and offen:` and `elif idxen:`: ```python if key in getattr(self.pipe, 'modified', ()): raise Unsupported('indexed load through a modified descriptor') ``` - Because formatted buffer loads pass through `buffer_address(..., is_formatted=True)`, any prior modification derived from descriptor `key` (such as writing a derived word to a separate SGPR via `s_and_b32 s21, s13, 0xc000ffff`) triggers this guard and refuses with `indexed load through a modified descriptor`, preserving the existing behavior from `0e704468`. - Added test coverage in both `tests/startup_gfx2hlsl_compute_check.py` (`check_formatted_loads()`) and `tests/startup_gfx2hlsl_load_desc_check.py`: - Verified that inserting `s_and_b32 s21, s13, 0xc000ffff` immediately before `LOAD_L` in `L-uint` refuses with `indexed load through a modified descriptor`. ### Test Verification ```powershell python -B tests/startup_gfx2hlsl_load_desc_check.py python -B tests/startup_gfx2hlsl_cselect_descnum_check.py controls python -B tests/startup_gfx2hlsl_compute_check.py python -B tests/compute_load_format_check.py python -B tests/docs_links_check.py python -B tests/bidi_controls_check.py python -B tests/run_checks_parallel_check.py ``` All passed with 0 failures on Windows 11 / Python 3.14 (including all 5 negative control mutants in `cselect_descnum_check.py controls`).
R0Y00 commented 2026-11-27 09:20:13 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T09:20:13Z.

Review: APPROVED


The formatted indexed-load guard is restored at 7b44bda6, and the new source-built L-uint case exercises the exact derived-word counterexample. The specialized formatted descriptor checks and existing scalar heap-word contract are preserved.

On this head integrated with main e446b072, I reran startup_gfx2hlsl_load_desc_check.py, startup_gfx2hlsl_cselect_descnum_check.py controls, startup_gfx2hlsl_compute_check.py, startup_gfx2hlsl_heap_word_check.py and compute_load_format_check.py on Windows with Python 3.12. All five passed, including all five diagnostic mutants and the approved raw-conversion controls. Hosted Windows, Linux Python and gfx1013 checks also passed. These checks cover compiler behavior.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6085947775 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2910#pullrequestreview-6085947775). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-27T09:20:13Z. **Review:** APPROVED --- The formatted indexed-load guard is restored at `7b44bda6`, and the new source-built `L-uint` case exercises the exact derived-word counterexample. The specialized formatted descriptor checks and existing scalar heap-word contract are preserved. On this head integrated with `main` `e446b072`, I reran `startup_gfx2hlsl_load_desc_check.py`, `startup_gfx2hlsl_cselect_descnum_check.py controls`, `startup_gfx2hlsl_compute_check.py`, `startup_gfx2hlsl_heap_word_check.py` and `compute_load_format_check.py` on Windows with Python 3.12. All five passed, including all five diagnostic mutants and the approved raw-conversion controls. Hosted Windows, Linux Python and gfx1013 checks also passed. These checks cover compiler behavior.
thepatrickworld commented 2026-11-27 09:38:07 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by thepatrickworld on 2026-11-27T09:38:07Z.


Independent re-check at 7b44bda6: the four conversion shapes refuse again, and one of the two restored guards is unexercised

Lowering only — no DXIL, no adapter. This verifies the fix rather than reporting the defect.

Trees

  • 7b44bda6 — tools/startup/gfx2hlsl.py sha256 65389f70a6d96da3f4beeaaa5e9b8a5cc92aab8c446af747c8b8b4a294b4dafe
  • 98ab777f (previous head) — same file sha256 42171bbd823c1b9f30fa359dbeee17e23406da0c9cedb865df02f1af30537c94
  • main 3e9542a6 — 0dfe91bf1abd87c0d513e55bc5169c4e15fa0a195eb77c623a19d83ee3e9d30d

The four derived writes

These are the descriptor-word conversions raw_descriptor_alu() (gfx2hlsl.py:932) returns — stride0 s_and_b32 s21, s13, 0xc000ffff, oob0 s_and_b32 s21, s15, 0xcfffffff, oob3 s_or_b32 s21, s15, 0x30000000, byte_count s_bfe_u32 s21, s13, 0xe0010 + s_mul_i32 s22, s14, s21. Each writes a scratch SGPR and leaves the four operand registers s[12:15] intact, so the four-word comparison at gfx2hlsl.py:7244-7247 cannot see any of them.

before a formatted indexed load (buffer_load_format_xyzw … idxen offen offset:2) main 3e9542a6 98ab777f 7b44bda6
all four shapes refused indexed load through a modified descriptor translated, buffer Load emitted refused, same message

Same verdicts on the idxen-only form (offen cleared, word 0 0xe00c2002): refused at main and at 7b44bda6, translated at 98ab777f.

Unchanged on all three trees: the in-place rewrites of these words are refused everywhere (message indexed load through a modified descriptor at main and at 7b44bda6, …whose words were rewritten at 98ab777f in between); s_mov_b32 s15, s14 and s_mov_b32 s15, 0 are refused through the four-word comparison; s_bfe_u32 alone and s_max_u32 with an inline constant never mark the key and translate; the non-indexed form (offen only) accepted all four everywhere, before and after this PR.

Mutation receipts

  • Both guards removed (if idxen and offen: and elif idxen:) — the file drops back to the 98ab777f sha256 42171bbd…, and both new cases fail: startup_gfx2hlsl_load_desc_check with expected refusal for formatted indexed load with modified descriptor, but translated, startup_gfx2hlsl_compute_check with accepted, expected a refusal naming 'indexed load through a modified descriptor'. The fix is pinned.
  • Only the elif idxen: guard removed — no fixture notices. startup_gfx2hlsl_load_desc_check, startup_gfx2hlsl_compute_check, startup_buffer_address_check, startup_mesh57_skeleton_check and startup_gfx2hlsl_compute_spill_check all stay green, and on the idxen-only load the four shapes translate again (s_and_b32 s21, s13, 0xc000ffff → translated, while its in-place twin still refuses through the four-word comparison).
  • Tree restored to 65389f70… after each mutant, git status --porcelain --untracked-files=no empty.

Proposed case for the second branch

Both new cases use LOAD_L, which carries idxen offen, so only the first branch is exercised. One case closes it, at the load whose word 0 is 0xe00c2002 (offen bit 12 clear, idxen bit 13 set) instead of 0xe00c3002:

site = C.WORDS_L.index(C.LOAD_L)
idxen_only = C.WORDS_L.replace(C.LOAD_L, struct.pack('<I', 0xe00c3002 & ~0x1000) + C.LOAD_L[4:])
code = idxen_only[:site] + sop2(0x0e, 21, 13, 255, 0xc000ffff) + idxen_only[site:]
G.ComputePipeline(code, C.root_blob(), C.CASES['L-uint'][2], C.CASES['L-uint'][3]).hlsl_cs()  # must raise

Measured with that snippet on the clean 7b44bda6: it raises indexed load through a modified descriptor, and the same load without the edit translates. Under the elif idxen: mutant it translates with the edit.

Regression

The 201 fixtures that mention gfx2hlsl and are green at 98ab777f are all still green at 7b44bda6 (0 failures). sweep2.log carries the per-fixture lines and sweep2.stdout records head=7b44bda6 for that replay.

Commands

python3 -B probe6.py <worktree> <label>   # 13 shapes x 4 load forms, verdict + pipe.modified count
python3 -B mutMUT1.py <worktree>          # drops the `elif idxen:` guard, then probe6 + 5 fixtures
python3 -B mut8.py <worktree> MUT2        # drops both guards
python3 -B sweep2.py <worktree> sweep.log out.log   # replays the 201 green fixtures

Limits

  • Lowering only. Nothing here speaks about the DXIL emitted or about any adapter.
  • The four shapes are the descriptor returns of raw_descriptor_alu(). Writers that do not go through it (a descriptor word reloaded through LDS, a word joined at a branch target) have their own guards and were not sampled.
  • A fixture counts in the regression sweep only if it is green at baseline; 34 of the 235 candidates need arguments, a device, or fail on this host for their own reasons.
  • Measured head is 7b44bda6; if the branch moves again, re-run probe6 before citing this note.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7214912802 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2910#issuecomment-7214912802). Originally posted by [thepatrickworld](https://github.com/thepatrickworld) on 2026-11-27T09:38:07Z. --- **Independent re-check at `7b44bda6`: the four conversion shapes refuse again, and one of the two restored guards is unexercised** Lowering only — no DXIL, no adapter. This verifies the fix rather than reporting the defect. ### Trees - `7b44bda6` — `tools/startup/gfx2hlsl.py` sha256 `65389f70a6d96da3f4beeaaa5e9b8a5cc92aab8c446af747c8b8b4a294b4dafe` - `98ab777f` (previous head) — same file sha256 `42171bbd823c1b9f30fa359dbeee17e23406da0c9cedb865df02f1af30537c94` - main `3e9542a6` — `0dfe91bf1abd87c0d513e55bc5169c4e15fa0a195eb77c623a19d83ee3e9d30d` ### The four derived writes These are the descriptor-word conversions `raw_descriptor_alu()` (`gfx2hlsl.py:932`) returns — stride0 `s_and_b32 s21, s13, 0xc000ffff`, oob0 `s_and_b32 s21, s15, 0xcfffffff`, oob3 `s_or_b32 s21, s15, 0x30000000`, byte_count `s_bfe_u32 s21, s13, 0xe0010` + `s_mul_i32 s22, s14, s21`. Each writes a scratch SGPR and leaves the four operand registers `s[12:15]` intact, so the four-word comparison at `gfx2hlsl.py:7244-7247` cannot see any of them. | before a formatted indexed load (`buffer_load_format_xyzw … idxen offen offset:2`) | main `3e9542a6` | `98ab777f` | `7b44bda6` | |---|---|---|---| | all four shapes | refused `indexed load through a modified descriptor` | translated, buffer `Load` emitted | refused, same message | Same verdicts on the `idxen`-only form (`offen` cleared, word 0 `0xe00c2002`): refused at main and at `7b44bda6`, translated at `98ab777f`. Unchanged on all three trees: the in-place rewrites of these words are refused everywhere (message `indexed load through a modified descriptor` at main and at `7b44bda6`, `…whose words were rewritten` at `98ab777f` in between); `s_mov_b32 s15, s14` and `s_mov_b32 s15, 0` are refused through the four-word comparison; `s_bfe_u32` alone and `s_max_u32` with an inline constant never mark the key and translate; the non-indexed form (`offen` only) accepted all four everywhere, before and after this PR. ### Mutation receipts - **Both guards removed** (`if idxen and offen:` and `elif idxen:`) — the file drops back to the `98ab777f` sha256 `42171bbd…`, and both new cases fail: `startup_gfx2hlsl_load_desc_check` with `expected refusal for formatted indexed load with modified descriptor, but translated`, `startup_gfx2hlsl_compute_check` with `accepted, expected a refusal naming 'indexed load through a modified descriptor'`. The fix is pinned. - **Only the `elif idxen:` guard removed** — no fixture notices. `startup_gfx2hlsl_load_desc_check`, `startup_gfx2hlsl_compute_check`, `startup_buffer_address_check`, `startup_mesh57_skeleton_check` and `startup_gfx2hlsl_compute_spill_check` all stay green, and on the `idxen`-only load the four shapes translate again (`s_and_b32 s21, s13, 0xc000ffff` → translated, while its in-place twin still refuses through the four-word comparison). - Tree restored to `65389f70…` after each mutant, `git status --porcelain --untracked-files=no` empty. ### Proposed case for the second branch Both new cases use `LOAD_L`, which carries `idxen offen`, so only the first branch is exercised. One case closes it, at the load whose word 0 is `0xe00c2002` (`offen` bit 12 clear, `idxen` bit 13 set) instead of `0xe00c3002`: ```python site = C.WORDS_L.index(C.LOAD_L) idxen_only = C.WORDS_L.replace(C.LOAD_L, struct.pack('<I', 0xe00c3002 & ~0x1000) + C.LOAD_L[4:]) code = idxen_only[:site] + sop2(0x0e, 21, 13, 255, 0xc000ffff) + idxen_only[site:] G.ComputePipeline(code, C.root_blob(), C.CASES['L-uint'][2], C.CASES['L-uint'][3]).hlsl_cs() # must raise ``` Measured with that snippet on the clean `7b44bda6`: it raises `indexed load through a modified descriptor`, and the same load without the edit translates. Under the `elif idxen:` mutant it translates with the edit. ### Regression The 201 fixtures that mention `gfx2hlsl` and are green at `98ab777f` are **all still green at `7b44bda6`** (0 failures). `sweep2.log` carries the per-fixture lines and `sweep2.stdout` records `head=7b44bda6` for that replay. ### Commands ```bash python3 -B probe6.py <worktree> <label> # 13 shapes x 4 load forms, verdict + pipe.modified count python3 -B mutMUT1.py <worktree> # drops the `elif idxen:` guard, then probe6 + 5 fixtures python3 -B mut8.py <worktree> MUT2 # drops both guards python3 -B sweep2.py <worktree> sweep.log out.log # replays the 201 green fixtures ``` ### Limits - Lowering only. Nothing here speaks about the DXIL emitted or about any adapter. - The four shapes are the descriptor returns of `raw_descriptor_alu()`. Writers that do not go through it (a descriptor word reloaded through LDS, a word joined at a branch target) have their own guards and were not sampled. - A fixture counts in the regression sweep only if it is green at baseline; 34 of the 235 candidates need arguments, a device, or fail on this host for their own reasons. - Measured head is `7b44bda6`; if the branch moves again, re-run `probe6` before citing this note. _AI-assisted._
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
R0Y00/Xbox2Windows!2910
No description provided.