recomp: f64 abs / neg modifiers on the sign bit #72
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!72
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/72/head"
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?
@gefydev on GitHub · 2026-11-23 00:28 UTC · original
gefydev:recomp-f64-neg-sign-bit→main· +102 −43 · 4 files · 2 commits · closed without mergingOn top of #71, which is what runs this test on NVIDIA. Only the last commit is new.
The f64 source modifiers are emitted as
-x(NEG) andabs(x)(ABS). DXIL (LLVM 3.7) has nofneg, so DXC compiles-xasfsub double -0.0, x, and IEEE 754 doesn't define the sign of a NaN result there. AMD happens to flip it. On a GTX 1650,v_frexp_mant_f64with NEG on0x7FF8000000000001returns0x7FF8000000000001instead of0xFFF8000000000001:On RDNA the modifiers only flip or clear the sign bit, NaN included.
f64vnow applies them that way, to the high dword:asdouble(lo, hi ^ 0x80000000u)andasdouble(lo, hi & 0x7FFFFFFFu). For anything but NaN the value is the same as before.f32 operands (
fsrc) still use-x/abs(). I haven't seen a failing case there, so I left them alone.Validation
GTX 1650, Windows 11, NVIDIA driver 32.0.16.2114 (and before that the same GPU on Linux with vkd3d-proton). On Windows,
cargo test --workspacehas 0 failures andgpu_frexp_f64_exp_and_mantruns and passes. The failure output above is from vkd3d-proton; on Windows I only ran it with the fix.gpu_frexp_f64_exp_and_mantnow usesgpu_ready_wave32. It fails without this commit (above) and passes with it.f64_class_compare_vopc_and_vop3,frexp_f64_instructionsandrndne_f64_instructionscheck the generated HLSL, so they now expect the new form.cargo test -p xcl --lib: 0 failed on the GTX 1650 (19SKIPPED) and without a GPU.@FZNull on GitHub · 2026-11-23 00:51 UTC · original
Validated on native Windows 11 (not Wine/vkd3d-proton): RTX 4060 (Ada, lane range 32..32), MSVC, DXC 1.8.2502.11 from SDK 10.0.26100.
dd713e3/ PR heada7a2074(this PR includes #71)cargo test --workspace --no-fail-fast: 372 -> 373 passed, 0 failed, 34 ignoredSKIPPED ...: no wave64drops from 41 to 19, so 22 GPU tests that never ran on this adapter now run and passcargo test -p xcl --lib: 343 -> 344 passedNo TDR, no device removal; mesh and e2e tests unaffected. Nothing from a game package was used.
AI-assisted.
@ivall on GitHub · 2026-11-23 10:20 UTC · original
Landed as
c2887bb(cherry-picked, authorship kept), without #71 – #67 already runs these kernels on 32-lane GPUs, so the test now gates ongpu_readyinstead ofgpu_ready_wave32. Passes on an RX 9070 natively and withXCL_SPLIT_WAVE64=1(the 32-lane split form forced on RDNA). Closing here since the commit is onmain. Thanks!Pull request closed