shader: lower v_cvt_i32_f64 and v_cvt_u32_f64 in the direct compute path #3370

Closed
opened 2026-11-28 14:50:09 +00:00 by R0D4X · 0 comments
R0D4X commented 2026-11-28 14:50:09 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0D4X on 2026-11-28T14:50:09Z.


Refs #2935

Lower v_cvt_i32_f64 (VOP1 0x03 / VOP3A 0x183) and v_cvt_u32_f64 (VOP1 0x15 / VOP3A 0x195) in the native direct-DXIL compute path (src/gfx1013_direct_compute.inl).

Scope

  • Convert a 64-bit binary64 source pair (v[a:a+1] or even s[a:a+1]) to a saturated 32-bit signed or unsigned integer (truncating toward zero, NaN -> 0, signed saturation to [INT32_MIN, INT32_MAX], unsigned saturation to [0, UINT32_MAX]) using pure 32-bit integer arithmetic (no DoublePrecisionFloatShaderOps and no Int64ShaderOps).
  • Support VOP1 and VOP3A encodings with VOP3A abs/neg on the binary64 source sign; refuse pixel_stage, graphics_input, clamp, omod, op_sel, subword, dpp, unused VOP3 sources/modifiers, and non-pair S0.
  • Add CPU IR evaluation (native_compute_ir_dump), DXIL controls, hardware readback tests, negative controls, CMake registration, and experiment notes.

I am taking this slice.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6666730058 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3370). Originally posted by [R0D4X](https://github.com/R0D4X) on 2026-11-28T14:50:09Z. --- Refs #2935 Lower `v_cvt_i32_f64` (VOP1 `0x03` / VOP3A `0x183`) and `v_cvt_u32_f64` (VOP1 `0x15` / VOP3A `0x195`) in the native direct-DXIL compute path (`src/gfx1013_direct_compute.inl`). ### Scope - Convert a 64-bit binary64 source pair (`v[a:a+1]` or even `s[a:a+1]`) to a saturated 32-bit signed or unsigned integer (truncating toward zero, `NaN -> 0`, signed saturation to `[INT32_MIN, INT32_MAX]`, unsigned saturation to `[0, UINT32_MAX]`) using pure 32-bit integer arithmetic (no `DoublePrecisionFloatShaderOps` and no `Int64ShaderOps`). - Support VOP1 and VOP3A encodings with VOP3A `abs`/`neg` on the binary64 source sign; refuse `pixel_stage`, `graphics_input`, `clamp`, `omod`, `op_sel`, `subword`, `dpp`, unused VOP3 sources/modifiers, and non-pair `S0`. - Add CPU IR evaluation (`native_compute_ir_dump`), DXIL controls, hardware readback tests, negative controls, CMake registration, and experiment notes. I am taking this slice.
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#3370
No description provided.