Shaders: hardware probe for s_mul_hi_i32 #1364

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

@⁠LouisRiverstone on GitHub · 2026-11-24 17:36 UTC · original
LouisRiverstone:shaders/s-mul-test → main · +6 −0 · 1 files · 1 commits · closed without merging

Adds sop2_probe(0x36, ...) for s_mul_hi_i32 (signed 64-bit product, high dword) next to the existing s_mul_i32 and s_mul_hi_u32 probes in scalar_probes. Reduced after triage: the other two ops are already covered on main.

**@⁠LouisRiverstone** on GitHub · 2026-11-24 17:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/1364) `LouisRiverstone:shaders/s-mul-test` → `main` · +6 −0 · 1 files · 1 commits · closed without merging Adds `sop2_probe(0x36, ...)` for `s_mul_hi_i32` (signed 64-bit product, high dword) next to the existing `s_mul_i32` and `s_mul_hi_u32` probes in `scalar_probes`. Reduced after triage: the other two ops are already covered on main.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:28:51 +00:00
github-bot closed this pull request 2026-11-26 04:28:51 +00:00
Author
Owner

@⁠matheusfermiano-source on GitHub · 2026-11-24 18:08 UTC · original

First GPU run of this PR's test that I could find, on an AMD GPU under Proton on Linux: s_mul_and_s_mul_hi_match_rdna2: pass on a Radeon 660M (RDNA2).

  • Head 26f7098. Built on Linux with llvm-mingw for x86_64-pc-windows-gnullvm (Rust 1.98.1) and run under Proton Experimental (11.0-20261027b) with its vkd3d-proton 3.1.0, one GPU at a time; dxil.dll from DXC 1.9.2609 was loaded, so the test modules were validated.
  • Radeon 660M (RDNA2, RADV Mesa 26.3.1, waves 32..64): whole victory-shader suite 120 passed, 1 failed, 1 ignored. Nothing fails that passes on main (ffe310e). The one failure, emit::tests::stub_pipeline_is_created, fails on main here too: vkd3d-proton accepts the zeroed DXIL hash that the Windows runtime refuses (one of the Wine failures listed in #1218).

This is RADV, not AMD's Windows driver, so it adds to a Windows run rather than replacing it. Synthetic tests only, no game files. AI-assisted (Claude Code, Opus 5.5); every run was on this machine.

**@⁠matheusfermiano-source** on GitHub · 2026-11-24 18:08 UTC · [original](https://github.com/Marvisak/VIctory/pull/1364#issuecomment-7140213038) First GPU run of this PR's test that I could find, on an AMD GPU under Proton on Linux: **`s_mul_and_s_mul_hi_match_rdna2`: pass** on a Radeon 660M (RDNA2). - Head `26f7098`. Built on Linux with llvm-mingw for `x86_64-pc-windows-gnullvm` (Rust 1.98.1) and run under Proton Experimental (11.0-20261027b) with its vkd3d-proton 3.1.0, one GPU at a time; `dxil.dll` from DXC 1.9.2609 was loaded, so the test modules were validated. - **Radeon 660M** (RDNA2, RADV Mesa 26.3.1, waves 32..64): whole `victory-shader` suite 120 passed, 1 failed, 1 ignored. Nothing fails that passes on `main` (`ffe310e`). The one failure, `emit::tests::stub_pipeline_is_created`, fails on `main` here too: vkd3d-proton accepts the zeroed DXIL hash that the Windows runtime refuses (one of the Wine failures listed in #1218). This is RADV, not AMD's Windows driver, so it adds to a Windows run rather than replacing it. Synthetic tests only, no game files. AI-assisted (Claude Code, Opus 5.5); every run was on this machine.
Author
Owner

@⁠wwwwwwww3333333 on GitHub · 2026-11-24 19:13 UTC · original

Native Windows run on AMD RDNA2: RX 6750 XT (RDNA2, gfx1031), AMD driver 32.0.21045.29003, i5-13400F, Windows 11, Rust 1.98.1 MSVC. Head 26f7098 on main ffe310e (clean merge).

cargo test -p victory-shader --lib -- --test-threads=1: 121 passed, 0 failed, 1 ignored (main alone: 120 passed). s_mul_and_s_mul_hi_match_rdna2 ran on the hardware adapter and then on WARP, and passed on both. The earlier RDNA2 runs on this PR went through vkd3d-proton on Linux; this one is AMD's own D3D12 driver.

Synthetic tests only, no game files. AI-assisted (Claude picked the PRs and wrote the batch script; I ran it on my machine).

**@⁠wwwwwwww3333333** on GitHub · 2026-11-24 19:13 UTC · [original](https://github.com/Marvisak/VIctory/pull/1364#issuecomment-7141769491) Native Windows run on AMD RDNA2: RX 6750 XT (RDNA2, gfx1031), AMD driver 32.0.21045.29003, i5-13400F, Windows 11, Rust 1.98.1 MSVC. Head 26f7098 on main ffe310e (clean merge). `cargo test -p victory-shader --lib -- --test-threads=1`: **121 passed, 0 failed**, 1 ignored (main alone: 120 passed). `s_mul_and_s_mul_hi_match_rdna2` ran on the hardware adapter and then on WARP, and passed on both. The earlier RDNA2 runs on this PR went through vkd3d-proton on Linux; this one is AMD's own D3D12 driver. Synthetic tests only, no game files. AI-assisted (Claude picked the PRs and wrote the batch script; I ran it on my machine).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 02:36 UTC · original · edited 2026-11-25 16:45 UTC

Automated triage for the maintainers.

Merge candidate.

The PR is now what the last triage asked for: one sop2_probe(0x36, ab.clone(), ...) entry for s_mul_hi_i32 in scalar_probes (crates/victory-shader/src/emit/semantics_tests.rs), next to main's existing s_mul_i32 (0x26) and s_mul_hi_u32 (0x35) probes. The model takes the high dword of the signed 64-bit product, which matches the RDNA2 ISA. 0x36 is s_mul_hi_i32 in gfx10/opcodes.rs, and the lowering in lower.rs covers it. No SCC is expected, which is correct. The earlier duplicated cases are gone.

CI: passing (check).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 02:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/1364#issuecomment-7150952501) · edited 2026-11-25 16:45 UTC <!-- victory-triage v1 head=21dcdab1b671c6603d2200492e39a24f583ca006 verdict=merge-candidate at=2026-11-25T16:44:32Z --> Automated triage for the maintainers. **Merge candidate.** The PR is now what the last triage asked for: one `sop2_probe(0x36, ab.clone(), ...)` entry for `s_mul_hi_i32` in `scalar_probes` (`crates/victory-shader/src/emit/semantics_tests.rs`), next to main's existing `s_mul_i32` (0x26) and `s_mul_hi_u32` (0x35) probes. The model takes the high dword of the signed 64-bit product, which matches the RDNA2 ISA. 0x36 is `s_mul_hi_i32` in `gfx10/opcodes.rs`, and the lowering in `lower.rs` covers it. No SCC is expected, which is correct. The earlier duplicated cases are gone. CI: passing (`check`). --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 22:00 UTC · original

Automated triage for the maintainers, second look (a review against current main, with builds and tests where they could change the verdict).

Closing as covered by #2015, which adds the same probe (opcode 0x36, same model) among many others and was shown to fail when the signedness of the lowering is broken. The probe here is right and passes.

If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 22:00 UTC · [original](https://github.com/Marvisak/VIctory/pull/1364#issuecomment-7175814847) Automated triage for the maintainers, second look (a review against current `main`, with builds and tests where they could change the verdict). Closing as covered by #2015, which adds the same probe (opcode 0x36, same model) among many others and was shown to fail when the signedness of the lowering is broken. The probe here is right and passes. If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1364
No description provided.