shader: avoid double greater-than in the v_div_fmas_f32 helper #870

Merged
lukaslw-lab merged 1 commit from upstream-pr/877 into main 2026-11-23 15:34:25 +00:00
lukaslw-lab commented 2026-11-23 15:17:01 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-23T15:17:01Z.


Change

Fixes #876. The v_div_fmas_f32 helper from #704 avoids the double > that faults on the Windows 10 in-box WARP. In the midpoint branch, (s_sc > 0.0 && err_sc > 0.0) becomes (s_sc >= 0.0 && err_sc >= 0.0). That branch runs only when err_sc != 0.0 and the midpoint test has accepted a finite, nonzero s_sc, so >= and > agree there. DXC now emits only olt, oge and une double comparisons for the helper. docs/experiments.md notes the restriction next to the helper's description.

Verification

Commit 4a19cec on fc89b9e, Windows 10 22H2 (build 19045), Visual Studio 2026 18.12 (MSVC 19.52), Windows SDK 10.0.26100, DXC 1.9.2609, Python 3.13.7. D3D12 debug layer not enabled.

ctest --preset dev --no-tests=error -R '^pixel_aot_div_fmas_' -V
2 total: 2 passed (in-box WARP 10.0.19041.7811; RTX 3080 Ti, driver 32.0.16.1047)

The same two tests passed with the app-local WARP 1.0.22 build and the release preset on the same change before the rebase (7ebf538 on 041ca68). Before the change on 041ca68, pixel_aot_div_fmas_warp failed on the in-box WARP with DXGI_ERROR_DEVICE_REMOVED for all 10 cases. pixel_aot_div_fmas_hardware passed.

All 10 cases keep their exact expected words, including the midpoint, both subnormal-midpoint cases and cancellation. The test's mutation controls are unchanged and still fail as expected.

Evidence and follow-up

The issue has the per-predicate measurements and a minimal shader. Within the helper only the ogt changes: clamp and the <, != comparisons already ran on the in-box WARP.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed.
  • I did not include game files, dumps, distribution links or secrets.

AI-assisted: prepared with Claude Code; the commands and results above were run on the author's PC.

🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6562479106 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/877). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-23T15:17:01Z. --- ## Change Fixes #876. The `v_div_fmas_f32` helper from #704 avoids the double `>` that faults on the Windows 10 in-box WARP. In the midpoint branch, `(s_sc > 0.0 && err_sc > 0.0)` becomes `(s_sc >= 0.0 && err_sc >= 0.0)`. That branch runs only when `err_sc != 0.0` and the midpoint test has accepted a finite, nonzero `s_sc`, so `>=` and `>` agree there. DXC now emits only `olt`, `oge` and `une` double comparisons for the helper. `docs/experiments.md` notes the restriction next to the helper's description. ## Verification Commit `4a19cec` on `fc89b9e`, Windows 10 22H2 (build 19045), Visual Studio 2026 18.12 (MSVC 19.52), Windows SDK 10.0.26100, DXC 1.9.2609, Python 3.13.7. D3D12 debug layer not enabled. ``` ctest --preset dev --no-tests=error -R '^pixel_aot_div_fmas_' -V 2 total: 2 passed (in-box WARP 10.0.19041.7811; RTX 3080 Ti, driver 32.0.16.1047) ``` The same two tests passed with the app-local WARP 1.0.22 build and the `release` preset on the same change before the rebase (`7ebf538` on `041ca68`). Before the change on `041ca68`, `pixel_aot_div_fmas_warp` failed on the in-box WARP with `DXGI_ERROR_DEVICE_REMOVED` for all 10 cases. `pixel_aot_div_fmas_hardware` passed. All 10 cases keep their exact expected words, including the midpoint, both subnormal-midpoint cases and cancellation. The test's mutation controls are unchanged and still fail as expected. ## Evidence and follow-up The issue has the per-predicate measurements and a minimal shader. Within the helper only the `ogt` changes: `clamp` and the `<`, `!=` comparisons already ran on the in-box WARP. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated README/docs when a capability or build requirement changed. - [x] I did not include game files, dumps, distribution links or secrets. _AI-assisted: prepared with Claude Code; the commands and results above were run on the author's PC._ 🤖 Generated with [Claude Code](https://claude.com/claude-code)
upstream-sync closed this pull request 2026-11-24 06:45:12 +00:00
Sign in to join this conversation.
No reviewers
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!870
No description provided.