shader: lower v_pk_add/sub_i16 and v_pk_add/sub_u16 in the direct compute path #3085
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#3085
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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:46 UTC · original
Refs #2935.
The ISA table (
src/gfx1013_isa_tables.inl) already decodes VOP3Pv_pk_add_i16(0x02),v_pk_sub_i16(0x03),v_pk_add_u16(0x0a), andv_pk_sub_u16(0x0b), and the startup HLSL translator already lowers them, but the direct C++ compute frontend (src/gfx1013_direct_compute.inl) does not lower them yet.I am taking this slice.
Planned scope
v_pk_add_i16,v_pk_sub_i16,v_pk_add_u16, andv_pk_sub_u16insrc/gfx1013_direct_compute.inlwith fullop_sel[1:0]/op_sel_hi[1:0]lane selection, wrapping modulo 2^16 when unclamped, and per-lane saturation ([-32768, 32767]fori16,[0, 65535]foru16) whenclampis set.neg_lo,neg_hi,op_sel[2], and nonzerosrc2(ignoring LLVM's default 2-sourceop_sel_hi[2]bit 14).tests/native_pk_add_sub_16_check.py,tests/cmake/native_pk_add_sub_16.cmake, anddocs/experiments/native-pk-add-sub-16.mdcovering DXIL compile controls, modifier refusals,EXECmasking,op_sel/op_sel_hiswizzles, no-clamp negative controls, andnative_store_replayhardware readback.