Recompiler: add the legacy FMA zero product in direct DXIL #2309
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!2309
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2309/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?
@philip-roy-jones on GitHub · 2026-11-25 13:32 UTC · original
philip-roy-jones:xcl-pool-1-960f13fceb34→main· +65 −4 · 4 files · 1 commits · closed without mergingPart of #679. Direct DXIL returned the addend unchanged when either legacy FMA factor was zero. A negative-zero addend needs to become positive zero unless the shader rounds toward negative infinity. #670 covers the HLSL emitter. Direct DXIL claim in #1269
What is in it
Tested
568e7dband headc33d6964588f00b9992159732f5bff40fc2f3f8d. Radeon RX 580, driver 31.0.21925.1001, native wave64, Ryzen 7 7700X, Windows 11 Pro 26200, MSVC Rust 1.100.0, DXC 1.8.2502.11. Debug workspace tests and release shader measurements and smoke runs.xcl-gpu run cargo test -p xcl --lib gpu_direct_legacy_fma_zero_product -- --nocapturefailed before the fix with0x80000000instead of0x00000000. On head it reported 1 passed, 0 failed, 0 ignored with 0 skipped. The direct-rounding module reported 7 passed, 0 failed, 0 ignored with 0 skipped.kernel::translatecalls. Validation and GPU readback followed timing.cargo build --workspace,cargo build --release -p xclandxcl-gpu run cargo test --workspace --no-fail-fast -- --test-threads=4. The harness includes reported skips in the passed column.All 109 parent failures recurred by name. In the full head suite the new test also received
DXGI_ERROR_DEVICE_REMOVEDat pipeline creation after the device was suspended. It passed on a fresh device. WARP's single failure wastest_title_runs_and_game_folder_is_untouched, the test excluded by the CI filter. It passed on the RX 580.RX 580 tests reporting SKIPPED on head (63)
D3D12 device unavailable after a driver error (2)
no GPU (13)
no GPU / DXC / mesh shaders (1)
no GPU with 32-lane waves (24)
no heap windows (1)
no mesh shaders (5)
no wave32 (16)
no wave32 / wave64 (1)
Regression run
The same 60-second offline title run used the in-place release executable on each clean revision. Both started from identical copies of 737 main-built DXIL cache files and fresh title data roots, with
XCL_DIRECT_DXIL=1,XCL_ASYNC_PSO=0,XCL_PSO_PRELOAD=0,XCL_TRANSLATED_CACHE=0andXCL_PSO_DISK_CACHE=0.Not tested
Console hardware, NVIDIA and Intel GPUs, optional game-data fixtures, or world loading. The retail smoke did not measure which instructions executed or the title's shader compile time.
AI use
Codex with gpt-6.2-astra, max reasoning, wrote the fix, GPU test and description, ran verification, and reviewed the full diff on Philip's behalf.
@SlopTart on GitHub · 2026-11-25 14:36 UTC · original
Wine/vkd3d-proton lane: verified, clean.
Tested: head
c33d6964, merged onto currentorigin/main(auto-merge, no conflicts), Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo targetx86_64-pc-windows-gnurun under wine-11.0 (Proton), rustc 1.94.0, vkd3d-proton 3.1 with the XCL patch, official MS DXC (binaries 2026-09-29).gpu_suite (--release --locked,--test-threads=2): 143 passed / 3 failed / 1 ignored. The pass delta vs plainorigin/mainon this rig is exactly +1, the new GPU test from this PR, and it passes: both direct DXIL FMA paths with signed zeros, infinities, NaN and all four run-time rounding modes come out right on RDNA3 under Wine.gpu_nonfused_mad_and_mac_prevent_fma_contraction,gpu_depth_buffer_created_for_unordered_access_is_placed.Not tested: NVIDIA lane on this PR specifically; retail titles (no title data on this lane, counts only).
AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
Pull request closed