shader: lower v_cvt_f64_i32 and v_cvt_f64_u32 in direct compute path #3367
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3367"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by R0D4X on 2026-11-28T14:34:04Z.
Fixes #3363. Refs #2935.
Summary
v_cvt_f64_i32(0x04/0x184) andv_cvt_f64_u32(0x16/0x196) in the native direct-DXIL compute path (src/gfx1013_direct_compute.inl):v[d:d+1]using pure 32-bit integer arithmetic anddx.op.unaryBits.i32(33)(FirstbitHi), requiring neitherDoublePrecisionFloatShaderOpsnorInt64ShaderOps.D[0] == S0).pixel_stage,graphics_input,abs,neg,clamp,omod,op_sel,subword,dpp, unused VOP3src1/src2,dst == v255, and inline-float sources.clear_vector_spills(src/gfx1013_compute_native.cpp).tests/native_cvt_f64_int_check.py(irCPU evaluation +controls+hardware),tests/cmake/native_f64_int_cvt.cmake, anddocs/experiments/native-cvt-f64-int.md.Verification
7096dc9d10.0.26300.9974), MSVC19.44.35230, Windows SDK / DXC10.0.26100.0, NVIDIA GeForce RTX 5080 (10de:2c02, driver32.0.16.2140), D3D12 debug layer off.cmake --build --preset dev --target native_compute_ir_dump compile_dxil native_store_replay&release: succeeded.ctest --preset dev --no-tests=error -R '^native_cvt_f64_int_' -V: 3/3 passed (0 skipped); 32 CPU-evaluated IR words matchstruct.pack('<d'), 8 refusals verified, 2064 hardware readback words matched.ctest --preset release --no-tests=error -R '^native_cvt_f64_int_' -V: 3/3 passed (0 skipped); all 2064 hardware words matched.tests/docs_links_check.py,tests/bidi_controls_check.py,git diff --check: passed.Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-28T19:11:22Z.
Review: APPROVED
GPU review of
7096dc9d.INT_MIN,UINT_MAXand 0 are right. A v255 destination pair, abs/neg/clamp/omod/op_sel and inline float sources are refused.mainf2972840with this PR and 17 other open PRs merged locally:native_cvt_f64_int_ir,_controlsand_hardwarepass. Changing the exponent bias1023to1022makes_irand_hardwarefail.Approve.