From c921b244abec2ae82f76b4e231e855fd09a41bcf Mon Sep 17 00:00:00 2001 From: Vonsek <45567075+Vonsek@users.noreply.github.com> Date: Sun, 22 Nov 2026 18:15:11 +0100 Subject: rdna2spirv: v_mad_u32_u16 / v_mad_i32_i16 op_sel on S2 and D, and clamp These forms were refused. Measured on RDNA2 (gfx1036, raw kernels through tools/hw_oracle, wave32 and wave64): op_sel bit 2 adds S2[31:16] zero-extended (in the i16 op too), op_sel bit 3 writes the result shifted left by 16, and clamp saturates the sum to u32 / i32 before that shift. GPU test ps_valu16_mad_sel (4096/4096 on RTX 5080 and the gfx1036 iGPU), the same shader as a semantic fixture, test_alu_mad_32_16 checks the measured rule instead of the refusal, and a docs/design.md row (EGEN-HW-MAD-U32-U16). AI-assisted. --- scripts/run_gpu_tests.py | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts/run_gpu_tests.py') diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py index 698ec36d0..b9e99e352 100644 --- a/scripts/run_gpu_tests.py +++ b/scripts/run_gpu_tests.py @@ -1153,6 +1153,7 @@ def run_suite(a, work: str) -> int: "ps_interp_mov_mods": (0x3F800000, 0x3FC00000, 0x40000000, 0x3F400000), # v_mad_u32_u16 / v_mad_i32_i16 and v_subrev_f16, which had CPU checks only (.asm headers) "ps_valu16_mad": (0x00000002, 0x00030002, 0x00008000, 0x00000004), + "ps_valu16_mad_sel": (0x00008003, 0xDB880000, 0xFFFFFFFF, 0x80000000), # measured on gfx1036 "ps_valu16_subrev": (0xAAAABC00, 0xAAAAC000, 0xAAAA3C00, 0x42003800), "ps_w64x_readlane": (0x40000079, 0x40000010, 0x40000064, 0x400000BE), # same expectation as check.py } -- cgit v1.2.3