shader: lower v_cvt_f64_i32 and v_cvt_f64_u32 in the direct compute path #3363

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

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


Refs #2935

Lower v_cvt_f64_i32 (VOP1 0x04 / VOP3A 0x184) and v_cvt_f64_u32 (VOP1 0x16 / VOP3A 0x196) in the native direct-DXIL compute path (src/gfx1013_direct_compute.inl).

Scope

  • Construct the exact IEEE-754 binary64 word pair v[d:d+1] from a 32-bit signed or unsigned integer source using pure 32-bit integer arithmetic and dx.op.unaryBits.i32(33) (FirstbitHi), requiring neither DoublePrecisionFloatShaderOps nor Int64ShaderOps.
  • Support VOP1 and VOP3A encodings with VGPR, SGPR, inline-integer, and literal sources; refuse unsupported modifiers (abs, neg, clamp, omod, op_sel, subword, dpp, unused VOP3 sources), dst == v255, inline-float sources, and graphics-input mode.
  • Register both instructions as 64-bit VGPR pair writes in clear_vector_spills (src/gfx1013_compute_native.cpp).
  • 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:6666032866 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3363). Originally posted by [R0D4X](https://github.com/R0D4X) on 2026-11-28T14:00:25Z. --- Refs #2935 Lower `v_cvt_f64_i32` (VOP1 `0x04` / VOP3A `0x184`) and `v_cvt_f64_u32` (VOP1 `0x16` / VOP3A `0x196`) in the native direct-DXIL compute path (`src/gfx1013_direct_compute.inl`). ### Scope - Construct the exact IEEE-754 binary64 word pair `v[d:d+1]` from a 32-bit signed or unsigned integer source using pure 32-bit integer arithmetic and `dx.op.unaryBits.i32(33)` (`FirstbitHi`), requiring neither `DoublePrecisionFloatShaderOps` nor `Int64ShaderOps`. - Support VOP1 and VOP3A encodings with VGPR, SGPR, inline-integer, and literal sources; refuse unsupported modifiers (`abs`, `neg`, `clamp`, `omod`, `op_sel`, `subword`, `dpp`, unused VOP3 sources), `dst == v255`, inline-float sources, and graphics-input mode. - Register both instructions as 64-bit VGPR pair writes in `clear_vector_spills` (`src/gfx1013_compute_native.cpp`). - 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#3363
No description provided.