shader: lower v_cvt_f64_f32 in the direct compute path #3370

Closed
opened 2026-11-28 14:50:50 +00:00 by github-bot · 0 comments
Owner

@⁠R0D4X on GitHub · 2026-11-28 14:45 UTC · original

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.

**@⁠R0D4X** on GitHub · 2026-11-28 14:45 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/3368) 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 14:50:50 +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#3370
No description provided.