shader: add qword return forms #1061

Closed
github-bot wants to merge 1 commit from gh-pr/1061/head into gh-pr/1061/base
Owner

@⁠lambirou on GitHub · 2026-11-23 23:56 UTC · original
lambirou:shader/qword-return-forms → main · +34 −8 · 3 files · 1 commits · closed without merging

Change

Complete the qword _rtn family in the private LDS compute path. The five forms already landed
by #942 (add, sub, rsub, and, or) are kept; this adds:

  • ds_xor_rtn_b64
  • ds_min_rtn_i64
  • ds_max_rtn_i64
  • ds_min_rtn_u64
  • ds_max_rtn_u64

The lowerer validates the returned destination pair, captures the old pair before any write and
returns it beside the updated pair. ds_inc_u64 and ds_dec_u64 remain for XCL-16.

Verification

  • python -B tests/compute_store_check.py binary <llvm-mc> <llvm-objcopy> <libLLVM-23>
    • Exit 0 with the local LLVM toolchain.
  • ctest --preset dev --no-tests=error -R '^compute_store_aot_lds_qword_' -V
    • 2/2 passed:
      • WARP: Microsoft Basic Render Driver, driver 10.0.26100.10068, 320 words compared per
        case, 0 mismatches.
      • Hardware: AMD Radeon RX 9060 XT, vendor 1002, device 7590, driver 32.0.32029.2010,
        Windows 10 Pro 26H2 build 26300.10075, debug layer unavailable, 320 words compared per
        case, 0 mismatches.
  • The ten _rtn names are checked explicitly. The fixture aliases destination and source and
    compares both the old and new pairs for one and two groups.
  • Mutants detected: removed carry (word 1), returned new pair instead of old (for example
    ds_add_rtn_u64 word 2, ds_min_rtn_i64 word 2, ds_max_rtn_i64 word 70), and a signed
    comparison for unsigned min/max (word 0).
  • docs_links_check.py: Self-test passed., Checked 15 Markdown files and 237 links..
  • git diff --check origin/main...HEAD: clean.
  • Not run: the full CTest suite, the release preset, unrelated GPU tests and a real archive scan.

Evidence and follow-up

  • Branch shader/qword-return-forms, head 0749207, based on 1a6425e.
  • The fixture profile is the existing private LDS gfx1030 profile, not gfx1013.
    ds_group rejects a gfx1013 fixture before the DS instruction, so this PR does not claim a
    gfx1013 test. Extending that profile is a separate change if the acceptance requires it.
  • docs/experiments.md records that the ten returning qword operations copy the old pair and
    that the fixture aliases destination and data. No README row changes.
  • Provenance: the five existing forms come from #942 in this repository; no XCL code, table or
    output was used. The change is a source-built gfx1030 fixture and a CPU reference.
  • Follow-up: XCL-16 adds ds_inc_u64/ds_dec_u64 and their return forms. A future change can
    widen ds_group to gfx1013 with its own evidence.
  • No game files, dumps, shader bytes, title paths or secrets are included.

Checklist

  • One reviewable behavior: the five missing qword return forms.
  • Positive fixture and carry/old-pair/signed-comparison mutants.
  • WARP and hardware results with adapter, driver, Windows build and debug layer.
  • Documentation updated.
  • No game files, dumps, logs or secrets.
  • Provenance checked; no XCL code used.
  • AI-assisted (Codex).
**@⁠lambirou** on GitHub · 2026-11-23 23:56 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1061) `lambirou:shader/qword-return-forms` → `main` · +34 −8 · 3 files · 1 commits · closed without merging ## Change Complete the qword `_rtn` family in the private LDS compute path. The five forms already landed by #942 (add, sub, rsub, and, or) are kept; this adds: - `ds_xor_rtn_b64` - `ds_min_rtn_i64` - `ds_max_rtn_i64` - `ds_min_rtn_u64` - `ds_max_rtn_u64` The lowerer validates the returned destination pair, captures the old pair before any write and returns it beside the updated pair. `ds_inc_u64` and `ds_dec_u64` remain for XCL-16. ## Verification - `python -B tests/compute_store_check.py binary <llvm-mc> <llvm-objcopy> <libLLVM-23>` - Exit 0 with the local LLVM toolchain. - `ctest --preset dev --no-tests=error -R '^compute_store_aot_lds_qword_' -V` - 2/2 passed: - WARP: Microsoft Basic Render Driver, driver 10.0.26100.10068, 320 words compared per case, 0 mismatches. - Hardware: AMD Radeon RX 9060 XT, vendor 1002, device 7590, driver 32.0.32029.2010, Windows 10 Pro 26H2 build 26300.10075, debug layer unavailable, 320 words compared per case, 0 mismatches. - The ten `_rtn` names are checked explicitly. The fixture aliases destination and source and compares both the old and new pairs for one and two groups. - Mutants detected: removed carry (word 1), returned new pair instead of old (for example `ds_add_rtn_u64` word 2, `ds_min_rtn_i64` word 2, `ds_max_rtn_i64` word 70), and a signed comparison for unsigned min/max (word 0). - `docs_links_check.py`: `Self-test passed.`, `Checked 15 Markdown files and 237 links.`. - `git diff --check origin/main...HEAD`: clean. - Not run: the full CTest suite, the release preset, unrelated GPU tests and a real archive scan. ## Evidence and follow-up - Branch `shader/qword-return-forms`, head `0749207`, based on `1a6425e`. - The fixture profile is the existing private LDS **gfx1030** profile, not gfx1013. `ds_group` rejects a gfx1013 fixture before the DS instruction, so this PR does not claim a gfx1013 test. Extending that profile is a separate change if the acceptance requires it. - `docs/experiments.md` records that the ten returning qword operations copy the old pair and that the fixture aliases destination and data. No README row changes. - Provenance: the five existing forms come from #942 in this repository; no XCL code, table or output was used. The change is a source-built gfx1030 fixture and a CPU reference. - Follow-up: XCL-16 adds `ds_inc_u64`/`ds_dec_u64` and their return forms. A future change can widen `ds_group` to gfx1013 with its own evidence. - No game files, dumps, shader bytes, title paths or secrets are included. ## Checklist - [x] One reviewable behavior: the five missing qword return forms. - [x] Positive fixture and carry/old-pair/signed-comparison mutants. - [x] WARP and hardware results with adapter, driver, Windows build and debug layer. - [x] Documentation updated. - [x] No game files, dumps, logs or secrets. - [x] Provenance checked; no XCL code used. - [x] AI-assisted (Codex).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:38:30 +00:00
github-bot closed this pull request 2026-11-26 22:38:30 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-24 00:02 UTC · original

These five returning forms already have a pending implementation in #944, after the #942 prerequisite. Please coordinate with @⁠stan495 in that PR before changing the same LDS path again. An independent comparison of signed-high/unsigned-low ties, overlap and the old-value mutation would be useful. We can retain distinct test coverage with attribution in one candidate.

**@⁠R0Y00** on GitHub · 2026-11-24 00:02 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1061#issuecomment-7117636124) These five returning forms already have a pending implementation in #944, after the #942 prerequisite. Please coordinate with @⁠stan495 in that PR before changing the same LDS path again. An independent comparison of signed-high/unsigned-low ties, overlap and the old-value mutation would be useful. We can retain distinct test coverage with attribution in one candidate.
Author
Owner

@⁠lambirou on GitHub · 2026-11-24 00:34 UTC · original

Closing in favor of #944 per maintainer review. The implementation is the same five returning forms; #944 is the one candidate. Our independent WARP/hardware, tie, overlap and old-value-mutation coverage is described in #944 and the branch is retained locally if a test-only follow-up is useful.

**@⁠lambirou** on GitHub · 2026-11-24 00:34 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1061#issuecomment-7118209200) Closing in favor of #944 per maintainer review. The implementation is the same five returning forms; #944 is the one candidate. Our independent WARP/hardware, tie, overlap and old-value-mutation coverage is described in #944 and the branch is retained locally if a test-only follow-up is useful.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.