pixel_aot_div_fmas_warp: Windows 10 in-box WARP faults on double ogt/ole comparisons #869

Closed
opened 2026-11-23 15:14:53 +00:00 by lukaslw-lab · 0 comments
lukaslw-lab commented 2026-11-23 15:14:53 +00:00 (Migrated from github.com)
Contributor

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


pixel_aot_div_fmas_warp (added in #704) fails on the Windows 10 in-box WARP: every case reports DXGI_ERROR_DEVICE_REMOVED (0x887a0005), starting at the first dispatch. pixel_aot_div_fmas_hardware passes, and so does the same test on app-local WARP 1.0.22.

The cause is narrower than doubles in general. The in-box WARP faults on a double comparison with the DXIL predicate ogt or ole. The helper's midpoint branch contains s_sc > 0.0 && err_sc > 0.0, which DXC emits as fcmp ogt double.

A standalone harness ran one cs_6_0 dispatch per variant (DXC 1.9.2609) on three adapters:

Double comparison In-box WARP 10.0.19041.7811 WARP 1.0.22 RTX 3080 Ti (32.0.16.1047)
olt, oge, oeq, one, une runs runs runs
ogt, ole access violation at the first dispatch runs runs
  • The result does not depend on whether the other operand is a constant or a runtime double, on fast or precise, or on whether the comparison feeds a select or a branch. Pipeline creation succeeds.
  • Every other double operation in the helper runs on the in-box WARP: multiply and add, precise 2Sum, asuint(double, lo, hi), asdouble, clamp, and selecting a double constant.
  • Rewriting the expression as 0.0 < x or -x < 0.0 does not help, because DXC folds both back to ogt. x >= 0.0 && x != 0.0 stays oge + une and runs everywhere.
  • A plausible reason, not verified: DXBC has only dlt, dge, deq and dne, so > and <= need swapped operands, and those two are the ones that fault.

Minimal shader:

RWByteAddressBuffer buf : register(u0);

[numthreads(1, 1, 1)]
void main()
{
    double s = (double)asfloat(buf.Load(0)) - (double)asfloat(buf.Load(8));
    buf.Store(16, s > 0.0 ? 1u : 2u);  // fcmp ogt: faults on the in-box WARP; s < 0.0 (olt) runs
}

Environment: Windows 10 Pro 22H2 (build 19045), MSVC 19.52, Windows SDK 10.0.26100, DXC 1.9.2609, upstream/main at 041ca68. D3D12 debug layer not enabled.

In the midpoint branch both values are finite and nonzero, so >= gives the same result as >. I have a one-line change that runs all 10 cases unchanged on the in-box WARP, WARP 1.0.22 and the RTX 3080 Ti, and will open it as a PR.

AI-assisted: investigated with Claude Code; the measurements were run on my PC.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6562436716 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/876). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-23T15:14:53Z. --- `pixel_aot_div_fmas_warp` (added in #704) fails on the Windows 10 in-box WARP: every case reports `DXGI_ERROR_DEVICE_REMOVED` (`0x887a0005`), starting at the first dispatch. `pixel_aot_div_fmas_hardware` passes, and so does the same test on app-local WARP 1.0.22. The cause is narrower than doubles in general. The in-box WARP faults on a double comparison with the DXIL predicate `ogt` or `ole`. The helper's midpoint branch contains `s_sc > 0.0 && err_sc > 0.0`, which DXC emits as `fcmp ogt double`. A standalone harness ran one `cs_6_0` dispatch per variant (DXC 1.9.2609) on three adapters: | Double comparison | In-box WARP 10.0.19041.7811 | WARP 1.0.22 | RTX 3080 Ti (32.0.16.1047) | |---|---|---|---| | `olt`, `oge`, `oeq`, `one`, `une` | runs | runs | runs | | `ogt`, `ole` | access violation at the first dispatch | runs | runs | - The result does not depend on whether the other operand is a constant or a runtime double, on `fast` or `precise`, or on whether the comparison feeds a select or a branch. Pipeline creation succeeds. - Every other double operation in the helper runs on the in-box WARP: multiply and add, `precise` 2Sum, `asuint(double, lo, hi)`, `asdouble`, `clamp`, and selecting a double constant. - Rewriting the expression as `0.0 < x` or `-x < 0.0` does not help, because DXC folds both back to `ogt`. `x >= 0.0 && x != 0.0` stays `oge` + `une` and runs everywhere. - A plausible reason, not verified: DXBC has only `dlt`, `dge`, `deq` and `dne`, so `>` and `<=` need swapped operands, and those two are the ones that fault. Minimal shader: ```hlsl RWByteAddressBuffer buf : register(u0); [numthreads(1, 1, 1)] void main() { double s = (double)asfloat(buf.Load(0)) - (double)asfloat(buf.Load(8)); buf.Store(16, s > 0.0 ? 1u : 2u); // fcmp ogt: faults on the in-box WARP; s < 0.0 (olt) runs } ``` Environment: Windows 10 Pro 22H2 (build 19045), MSVC 19.52, Windows SDK 10.0.26100, DXC 1.9.2609, `upstream/main` at `041ca68`. D3D12 debug layer not enabled. In the midpoint branch both values are finite and nonzero, so `>=` gives the same result as `>`. I have a one-line change that runs all 10 cases unchanged on the in-box WARP, WARP 1.0.22 and the RTX 3080 Ti, and will open it as a PR. _AI-assisted: investigated with Claude Code; the measurements were run on my PC._
Sign in to join this conversation.
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#869
No description provided.