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

Manually merged
github merged 1 commit from gh-pr/877/head into gh-pr/877/base 2026-11-26 22:25:11 +00:00
Owner

@⁠lukaslw-lab on GitHub · 2026-11-23 15:17 UTC · original
lukaslw-lab:shader/div-fmas-win10-warp → main · +6 −2 · 2 files · 1 commits · merged 2026-11-23 15:34 UTC

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

**@⁠lukaslw-lab** on GitHub · 2026-11-23 15:17 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/877) `lukaslw-lab:shader/div-fmas-win10-warp` → `main` · +6 −2 · 2 files · 1 commits · merged 2026-11-23 15:34 UTC ## 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)
The Windows 10 in-box WARP (10.0.19041) faults at the first dispatch of a
shader with an fcmp ogt or ole on doubles; olt and oge run. In the helper's
midpoint branch both values are finite and nonzero, so >= matches >.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:25:09 +00:00
github manually merged commit 4a19cec285 into gh-pr/877/base 2026-11-26 22:25:11 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.