shader: lower v_mad_u32_u16, v_mad_i32_i16, v_mad_u16 and v_mad_i16 #73

Closed
lcg007xd-c wants to merge 0 commits from upstream-pr/73 into main
lcg007xd-c commented 2026-11-25 21:41:23 +00:00 (Migrated from github.com)

Imported from uiliannn/VItoriaBr. Originally posted by lcg007xd-c on 2026-11-25T21:41:23Z.


What is broken

The 16-bit multiply-adds decode but do not translate:

Opcode Instruction
VOP3 0x373 v_mad_u32_u16
VOP3 0x375 v_mad_i32_i16
VOP3 0x340 v_mad_u16
VOP3 0x35E v_mad_i16

A program using one fails with v_mad_u32_u16 is not supported (and likewise for the others). I found them by translating a one-instruction program for every VOP3 opcode the decoder names. The 24-bit forms (v_mad_u32_u24, v_mad_i32_i24) already lower.

Semantics (AMD's RDNA2 ISA, §12.12, opcodes 832, 862, 883, 885)

  • v_mad_u32_u16: D.u32 = S0.u16 * S1.u16 + S2.u32. v_mad_i32_i16 is the same with signed 16-bit factors and a 32-bit sum. op_sel picks which half of src0 and src1 is read.
  • v_mad_u16: D.u16 = S0.u16 * S1.u16 + S2.u16, which "supports saturation (… 16-bit integer domain)". v_mad_i16 is the same with signed values. The 16-bit result goes to the half op_sel[3] selects, and the other half is kept.

The change (emit/lower.rs)

  • v_mad_u32_u16 / v_mad_i32_i16 (in integer, beside the 24-bit forms): the two halves come from half_src, which honours op_sel, and are sign-extended for the signed form. The sum wraps. Clamp is still refused here, as for the other 32-bit integer operations.
  • v_mad_u16 / v_mad_i16 (in valu16_op): three halves, sign-extended for _i16. The exact sum fits in 32 bits: at most 0xFFFE0001 + 0xFFFF unsigned, and within ±2³⁰ + 2¹⁵ signed. So clamp compares the exact value with the 16-bit limits. Then write_half writes it.

Tests

  • emit::lower::tests::sixteen_bit_multiply_adds_translate (every host): each encoding decodes to its name, and a program that stores the result translates. The 16-bit-result forms are also tried with clamp. Without the lower.rs change it fails: v_mad_u32_u16 clamp 0: GFX10 code at 0x24: v_mad_u32_u16 is not supported.
  • valu_tests::sixteen_bit_multiply_adds_match_rdna2 (Windows/GPU): two hand-computed cases per opcode, the 16-bit-result ones with and without clamp. They cover 0xFFFF * 0xFFFF, a wrapping 32-bit sum, −1 × −32768, and saturation at both 16-bit ends. Every source has junk in the high half it must not read.
  • CPU run: I ran the same cases on Linux through the CPU harness of #62, which runs the emitted DXIL with LLVM's lli. I added three op_sel cases: high halves of src0/src1 for both 32-bit forms, and v_mad_i16 reading src2's high half and writing v0's high half with clamp. I also checked clamped v_mad_i16/v_mad_u16 against a Rust reference on a 9 × 11 grid. All match.

Run here (Linux, Rust 1.98.1):

  • cargo test -p victory-shader --lib --locked: 188 passed, 0 failed, 2 ignored.
  • Portable clippy and CARGO_FEATURE_PURE=1 cargo clippy -p victory-shader --all-targets --target x86_64-pc-windows-msvc -- -D warnings: clean.

Not run here: the GPU case, since I have no Windows machine. The test and the GPU case sit at different places in their files from those of #65 and #71, so the three merge in any order.

🤖 Generated with Claude Code

<!-- greyfinch-sync:uiliannn/VItoriaBr:issue:5499648098 --> Imported from [uiliannn/VItoriaBr](https://github.com/uiliannn/VitoriaBr2.0/pull/73). Originally posted by [lcg007xd-c](https://github.com/lcg007xd-c) on 2026-11-25T21:41:23Z. --- ## What is broken The 16-bit multiply-adds decode but do not translate: | Opcode | Instruction | |---|---| | VOP3 0x373 | `v_mad_u32_u16` | | VOP3 0x375 | `v_mad_i32_i16` | | VOP3 0x340 | `v_mad_u16` | | VOP3 0x35E | `v_mad_i16` | A program using one fails with `v_mad_u32_u16 is not supported` (and likewise for the others). I found them by translating a one-instruction program for every VOP3 opcode the decoder names. The 24-bit forms (`v_mad_u32_u24`, `v_mad_i32_i24`) already lower. ## Semantics (AMD's RDNA2 ISA, §12.12, opcodes 832, 862, 883, 885) - **`v_mad_u32_u16`:** `D.u32 = S0.u16 * S1.u16 + S2.u32`. `v_mad_i32_i16` is the same with signed 16-bit factors and a 32-bit sum. `op_sel` picks which half of src0 and src1 is read. - **`v_mad_u16`:** `D.u16 = S0.u16 * S1.u16 + S2.u16`, which "supports saturation (… 16-bit integer domain)". `v_mad_i16` is the same with signed values. The 16-bit result goes to the half `op_sel[3]` selects, and the other half is kept. ## The change (`emit/lower.rs`) - **`v_mad_u32_u16` / `v_mad_i32_i16`** (in `integer`, beside the 24-bit forms): the two halves come from `half_src`, which honours `op_sel`, and are sign-extended for the signed form. The sum wraps. Clamp is still refused here, as for the other 32-bit integer operations. - **`v_mad_u16` / `v_mad_i16`** (in `valu16_op`): three halves, sign-extended for `_i16`. The exact sum fits in 32 bits: at most `0xFFFE0001 + 0xFFFF` unsigned, and within ±2³⁰ + 2¹⁵ signed. So clamp compares the exact value with the 16-bit limits. Then `write_half` writes it. ## Tests - **`emit::lower::tests::sixteen_bit_multiply_adds_translate`** (every host): each encoding decodes to its name, and a program that **stores** the result translates. The 16-bit-result forms are also tried with clamp. Without the `lower.rs` change it fails: `v_mad_u32_u16 clamp 0: GFX10 code at 0x24: v_mad_u32_u16 is not supported`. - **`valu_tests::sixteen_bit_multiply_adds_match_rdna2`** (Windows/GPU): two hand-computed cases per opcode, the 16-bit-result ones with and without clamp. They cover `0xFFFF * 0xFFFF`, a wrapping 32-bit sum, −1 × −32768, and saturation at both 16-bit ends. Every source has junk in the high half it must not read. - **CPU run:** I ran the same cases on Linux through the CPU harness of #62, which runs the emitted DXIL with LLVM's `lli`. I added three `op_sel` cases: high halves of src0/src1 for both 32-bit forms, and `v_mad_i16` reading src2's high half and writing v0's high half with clamp. I also checked clamped `v_mad_i16`/`v_mad_u16` against a Rust reference on a 9 × 11 grid. All match. **Run here** (Linux, Rust 1.98.1): - `cargo test -p victory-shader --lib --locked`: 188 passed, 0 failed, 2 ignored. - Portable clippy and `CARGO_FEATURE_PURE=1 cargo clippy -p victory-shader --all-targets --target x86_64-pc-windows-msvc -- -D warnings`: clean. **Not run here:** the GPU case, since I have no Windows machine. The test and the GPU case sit at different places in their files from those of #65 and #71, so the three merge in any order. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
lmouz823-lang commented 2026-11-28 02:32:53 +00:00 (Migrated from github.com)

Imported from uiliannn/VItoriaBr. Originally posted by lmouz823-lang on 2026-11-28T02:32:53Z.


I can take Windows GPU validation at exact head fe7f00f0f5618bb3e900558d5ef872480be75e6f. I will run the exact translation and multiply-add GPU tests on RTX 4060 Laptop and WARP with the SDK DXIL validator, then add a small fixed-expectation regression for op_sel high-half source selection, destination-half selection and preservation of a nonzero unwritten half. I will include a temporary negative control, restore the implementation and report actual execution and any test-only patch here. AI-assisted with Codex.

<!-- greyfinch-sync:uiliannn/VItoriaBr:comment:7232435965 --> Imported from [uiliannn/VItoriaBr](https://github.com/uiliannn/VItoriaBr/pull/73#issuecomment-7232435965). Originally posted by [lmouz823-lang](https://github.com/lmouz823-lang) on 2026-11-28T02:32:53Z. --- I can take Windows GPU validation at exact head `fe7f00f0f5618bb3e900558d5ef872480be75e6f`. I will run the exact translation and multiply-add GPU tests on RTX 4060 Laptop and WARP with the SDK DXIL validator, then add a small fixed-expectation regression for op_sel high-half source selection, destination-half selection and preservation of a nonzero unwritten half. I will include a temporary negative control, restore the implementation and report actual execution and any test-only patch here. AI-assisted with Codex.
lmouz823-lang commented 2026-11-28 04:04:32 +00:00 (Migrated from github.com)

Imported from uiliannn/VItoriaBr. Originally posted by lmouz823-lang on 2026-11-28T04:04:32Z.


Native Windows validation completed for exact head fe7f00f0f5618bb3e900558d5ef872480be75e6f on RTX 4060 Laptop and WARP.

The original translation and GPU tests each execute exactly one test and pass. The original GPU cases perform 12 dispatches per backend. I added one GPU regression with 18 fixed expectation rows, covering 30 opcode/modifier configurations and 30 dispatches per backend, 60 total. It also passes on both backends with VICTORY_STRICT_TESTS=1 and no skips. Each targeted invocation reports zero ignored tests. Coverage is limited to these exact shader tests and the listed checks.

The addition checks source-half selectors individually, both source high halves for the 32-bit forms, src2's high half for the 16-bit forms, both destination halves, and signed/unsigned 16-bit saturation. The 32-bit forms keep their full-width src2. An explicit v_mov_b32 v0, v4 seeds the destination with 0xA5A55A5A, and fixed full-dword expectations verify the unselected half survives. Expectations follow AMD's RDNA2 ISA, section 12.12.

A negative control temporarily discards the old destination value in write_half. The original GPU test still passes, while the new test fails on hardware at its first v_mad_u16 case with 0x00000011 instead of 0xA5A50011. After restoring the implementation and removing diagnostics, verified fresh compilation and final runs of both GPU tests and the original translation test all pass. A failed restoration attempt is archived separately and excluded from these final results.

The explicit SDK dxil.dll 1.8.2502.11 created IDxcValidator. Temporary diagnostics after the validation/hash assertions confirmed all 30 new shader modules and all six original modules reached that success point. The diagnostics are absent from the patch. Independent review checked the fixed values, instruction encodings, sentinel wiring, counts and final source restoration.

Environment was Windows 11 Pro build 26200, i9-14900HX, NVIDIA 610.88, Rust 1.98.1 MSVC, release. Package Clippy with --all-targets -- -D warnings, the asset policy (195 files), git diff --check, and rustfmt on the added function pass. The final diff adds only this test function, 147 lines. Native RDNA2 execution, game performance and the full workspace suite remain unverified.

Reproduction uses these exact filters with the usual Windows GPU build prerequisites and an installed SDK validator.

$env:VICTORY_STRICT_TESTS = '1'
$env:VICTORY_DXIL = 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\dxil.dll'
$tests = @(
    'emit::lower::tests::sixteen_bit_multiply_adds_translate',
    'emit::valu_tests::sixteen_bit_multiply_adds_match_rdna2',
    'emit::valu_tests::sixteen_bit_multiply_adds_select_halves_and_preserve_the_destination'
)
foreach ($test in $tests) {
    cargo test --release --locked -p victory-shader --lib $test -- --exact --nocapture --test-threads=1
}

AI assistance from Codex covered the test, execution, independent review and this report.

Test-only patch against this PR head
diff --git a/crates/victory-shader/src/emit/valu_tests.rs b/crates/victory-shader/src/emit/valu_tests.rs
index 8a82416..9bbf127 100644
--- a/crates/victory-shader/src/emit/valu_tests.rs
+++ b/crates/victory-shader/src/emit/valu_tests.rs
@@ -778,6 +778,153 @@ fn sixteen_bit_multiply_adds_match_rdna2() {
     }
 }
 
+#[test]
+fn sixteen_bit_multiply_adds_select_halves_and_preserve_the_destination() {
+    // RDNA2 ISA section 12.12, opcodes 832, 862, 883 and 885.
+    // Fixed full-dword expectations check source-half selection, saturation,
+    // and preservation of the unselected destination half independently.
+    type Case = ([u32; 3], u8, u32, Option<u32>);
+    let cases: [(u16, &str, &[Case]); 4] = [
+        (
+            0x373,
+            "v_mad_u32_u16",
+            &[
+                ([0x0003_ABCD, 0x1234_0004, 0xFFFF_FFFF], 1, 11, None),
+                ([0xABCD_0003, 0x0004_1234, 0xFFFF_FFFF], 2, 11, None),
+                (
+                    [0xFFFF_0001, 0xFFFF_0002, 0x1234_0002],
+                    3,
+                    0x1232_0003,
+                    None,
+                ),
+            ],
+        ),
+        (
+            0x375,
+            "v_mad_i32_i16",
+            &[
+                ([0xFFFF_0003, 0x1234_8000, 5], 1, 0x8005, None),
+                ([0xABCD_FFFF, 0x8000_0002, 5], 2, 0x8005, None),
+                (
+                    [0x7FFF_FFFF, 0x7FFF_8000, 0x8000_0000],
+                    3,
+                    0xBFFF_0001,
+                    None,
+                ),
+            ],
+        ),
+        (
+            0x340,
+            "v_mad_u16",
+            &[
+                (
+                    [0xABCD_0003, 0x1234_0004, 0x5555_0005],
+                    0,
+                    0xA5A5_0011,
+                    Some(0xA5A5_0011),
+                ),
+                (
+                    [0xABCD_0003, 0x1234_0004, 0x5555_0005],
+                    8,
+                    0x0011_5A5A,
+                    Some(0x0011_5A5A),
+                ),
+                (
+                    [0x0100_0003, 0x1234_0100, 0x5555_0005],
+                    1,
+                    0xA5A5_0005,
+                    Some(0xA5A5_FFFF),
+                ),
+                (
+                    [0xABCD_0100, 0x0100_0004, 0x5555_0005],
+                    2,
+                    0xA5A5_0005,
+                    Some(0xA5A5_FFFF),
+                ),
+                (
+                    [0xABCD_0003, 0x1234_0004, 0x0005_5555],
+                    4,
+                    0xA5A5_0011,
+                    Some(0xA5A5_0011),
+                ),
+                (
+                    [0x0100_0003, 0x0100_0004, 0x0005_5555],
+                    15,
+                    0x0005_5A5A,
+                    Some(0xFFFF_5A5A),
+                ),
+            ],
+        ),
+        (
+            0x35E,
+            "v_mad_i16",
+            &[
+                (
+                    [0xABCD_4000, 0x1234_0002, 0x5555_0000],
+                    0,
+                    0xA5A5_8000,
+                    Some(0xA5A5_7FFF),
+                ),
+                (
+                    [0xABCD_8000, 0x1234_0001, 0x5555_FFFF],
+                    8,
+                    0x7FFF_5A5A,
+                    Some(0x8000_5A5A),
+                ),
+                (
+                    [0xFFFF_0003, 0x1234_8000, 0x5555_0005],
+                    1,
+                    0xA5A5_8005,
+                    Some(0xA5A5_7FFF),
+                ),
+                (
+                    [0xABCD_FFFF, 0x8000_0002, 0x5555_0005],
+                    2,
+                    0xA5A5_8005,
+                    Some(0xA5A5_7FFF),
+                ),
+                (
+                    [0xABCD_8000, 0x1234_0001, 0xFFFF_0005],
+                    4,
+                    0xA5A5_7FFF,
+                    Some(0xA5A5_8000),
+                ),
+                (
+                    [0x4000_0003, 0x0002_0004, 0x0000_5555],
+                    15,
+                    0x8000_5A5A,
+                    Some(0x7FFF_5A5A),
+                ),
+            ],
+        ),
+    ];
+    for (op, name, cases) in cases {
+        for (i, &(inputs, opsel, unclamped, clamped)) in cases.iter().enumerate() {
+            for clamp in [false, true] {
+                let want = if clamp {
+                    let Some(want) = clamped else { continue };
+                    want
+                } else {
+                    unclamped
+                };
+                let [w0, w1] = vop3_mod(op, 0, vgpr(1), vgpr(2), vgpr(3), 0, 0, 0, clamp);
+                let shader = build_valu_cs(&[
+                    vop1(0x001, 0, vgpr(4)), // seed both destination halves from s3
+                    w0 | u32::from(opsel) << 11,
+                    w1,
+                ]);
+                let input = [inputs[0], inputs[1], inputs[2], 0xA5A5_5A5A];
+                run_cases(&shader, &[input], |backend, _, _, got| {
+                    assert_eq!(
+                        got, want,
+                        "{backend}: {name} op_sel {opsel:#x}, clamp {clamp}, case {i}"
+                    );
+                });
+            }
+        }
+    }
+}
+
 #[test]
 fn v_sin_and_v_cos_f32_reduce_large_turns() {
     let sin_shader = build_valu_cs(&[vop1(0x035, 0, vgpr(1))]);
<!-- greyfinch-sync:uiliannn/VItoriaBr:comment:7233659993 --> Imported from [uiliannn/VItoriaBr](https://github.com/uiliannn/VItoriaBr/pull/73#issuecomment-7233659993). Originally posted by [lmouz823-lang](https://github.com/lmouz823-lang) on 2026-11-28T04:04:32Z. --- Native Windows validation completed for exact head `fe7f00f0f5618bb3e900558d5ef872480be75e6f` on RTX 4060 Laptop and WARP. The original translation and GPU tests each execute exactly one test and pass. The original GPU cases perform 12 dispatches per backend. I added one GPU regression with 18 fixed expectation rows, covering 30 opcode/modifier configurations and **30 dispatches per backend, 60 total**. It also passes on both backends with `VICTORY_STRICT_TESTS=1` and no skips. Each targeted invocation reports zero ignored tests. Coverage is limited to these exact shader tests and the listed checks. The addition checks source-half selectors individually, both source high halves for the 32-bit forms, src2's high half for the 16-bit forms, both destination halves, and signed/unsigned 16-bit saturation. The 32-bit forms keep their full-width src2. An explicit `v_mov_b32 v0, v4` seeds the destination with `0xA5A55A5A`, and fixed full-dword expectations verify the unselected half survives. Expectations follow [AMD's RDNA2 ISA, section 12.12](https://docs.amd.com/v/u/en-US/rdna2-shader-instruction-set-architecture). A negative control temporarily discards the old destination value in `write_half`. The original GPU test still passes, while the new test fails on hardware at its first `v_mad_u16` case with `0x00000011` instead of `0xA5A50011`. After restoring the implementation and removing diagnostics, verified fresh compilation and final runs of both GPU tests and the original translation test all pass. A failed restoration attempt is archived separately and excluded from these final results. The explicit SDK `dxil.dll` 1.8.2502.11 created `IDxcValidator`. Temporary diagnostics after the validation/hash assertions confirmed all 30 new shader modules and all six original modules reached that success point. The diagnostics are absent from the patch. Independent review checked the fixed values, instruction encodings, sentinel wiring, counts and final source restoration. Environment was Windows 11 Pro build 26200, i9-14900HX, NVIDIA 610.88, Rust 1.98.1 MSVC, release. Package Clippy with `--all-targets -- -D warnings`, the asset policy (195 files), `git diff --check`, and rustfmt on the added function pass. The final diff adds only this test function, 147 lines. Native RDNA2 execution, game performance and the full workspace suite remain unverified. Reproduction uses these exact filters with the usual Windows GPU build prerequisites and an installed SDK validator. ```powershell $env:VICTORY_STRICT_TESTS = '1' $env:VICTORY_DXIL = 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64\dxil.dll' $tests = @( 'emit::lower::tests::sixteen_bit_multiply_adds_translate', 'emit::valu_tests::sixteen_bit_multiply_adds_match_rdna2', 'emit::valu_tests::sixteen_bit_multiply_adds_select_halves_and_preserve_the_destination' ) foreach ($test in $tests) { cargo test --release --locked -p victory-shader --lib $test -- --exact --nocapture --test-threads=1 } ``` AI assistance from Codex covered the test, execution, independent review and this report. <details> <summary>Test-only patch against this PR head</summary> ```diff diff --git a/crates/victory-shader/src/emit/valu_tests.rs b/crates/victory-shader/src/emit/valu_tests.rs index 8a82416..9bbf127 100644 --- a/crates/victory-shader/src/emit/valu_tests.rs +++ b/crates/victory-shader/src/emit/valu_tests.rs @@ -778,6 +778,153 @@ fn sixteen_bit_multiply_adds_match_rdna2() { } } +#[test] +fn sixteen_bit_multiply_adds_select_halves_and_preserve_the_destination() { + // RDNA2 ISA section 12.12, opcodes 832, 862, 883 and 885. + // Fixed full-dword expectations check source-half selection, saturation, + // and preservation of the unselected destination half independently. + type Case = ([u32; 3], u8, u32, Option<u32>); + let cases: [(u16, &str, &[Case]); 4] = [ + ( + 0x373, + "v_mad_u32_u16", + &[ + ([0x0003_ABCD, 0x1234_0004, 0xFFFF_FFFF], 1, 11, None), + ([0xABCD_0003, 0x0004_1234, 0xFFFF_FFFF], 2, 11, None), + ( + [0xFFFF_0001, 0xFFFF_0002, 0x1234_0002], + 3, + 0x1232_0003, + None, + ), + ], + ), + ( + 0x375, + "v_mad_i32_i16", + &[ + ([0xFFFF_0003, 0x1234_8000, 5], 1, 0x8005, None), + ([0xABCD_FFFF, 0x8000_0002, 5], 2, 0x8005, None), + ( + [0x7FFF_FFFF, 0x7FFF_8000, 0x8000_0000], + 3, + 0xBFFF_0001, + None, + ), + ], + ), + ( + 0x340, + "v_mad_u16", + &[ + ( + [0xABCD_0003, 0x1234_0004, 0x5555_0005], + 0, + 0xA5A5_0011, + Some(0xA5A5_0011), + ), + ( + [0xABCD_0003, 0x1234_0004, 0x5555_0005], + 8, + 0x0011_5A5A, + Some(0x0011_5A5A), + ), + ( + [0x0100_0003, 0x1234_0100, 0x5555_0005], + 1, + 0xA5A5_0005, + Some(0xA5A5_FFFF), + ), + ( + [0xABCD_0100, 0x0100_0004, 0x5555_0005], + 2, + 0xA5A5_0005, + Some(0xA5A5_FFFF), + ), + ( + [0xABCD_0003, 0x1234_0004, 0x0005_5555], + 4, + 0xA5A5_0011, + Some(0xA5A5_0011), + ), + ( + [0x0100_0003, 0x0100_0004, 0x0005_5555], + 15, + 0x0005_5A5A, + Some(0xFFFF_5A5A), + ), + ], + ), + ( + 0x35E, + "v_mad_i16", + &[ + ( + [0xABCD_4000, 0x1234_0002, 0x5555_0000], + 0, + 0xA5A5_8000, + Some(0xA5A5_7FFF), + ), + ( + [0xABCD_8000, 0x1234_0001, 0x5555_FFFF], + 8, + 0x7FFF_5A5A, + Some(0x8000_5A5A), + ), + ( + [0xFFFF_0003, 0x1234_8000, 0x5555_0005], + 1, + 0xA5A5_8005, + Some(0xA5A5_7FFF), + ), + ( + [0xABCD_FFFF, 0x8000_0002, 0x5555_0005], + 2, + 0xA5A5_8005, + Some(0xA5A5_7FFF), + ), + ( + [0xABCD_8000, 0x1234_0001, 0xFFFF_0005], + 4, + 0xA5A5_7FFF, + Some(0xA5A5_8000), + ), + ( + [0x4000_0003, 0x0002_0004, 0x0000_5555], + 15, + 0x8000_5A5A, + Some(0x7FFF_5A5A), + ), + ], + ), + ]; + for (op, name, cases) in cases { + for (i, &(inputs, opsel, unclamped, clamped)) in cases.iter().enumerate() { + for clamp in [false, true] { + let want = if clamp { + let Some(want) = clamped else { continue }; + want + } else { + unclamped + }; + let [w0, w1] = vop3_mod(op, 0, vgpr(1), vgpr(2), vgpr(3), 0, 0, 0, clamp); + let shader = build_valu_cs(&[ + vop1(0x001, 0, vgpr(4)), // seed both destination halves from s3 + w0 | u32::from(opsel) << 11, + w1, + ]); + let input = [inputs[0], inputs[1], inputs[2], 0xA5A5_5A5A]; + run_cases(&shader, &[input], |backend, _, _, got| { + assert_eq!( + got, want, + "{backend}: {name} op_sel {opsel:#x}, clamp {clamp}, case {i}" + ); + }); + } + } + } +} + #[test] fn v_sin_and_v_cos_f32_reduce_large_turns() { let sin_shader = build_valu_cs(&[vop1(0x035, 0, vgpr(1))]); ``` </details>

Pull request closed

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
uiliannn/VItoriaBr!73
No description provided.