shader: lower v_sat_pk_u8_i16 in the direct compute path #3093

Closed
opened 2026-11-27 15:03:45 +00:00 by github-bot · 0 comments
Owner

@⁠R0D4X on GitHub · 2026-11-27 14:58 UTC · original

Refs #2935.

The ISA table (src/gfx1013_isa_tables.inl) already decodes v_sat_pk_u8_i16 (VOP1 0x62 / VOP3A 0x1e2), but the direct C++ compute frontend (src/gfx1013_direct_compute.inl) does not lower it yet.

I am taking this slice.

Planned scope

  • Lower VOP1 (_e32) and VOP3A (_e64) v_sat_pk_u8_i16 in src/gfx1013_direct_compute.inl: clamp each signed 16-bit halfword of src0 to [0, 255], pack them into D[7:0] and D[15:8], and zero D[31:16].
  • Refuse clamp, scale (omod), abs, neg, op_sel, SDWA, DPP, and nonzero unused src1/src2 on VOP3A.
  • Add tests/native_sat_pk_u8_i16_check.py, tests/cmake/native_sat_pk_u8_i16.cmake, and docs/experiments/native-sat-pk-u8-i16.md covering DXIL compile controls, modifier refusals, EXEC masking, and native_store_replay hardware readback for both VOP1 and VOP3A encodings.
**@⁠R0D4X** on GitHub · 2026-11-27 14:58 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/3093) Refs #2935. The ISA table (`src/gfx1013_isa_tables.inl`) already decodes `v_sat_pk_u8_i16` (VOP1 `0x62` / VOP3A `0x1e2`), but the direct C++ compute frontend (`src/gfx1013_direct_compute.inl`) does not lower it yet. I am taking this slice. ### Planned scope - Lower VOP1 (`_e32`) and VOP3A (`_e64`) `v_sat_pk_u8_i16` in `src/gfx1013_direct_compute.inl`: clamp each signed 16-bit halfword of `src0` to `[0, 255]`, pack them into `D[7:0]` and `D[15:8]`, and zero `D[31:16]`. - Refuse `clamp`, `scale` (`omod`), `abs`, `neg`, `op_sel`, SDWA, DPP, and nonzero unused `src1`/`src2` on VOP3A. - Add `tests/native_sat_pk_u8_i16_check.py`, `tests/cmake/native_sat_pk_u8_i16.cmake`, and `docs/experiments/native-sat-pk-u8-i16.md` covering DXIL compile controls, modifier refusals, `EXEC` masking, and `native_store_replay` hardware readback for both VOP1 and VOP3A encodings.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 15:03:45 +00:00
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/R0Y00--Xbox2Windows#3093
No description provided.