shader: support VOP3P clamp on v_pk_add_f16, v_pk_mul_f16, and v_pk_fma_f16 #3287

Closed
opened 2026-11-28 05:21:17 +00:00 by legacy-code-archaeologist · 0 comments
legacy-code-archaeologist commented 2026-11-28 05:21:17 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-28T05:21:17Z.


Refs #2935.

Admit VOP3P CLAMP on v_pk_add_f16 (0x0f), v_pk_mul_f16 (0x10), and v_pk_fma_f16 (0x0e) in DirectCompute::packed_f16_alu() (src/gfx1013_direct_compute.inl), saturating each rounded binary16 result half to [+0.0, 1.0] with -0.0 -> +0.0 and NaN -> +0.0, while keeping VOP2 v_pk_fmac_f16 (0x3c) clamp and unused third-operand modifier bits refused.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6659683737 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3287). Originally posted by [legacy-code-archaeologist](https://github.com/legacy-code-archaeologist) on 2026-11-28T05:21:17Z. --- Refs #2935. Admit VOP3P `CLAMP` on `v_pk_add_f16` (`0x0f`), `v_pk_mul_f16` (`0x10`), and `v_pk_fma_f16` (`0x0e`) in `DirectCompute::packed_f16_alu()` (`src/gfx1013_direct_compute.inl`), saturating each rounded binary16 result half to `[+0.0, 1.0]` with `-0.0 -> +0.0` and `NaN -> +0.0`, while keeping VOP2 `v_pk_fmac_f16` (`0x3c`) clamp and unused third-operand modifier bits refused. AI-assisted.
Sign in to join this conversation.
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
R0Y00/Xbox2Windows#3287
No description provided.