shader: lower v_pk_mul_lo_u16, v_pk_mad_u16 and v_pk_mad_i16 in the direct compute path #3092
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3092
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3092"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@R0D4X on GitHub · 2026-11-27 14:56 UTC · original
R0D4X:feat/native-pk-mul-mad-16→main· +253 −0 · 4 files · 1 commits · merged 2026-11-27 15:31 UTCFixes #3090. Refs #2935.
What this changes
v_pk_mul_lo_u16(0x01),v_pk_mad_u16(0x09), andv_pk_mad_i16(0x00) insrc/gfx1013_direct_compute.inl:op_sel[1:0]/op_sel_hi[1:0]) and 3-source (op_sel[2:0]/op_sel_hi[2:0]) lane selection.v_pk_mul_lo_u16wraps each 16-bit product modulo 2^16 and refusesclamp,op_sel[2], and nonzerosrc2.v_pk_mad_u16andv_pk_mad_i16wrap modulo 2^16 when unclamped, or saturate each lane to[0, 65535]/[-32768, 32767]whenclampis set;neg_lo/neg_hiare refused on all three opcodes withunsupported packed 16-bit mul/mad operand modifiers.Tests & docs added
tests/native_pk_mul_mad_16_check.py&tests/cmake/native_pk_mul_mad_16.cmake: DXIL compile & disassembly controls, five modifier/reserved-bit refusal encodings, andnative_store_replayhardware dispatches (dense, sparseEXEC, and no-clamp negative control across 8 patterns x 4 forms = 2,048 words + 16 guards).docs/experiments/native-pk-mul-mad-16.md: semantics and reproduction commands.Verification
Commit:
5534e16con Windows 11 x64 (10.0.26300.9974), MSVC19.44.35230, Windows SDK & DXC10.0.26100.0,NVIDIA GeForce RTX 5080(10de:2c02, driver32.0.16.2124), SM 6.6 wave32:ctest --preset dev --no-tests=error -R '^native_pk_mul_mad_16_|^native_packed_dot4_' -V: 4/4 passed, 0 skippednative_pk_mul_mad_16_hardware:sparse=Falseandsparse=Truematched 2048 result words and 16 guards; no-clamp control differed on 638 words.ctest --preset release --no-tests=error -R '^native_pk_mul_mad_16_|^native_packed_dot4_': 4/4 passed, 0 skippeddocs_links_check.py,bidi_controls_check.py,git diff --check): all passed.Scope: Covers synthetic
v_pk_mul_lo_u16,v_pk_mad_u16, andv_pk_mad_i16wave32 compute fixtures throughcompile_dxilandnative_store_replay; does not establish full-title startup or runtime execution.@R0Y00 on GitHub · 2026-11-27 15:30 UTC · original · approved these changes
Independent validation of
5534e16conmain7a12818c(tree020ae0d02e70cf68ac8efa9074c5b02c5323b7ac). Both packed halves use their own selections. Multiplication and addition fit in a 32-bit intermediate for the supported signed and unsigned forms, and clamp applies after the multiply-add. This integration does not include #3088.Built
compile_dxil native_store_replayand ranctest --test-dir <build> --no-tests=error -j 1 -V -R '^native_(pk_mul_mad_16|int16_ternary|packed_dot2|mul24)_(controls|hardware)$'. Debug and Release/O2each passed 8/8 with zero skips. Full and sparse EXEC matched 2,048 result words and 16 guards; removing clamp changed 638 words. The five modifier refusal controls passed. Windows 11 26200.9974, RTX 4060 Laptop driver 32.0.16.1656, SDK DXC 10.0.26100, replay debug layer off. The wave32 replay is hardware-only.