Shaders/Lower: sign-extend v_mad_i64_i32 literal, guard clamp/omod, and split v_mad_u64_u32 carry compare #3080

Open
RVZO6 wants to merge 1 commit from upstream-pr/3082 into main
RVZO6 commented 2026-11-26 06:57:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by RVZO6 on 2026-11-26T06:57:13Z.


Problem

Three correctness issues in 64-bit integer multiply-add lowering (crates/victory-shader/src/emit/lower.rs):

  1. v_mad_i64_i32 32-bit literal in src2 is zero-extended instead of sign-extended:
    src64 and src64_dwords checked inst.name().ends_with("_i64"), missing v_mad_i64_i32 (which ends in "_i32") even though its 64-bit addend src2 is signed i64 (AMD RDNA2 ISA literal extension rules; Mesa aco_opcodes.py v_mad_i64_i32 src(U32, U32, I64)). A negative 32-bit literal such as -100 (0xFFFF_FF9C) zero-extended to +4_294_967_196 (hi = 0) instead of sign-extending to -100 (hi = 0xFFFF_FFFF).
  2. Unmodeled v.clamp and v.omod silently ignored on v_mad_u64_u32 and v_mad_i64_i32:
    Both opcodes bypass write_i and call self.write directly, silently dropping v.clamp (a valid saturating modifier on VOP3b_I64_I1_I32_I32_I64: HasClamp = 1 in LLVM VOP3Instructions.td) and v.omod.
  3. v_mad_u64_u32 carry-out emits 64-bit icmp ult i64:
    Line 6033 was the last remaining 64-bit integer ordering comparison in lower.rs, which AMD's D3D12 shader compiler misorders as if low and high dwords were swapped (documented in #1599 / lower.rs:7958).

Fix

  • Match inst.name() == "v_mad_i64_i32" alongside ends_with("_i64") for 32-bit literal sign-extension in src64 and src64_dwords.
  • Reject v.clamp || v.omod != 0 with Err("integer output modifiers") in v_mad_u64_u32 / v_mad_i64_i32, matching write_i.
  • Read src2 via src64_dwords (keeping flags::INT64) and compute v_mad_u64_u32 carry-out via 32-bit unsigned dword comparisons: (hi <u add_hi) || (hi == add_hi && lo <u add_lo).

Tests & Verification

  • Added emit::valu_tests::v_mad_i64_i32_and_v_mad_u64_u32_literal_modifiers_and_carry in crates/victory-shader/src/emit/valu_tests.rs:
    • Negative control (before fix): fails immediately (op 0x176 clamp=true omod=0 should be refused, got None).
    • After fix: verified green on Windows MSVC + WARP SM 6.6 CI (run 45768895488): all 6 modifier-refusal cases, all 5 signed v_mad_i64_i32 negative-literal cases (both low and high dwords), and all 6 v_mad_u64_u32 carry-out boundary cases pass on WARP SM 6.6 + dxil.dll validation (victory-shader: 304 passed, 0 failed; clippy default & --all-features clean; xtask policy clean).
  • Not run: the title; any hardware GPU.

Claimed in #1633.
AI-assisted: T3 Code (Antigravity, gemini-4-neon).

<!-- greyfinch-sync:Marvisak/VIctory:issue:5505483449 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3082). Originally posted by [RVZO6](https://github.com/RVZO6) on 2026-11-26T06:57:13Z. --- ### Problem Three correctness issues in 64-bit integer multiply-add lowering (`crates/victory-shader/src/emit/lower.rs`): 1. **`v_mad_i64_i32` 32-bit literal in `src2` is zero-extended instead of sign-extended**: `src64` and `src64_dwords` checked `inst.name().ends_with("_i64")`, missing `v_mad_i64_i32` (which ends in `"_i32"`) even though its 64-bit addend `src2` is signed `i64` (AMD RDNA2 ISA literal extension rules; Mesa `aco_opcodes.py` `v_mad_i64_i32` `src(U32, U32, I64)`). A negative 32-bit literal such as `-100` (`0xFFFF_FF9C`) zero-extended to `+4_294_967_196` (`hi = 0`) instead of sign-extending to `-100` (`hi = 0xFFFF_FFFF`). 2. **Unmodeled `v.clamp` and `v.omod` silently ignored on `v_mad_u64_u32` and `v_mad_i64_i32`**: Both opcodes bypass `write_i` and call `self.write` directly, silently dropping `v.clamp` (a valid saturating modifier on `VOP3b_I64_I1_I32_I32_I64`: `HasClamp = 1` in LLVM `VOP3Instructions.td`) and `v.omod`. 3. **`v_mad_u64_u32` carry-out emits 64-bit `icmp ult i64`**: Line 6033 was the last remaining 64-bit integer ordering comparison in `lower.rs`, which AMD's D3D12 shader compiler misorders as if low and high dwords were swapped (documented in #1599 / `lower.rs:7958`). ### Fix - Match `inst.name() == "v_mad_i64_i32"` alongside `ends_with("_i64")` for 32-bit literal sign-extension in `src64` and `src64_dwords`. - Reject `v.clamp || v.omod != 0` with `Err("integer output modifiers")` in `v_mad_u64_u32` / `v_mad_i64_i32`, matching `write_i`. - Read `src2` via `src64_dwords` (keeping `flags::INT64`) and compute `v_mad_u64_u32` carry-out via 32-bit unsigned dword comparisons: `(hi <u add_hi) || (hi == add_hi && lo <u add_lo)`. ### Tests & Verification - Added `emit::valu_tests::v_mad_i64_i32_and_v_mad_u64_u32_literal_modifiers_and_carry` in `crates/victory-shader/src/emit/valu_tests.rs`: - **Negative control (before fix)**: fails immediately (`op 0x176 clamp=true omod=0 should be refused, got None`). - **After fix**: verified green on Windows MSVC + WARP SM 6.6 CI ([run 45768895488](https://github.com/RVZO6/VIctory/actions/runs/45768895488)): all 6 modifier-refusal cases, all 5 signed `v_mad_i64_i32` negative-literal cases (both low and high dwords), and all 6 `v_mad_u64_u32` carry-out boundary cases pass on WARP SM 6.6 + `dxil.dll` validation (`victory-shader`: 304 passed, 0 failed; clippy default & `--all-features` clean; `xtask policy` clean). - **Not run:** the title; any hardware GPU. Claimed in #1633. AI-assisted: T3 Code (Antigravity, gemini-4-neon).
Dukestar69 commented 2026-11-26 07:09:11 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T07:09:11Z.

Review: APPROVED


Tested locally merged onto origin/main (63bcca4) on Windows 11 x64 (NVIDIA GeForce RTX 5090 + WARP + dxil.dll):

  • cargo test -p victory-shader v_mad_ -- --test-threads=1 (RTX 5090 & WARP): 1 passed, 0 failed on both (v_mad_i64_i32_and_v_mad_u64_u32_literal_modifiers_and_carry).
  • cargo clippy -p victory-shader --all-targets -- -D warnings: clean.
  • cargo xtask policy: 191 files ok.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6069860164 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3082#pullrequestreview-6069860164). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-26T07:09:11Z. **Review:** APPROVED --- Tested locally merged onto `origin/main` (`63bcca4`) on Windows 11 x64 (NVIDIA GeForce RTX 5090 + WARP + `dxil.dll`): - `cargo test -p victory-shader v_mad_ -- --test-threads=1` (RTX 5090 & WARP): 1 passed, 0 failed on both (`v_mad_i64_i32_and_v_mad_u64_u32_literal_modifiers_and_carry`). - `cargo clippy -p victory-shader --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 191 files ok. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
oni-swr commented 2026-11-26 08:03:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-26T07:11:13Z.


Independent Windows verification of #3082 at 079d8f99 against exact parent 63bcca43 (carry-out of v_mad_u64_u32 only; the signed-literal part is covered by #2254/#2774 and the author's own WARP test, so I left it alone). Synthetic shaders, no game files, no physical GPU used.

Adapter. Only Host::new(true) (WARP) was used; no hardware path was run. Before any dispatch the test read the DXGI adapter behind the device: Microsoft Basic Render Driver, software flag set, vendor 0x1414, device 0x8c (d3d10warp.dll 10.0.26100.9818). It skips if that is not confirmed; it did not skip. VICTORY_D3D12_WARP=1 was set in the environment, but the shader test host does not read it (it reads VICTORY_WARP, and I passed true explicitly), so the adapter evidence is the DXGI query above, not that variable.

Validation. Windows SDK 10.0.26100.0 dxil.dll (1.8.2502.11), loaded explicitly and required (the shared build_valu_cs silently skips validation if the DLL does not load). The carry, low-dword and high-dword shaders all validated.

Test. v_mad_u64_u32 v[6:7], s[12:13], v1, v2, v[3:4], three shaders (carry lane bit, result low dword, result high dword), compared with a host u64::overflowing_add oracle on a*b + addend. 20,844 cases / 62,532 dispatches:

  • 4,096 grid cases: a, b, addend lo, addend hi each from {0, 1, 2, 0x7fffffff, 0x80000000, 0xfffffffe, 0xffffffff, 0x12345678}.
  • 252 cases with a*b < 2^32 and the addend's low dword set to wrap the product's low dword (-1, 0, +1 around the wrap point, 0, 1, 0xffffffff), against six high dwords. These are the cases where the result's high dword equals the addend's.
  • 112 full-width wrap cases (large products with addends at, just below and just above 2^64 - product).
  • 16,384 fixed-seed xorshift cases.
  • 4,799 cases carried out (the same 4,799 the oracle says wrap).

Results (WARP).

Tree Mismatches
#3082 079d8f99 0 of 20,844 (carry and full 64-bit result)
Exact parent 63bcca43 0 of 20,844
#3082 with the carry deliberately mutated to compare low dword first (the swapped-dword order) 9,414 of 20,844, e.g. 1*1 + 0xffffffff reports carry 1

What this does and does not show. The patched lowering agrees with the integer oracle on WARP across all of these, including equal high dwords and full-width wrap, so the dword form of the comparison is correct. The oracle can fail: the mutated carry is caught. But the exact parent also passes on WARP, so this test cannot tell parent from patch; WARP does not reproduce the 64-bit icmp ult misordering the PR describes (#1599), and I make no claim about AMD's or any hardware compiler's behaviour. The motivation for the change needs an AMD adapter.

Not covered: signed v_mad_i64_i32, literals, clamp/omod refusal, any hardware GPU.

AI use: Claude Code (Claude Sonnet 5.5) for the work; coordinated by Codex (gpt-6.2-sol). Coordination: https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7185048463

<!-- greyfinch-sync:Marvisak/VIctory:comment:7185186363 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3082#issuecomment-7185186363). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-26T07:11:13Z. --- Independent Windows verification of #3082 at 079d8f99 against exact parent 63bcca43 (carry-out of `v_mad_u64_u32` only; the signed-literal part is covered by #2254/#2774 and the author's own WARP test, so I left it alone). Synthetic shaders, no game files, no physical GPU used. **Adapter.** Only `Host::new(true)` (WARP) was used; no hardware path was run. Before any dispatch the test read the DXGI adapter behind the device: `Microsoft Basic Render Driver`, software flag set, vendor 0x1414, device 0x8c (`d3d10warp.dll` 10.0.26100.9818). It skips if that is not confirmed; it did not skip. `VICTORY_D3D12_WARP=1` was set in the environment, but the shader test host does not read it (it reads `VICTORY_WARP`, and I passed `true` explicitly), so the adapter evidence is the DXGI query above, not that variable. **Validation.** Windows SDK 10.0.26100.0 `dxil.dll` (1.8.2502.11), loaded explicitly and required (the shared `build_valu_cs` silently skips validation if the DLL does not load). The carry, low-dword and high-dword shaders all validated. **Test.** `v_mad_u64_u32 v[6:7], s[12:13], v1, v2, v[3:4]`, three shaders (carry lane bit, result low dword, result high dword), compared with a host `u64::overflowing_add` oracle on `a*b + addend`. 20,844 cases / 62,532 dispatches: - 4,096 grid cases: a, b, addend lo, addend hi each from {0, 1, 2, 0x7fffffff, 0x80000000, 0xfffffffe, 0xffffffff, 0x12345678}. - 252 cases with a*b < 2^32 and the addend's low dword set to wrap the product's low dword (-1, 0, +1 around the wrap point, 0, 1, 0xffffffff), against six high dwords. These are the cases where the result's high dword equals the addend's. - 112 full-width wrap cases (large products with addends at, just below and just above 2^64 - product). - 16,384 fixed-seed xorshift cases. - 4,799 cases carried out (the same 4,799 the oracle says wrap). **Results (WARP).** | Tree | Mismatches | |---|---| | #3082 079d8f99 | 0 of 20,844 (carry and full 64-bit result) | | Exact parent 63bcca43 | 0 of 20,844 | | #3082 with the carry deliberately mutated to compare low dword first (the swapped-dword order) | 9,414 of 20,844, e.g. `1*1 + 0xffffffff` reports carry 1 | **What this does and does not show.** The patched lowering agrees with the integer oracle on WARP across all of these, including equal high dwords and full-width wrap, so the dword form of the comparison is correct. The oracle can fail: the mutated carry is caught. But the exact parent also passes on WARP, so this test cannot tell parent from patch; WARP does not reproduce the 64-bit `icmp ult` misordering the PR describes (#1599), and I make no claim about AMD's or any hardware compiler's behaviour. The motivation for the change needs an AMD adapter. Not covered: signed `v_mad_i64_i32`, literals, clamp/omod refusal, any hardware GPU. AI use: Claude Code (Claude Sonnet 5.5) for the work; coordinated by Codex (gpt-6.2-sol). Coordination: https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7185048463
fuzeofficlal commented 2026-11-26 08:29:41 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T08:29:41Z.

Review: CHANGES_REQUESTED


The signed literal extension in src64_dwords (crates/victory-shader/src/emit/lower.rs:6797-6805) and the split unsigned carry comparison (hi_lt || (hi_eq && lo_lt)) look right, and local valu_tests + cargo clippy -p victory-shader --all-targets -- -D warnings pass on Windows 11 (RTX 5090 + WARP).

Two issues remain in the modified MAD lowering branch (crates/victory-shader/src/emit/lower.rs:6014-6055):

  1. Missing sdst lowering for v_mad_i64_i32: Both v_mad_i64_i32 and v_mad_u64_u32 decode as VOP3B with an explicit scalar lane-mask destination (gfx10/fields.rs, ir.rs, structure.rs), yet emit/lower.rs:6038-6055 only populates lane_bits when !signed. If a shader consumes the scalar destination of v_mad_i64_i32 (for example in a subsequent v_cndmask_b32), lowering fails with a missing lane-mask value. Per LLVM's AMDGPU lowering (AMDGPURegisterBankInfo::applyMappingMAD_64_32), signed sdst is bit 64 of the 65-bit mathematical sum (sign(P) ^ sign(A) ^ (R <u A) — note this differs from both unsigned carry and signed i64 overflow). Please lower sdst for v_mad_i64_i32 as well and add a test that consumes sdst.
  2. clamp vs omod refusal rationale: emit/lower.rs:6014-6016 rejects both clamp and omod together. While omod is float-only, LLVM's GFX10/GFX1030 tables allow clamp on both MAD opcodes. Please document the unsupported clamp rejection separately from omod (or clarify expected hardware behavior for clamp on both vdst and sdst).
<!-- greyfinch-sync:Marvisak/VIctory:review:6070711793 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3082#pullrequestreview-6070711793). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-26T08:29:41Z. **Review:** CHANGES_REQUESTED --- The signed literal extension in `src64_dwords` (`crates/victory-shader/src/emit/lower.rs:6797-6805`) and the split unsigned carry comparison (`hi_lt || (hi_eq && lo_lt)`) look right, and local `valu_tests` + `cargo clippy -p victory-shader --all-targets -- -D warnings` pass on Windows 11 (RTX 5090 + WARP). Two issues remain in the modified MAD lowering branch (`crates/victory-shader/src/emit/lower.rs:6014-6055`): 1. **Missing `sdst` lowering for `v_mad_i64_i32`**: Both `v_mad_i64_i32` and `v_mad_u64_u32` decode as VOP3B with an explicit scalar lane-mask destination (`gfx10/fields.rs`, `ir.rs`, `structure.rs`), yet `emit/lower.rs:6038-6055` only populates `lane_bits` when `!signed`. If a shader consumes the scalar destination of `v_mad_i64_i32` (for example in a subsequent `v_cndmask_b32`), lowering fails with a missing lane-mask value. Per LLVM's AMDGPU lowering (`AMDGPURegisterBankInfo::applyMappingMAD_64_32`), signed `sdst` is bit 64 of the 65-bit mathematical sum (`sign(P) ^ sign(A) ^ (R <u A)` — note this differs from both unsigned carry and signed `i64` overflow). Please lower `sdst` for `v_mad_i64_i32` as well and add a test that consumes `sdst`. 2. **`clamp` vs `omod` refusal rationale**: `emit/lower.rs:6014-6016` rejects both `clamp` and `omod` together. While `omod` is float-only, LLVM's GFX10/GFX1030 tables allow `clamp` on both MAD opcodes. Please document the unsupported `clamp` rejection separately from `omod` (or clarify expected hardware behavior for `clamp` on both `vdst` and `sdst`).
Marvisak commented 2026-11-26 09:06:06 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T08:22:26Z.


Automated triage for the maintainers.

Needs work. This overlaps two open PRs that already carry the triage merge-candidate label:

  • The v_mad_i64_i32 literal sign-extension in Lower::src64 / src64_dwords is #2254, which cites RDNA 2 ISA §6.2.1.
  • Refusing clamp on v_mad_u64_u32/v_mad_i64_i32 is in #171, which also reworks the carry-out of the same match arm.

The part only this PR has is the carry-out of v_mad_u64_u32 computed on the two dwords instead of icmp ult i64. That is consistent with the documented AMD workaround for 64-bit v_cmp in lower.rs. The dword comparison hi < add_hi || (hi == add_hi && lo < add_lo) is correct, and oni-swr's WARP oracle found no mismatches. Please narrow this PR to that carry change, and coordinate with #171 so that its signed carry (sum < prod on i64) gets the same dword form. A narrowed PR would be re-reviewed. CI: passing.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7186515657 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3082#issuecomment-7186515657). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-26T08:22:26Z. --- <!-- victory-triage v1 head=079d8f99366cb27c405dfcaac5deef1d706ba432 verdict=needs-work at=2026-11-26T08:18:02Z --> Automated triage for the maintainers. Needs work. This overlaps two open PRs that already carry the triage merge-candidate label: - The `v_mad_i64_i32` literal sign-extension in `Lower::src64` / `src64_dwords` is #2254, which cites RDNA 2 ISA §6.2.1. - Refusing `clamp` on `v_mad_u64_u32`/`v_mad_i64_i32` is in #171, which also reworks the carry-out of the same match arm. The part only this PR has is the carry-out of `v_mad_u64_u32` computed on the two dwords instead of `icmp ult i64`. That is consistent with the documented AMD workaround for 64-bit `v_cmp` in `lower.rs`. The dword comparison `hi < add_hi || (hi == add_hi && lo < add_lo)` is correct, and oni-swr's WARP oracle found no mismatches. Please narrow this PR to that carry change, and coordinate with #171 so that its signed carry (`sum < prod` on i64) gets the same dword form. A narrowed PR would be re-reviewed. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
murillojndem commented 2026-11-28 05:54:03 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by murillojndem on 2026-11-28T05:54:03Z.


Hardware data for the carry part, from an AMD Radeon RX 7900 XT (RDNA 3, driver 32.0.32015.7029), Windows 11. Synthetic shaders only, no game files.

The test checks the carry and both result dwords of v_mad_u64_u32 against a * b + c computed in 128 bits (6 x 6 factors, 9 addends), with the addend in v[3:4] and in v[2:3], where it shares v2 with the second factor. It ran on fxceless/victory-fork, whose carry is the same icmp ult on i64 as upstream's before this PR.

  • With the i64 compare: 124 of 324 carries wrong on the card with the addend in v[2:3], none with it in v[3:4]. The result dwords are right in both forms, and WARP is right everywhere.
  • With the carry compared on the dwords: no mismatch on the card or on WARP.

The change and the test are in fxceless/victory-fork#1507.

AI use: Claude Code ran the tests and drafted this comment; posted at my request.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7234954679 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3082#issuecomment-7234954679). Originally posted by [murillojndem](https://github.com/murillojndem) on 2026-11-28T05:54:03Z. --- Hardware data for the carry part, from an AMD Radeon RX 7900 XT (RDNA 3, driver 32.0.32015.7029), Windows 11. Synthetic shaders only, no game files. The test checks the carry and both result dwords of `v_mad_u64_u32` against `a * b + c` computed in 128 bits (6 x 6 factors, 9 addends), with the addend in v[3:4] and in v[2:3], where it shares v2 with the second factor. It ran on fxceless/victory-fork, whose carry is the same `icmp ult` on i64 as upstream's before this PR. - With the i64 compare: 124 of 324 carries wrong on the card with the addend in v[2:3], none with it in v[3:4]. The result dwords are right in both forms, and WARP is right everywhere. - With the carry compared on the dwords: no mismatch on the card or on WARP. The change and the test are in fxceless/victory-fork#1507. AI use: Claude Code ran the tests and drafted this comment; posted at my request.
andrewpozdnakov7-jpg commented 2026-11-28 06:03:02 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T06:03:02Z.


The RX 7900 XT report above exercises a register layout that the existing test does not cover. I added six cases with v2 used as both the second factor and the low dword of the addend. The test checks both result dwords and the carry against a Rust u128 calculation. The test-only commit feb6e3f applies directly to 079d8f9.

It passed on Windows with app-local WARP 1.0.22, Agility 1.620.2 and the DXIL 1.9.2609 validator. The disassembled carry shader contains two unsigned 32-bit comparisons. Strict shader Clippy and the asset policy passed. The local hardware adapter could not create an SM 6.6 device, so the hardware result still comes from murillojndem's report.

RVZO6 can pick up the test, then murillojndem can run it on the RX 7900 XT if available.

Please retain the Git author on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding the test into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7235047224 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3082#issuecomment-7235047224). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T06:03:02Z. --- The RX 7900 XT report above exercises a register layout that the existing test does not cover. I added six cases with `v2` used as both the second factor and the low dword of the addend. The test checks both result dwords and the carry against a Rust `u128` calculation. The test-only commit [feb6e3f](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/feb6e3f155a259b3596cf6cb9058b0a386332079) applies directly to `079d8f9`. It passed on Windows with app-local WARP 1.0.22, Agility 1.620.2 and the DXIL 1.9.2609 validator. The disassembled carry shader contains two unsigned 32-bit comparisons. Strict shader Clippy and the asset policy passed. The local hardware adapter could not create an SM 6.6 device, so the hardware result still comes from murillojndem's report. RVZO6 can pick up the test, then murillojndem can run it on the RX 7900 XT if available. Please retain the Git author on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding the test into another commit. AI-assisted with OpenAI Codex.
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/3082:upstream-pr/3082'
git switch 'upstream-pr/3082'

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