shader: lower v_cvt_f64_f32 in the direct compute path #3368

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

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


Refs #2935

Lower v_cvt_f64_f32 (VOP1 0x10 / VOP3A 0x190) 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 binary32 source using pure 32-bit integer arithmetic and dx.op.unaryBits.i32(33) (FirstbitHi), requiring neither DoublePrecisionFloatShaderOps nor Int64ShaderOps.
  • Covers normals, subnormals (normalized to exact binary64 normals), signed zero (±0.0), ±Inf, and qNaN/sNaN quieting (| 0x00400000 with payload preserved in hi[19:0] and lo[31:29]).
  • Supports VOP1 and VOP3A encodings with VGPR, SGPR, inline-float (240..248), and 32-bit literal sources, plus VOP3A abs/neg and overlapping D[0] == S0; refuses pixel_stage, graphics_input, clamp, omod, op_sel, subword, dpp, unused VOP3 sources, and dst == v255.
  • Register v_cvt_f64_f32 as a 64-bit VGPR pair write 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:6666656478 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3368). Originally posted by [R0D4X](https://github.com/R0D4X) on 2026-11-28T14:45:30Z. --- Refs #2935 Lower `v_cvt_f64_f32` (VOP1 `0x10` / VOP3A `0x190`) 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 binary32 source using pure 32-bit integer arithmetic and `dx.op.unaryBits.i32(33)` (`FirstbitHi`), requiring neither `DoublePrecisionFloatShaderOps` nor `Int64ShaderOps`. - Covers normals, subnormals (normalized to exact binary64 normals), signed zero (`±0.0`), `±Inf`, and `qNaN`/`sNaN` quieting (`| 0x00400000` with payload preserved in `hi[19:0]` and `lo[31:29]`). - Supports VOP1 and VOP3A encodings with VGPR, SGPR, inline-float (`240..248`), and 32-bit literal sources, plus VOP3A `abs`/`neg` and overlapping `D[0] == S0`; refuses `pixel_stage`, `graphics_input`, `clamp`, `omod`, `op_sel`, `subword`, `dpp`, unused VOP3 sources, and `dst == v255`. - Register `v_cvt_f64_f32` as a 64-bit VGPR pair write 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#3368
No description provided.