pixel_aot_e64_approx_hardware and pixel_aot_sdwa_unary_hardware: NVIDIA refuses PSO creation for log2 under -denorm preserve #822

Closed
opened 2026-11-23 09:24:23 +00:00 by alvaroolt · 2 comments
alvaroolt commented 2026-11-23 09:24:23 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by alvaroolt on 2026-11-23T09:24:23Z.


Commit or build

325fe1e (current main), dev preset.

Reproduction

The two fixture tests:

ctest --preset dev --no-tests=error -R '^pixel_aot_(e64_approx|sdwa_unary)_hardware$' -V

Minimal shader, log2.hlsl:

cbuffer Constants : register(b0) { float4 params[16]; };
Texture2D<float4> tex : register(t0);
SamplerState samp : register(s0);
float4 main(float2 uv : TEXCOORD0) : SV_Target0 {
    return float4(log2(params[1].x), 0, 0, 1);
}

Compiled as the pixel_aot draws compile (compile_shader in tests/pixel_aot_check.py) and drawn with any case file (256 bytes of constants followed by 64 RGBA float32 expected values; only pipeline creation matters here):

dxc -Gis -denorm preserve -T ps_6_2 -E main -Fo log2.cso log2.hlsl
out\build\dev\offscreen_check.exe hardware --check-pixel-batch log2.cso any.case

Expected behavior

The pipeline is created and the draw runs, as on WARP and on an AMD adapter, so pixel_aot_e64_approx_hardware and pixel_aot_sdwa_unary_hardware pass.

Observed behavior

On an RTX 5080, CreateGraphicsPipelineState fails for every case of both tests:

case=0 status=error
Translated pixel pipeline failed (HRESULT 0x8007000e)

0x8007000e is E_OUTOFMEMORY. The cause narrows to log2 (and log, which lowers to it) in a shader compiled with -denorm preserve:

Minimal shader body -denorm preserve -denorm ftz -denorm any
log2(x), log2(abs(x)), precise log2(x), log(x) E_OUTOFMEMORY pipeline created pipeline created
exp2(x), sqrt(x), 1.0f / x, rsqrt(x), x + 0.5f pipeline created pipeline created pipeline created
  • The DXIL listings for preserve and ftz differ only in attributes #0 = { "fp32-denorm-mode"="preserve" }.
  • The failure is the same at ps_6_2, ps_6_4, ps_6_6 and ps_6_8, and with DXC 1.9.2602.17 (Windows SDK) and 1.9.0.5512 (Vulkan SDK 1.4.363.0), measured with driver 32.0.16.2101.
  • It does not depend on the driver update from 32.0.16.2101 to 32.0.16.2124: both refuse the same shaders.
  • Every translated program that fails contains log2: e64_approx, sdwa_unary_exp (the first of the three SDWA_UNARY programs), and the curve and dpp programs. The programs without it, shaping, sdwa_unary_root and sdwa_unary_exact, create their pipelines under preserve.
  • Control: on the same machine, the AMD integrated GPU (XBOX2WINDOWS_ADAPTER=Radeon) creates every preserve pipeline above, and both tests pass on it and on WARP.

This looks like the cause of the two exceptions already recorded in tests/pixel_aot_check.py and docs/experiments.md: curve (RTX 5060 Ti, driver 32.0.16.2124, from 68fd84e) and dpp (RTX 5080, driver 32.0.16.2101, #569). Both were changed to mode="any" with a flush_ftz(word) == word assertion on every expected word. The fixtures from #729 and #756 were measured on an RTX 3060 (driver 32.0.15.9636) and WARP, so the refusal did not show up there.

Not established: whether older NVIDIA architectures with these drivers are affected, and whether a later driver fixes it. 32.0.16.2124 was the latest driver offered when I tested.

Question for the maintainers: should each fixture that contains log2 follow the curve/dpp exception (mode="any" when no expected word is a binary32 subnormal), or is a general rule preferred? The existing exception would apply to e64_approx and sdwa_unary_exp: none of their expected values is a binary32 subnormal (they are 8, 5, 96.25, 0, 16, 3, 32.5, 0 and 8, 5, 8, -4, 16, 3, -2, -16).

This investigation was AI-assisted (Claude Code); I ran and checked every result above.

Environment

Windows 11 build 26300.9974 (26H2), VS Build Tools 2026 18.12 (MSVC 14.52.37025), Windows SDK 10.0.26100, DXC 1.9.2602.17.
Failing: NVIDIA GeForce RTX 5080 (vendor 10de, device 2c02), driver 32.0.16.2124 (also 32.0.16.2101), hardware backend, debug layer unavailable.
Passing control: AMD Radeon(TM) Graphics (vendor 1002, device 13c0), driver 32.0.11034.2, hardware backend; and WARP.

Checklist

  • I reproduced this on a source-built input.
  • I did not include game files, dumps, distribution links or credentials.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6556173483 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/828). Originally posted by [alvaroolt](https://github.com/alvaroolt) on 2026-11-23T09:24:23Z. --- ### Commit or build `325fe1e` (current `main`), `dev` preset. ### Reproduction The two fixture tests: ```shell ctest --preset dev --no-tests=error -R '^pixel_aot_(e64_approx|sdwa_unary)_hardware$' -V ``` Minimal shader, `log2.hlsl`: ```hlsl cbuffer Constants : register(b0) { float4 params[16]; }; Texture2D<float4> tex : register(t0); SamplerState samp : register(s0); float4 main(float2 uv : TEXCOORD0) : SV_Target0 { return float4(log2(params[1].x), 0, 0, 1); } ``` Compiled as the pixel_aot draws compile (`compile_shader` in `tests/pixel_aot_check.py`) and drawn with any case file (256 bytes of constants followed by 64 RGBA float32 expected values; only pipeline creation matters here): ```powershell dxc -Gis -denorm preserve -T ps_6_2 -E main -Fo log2.cso log2.hlsl out\build\dev\offscreen_check.exe hardware --check-pixel-batch log2.cso any.case ``` ### Expected behavior The pipeline is created and the draw runs, as on WARP and on an AMD adapter, so `pixel_aot_e64_approx_hardware` and `pixel_aot_sdwa_unary_hardware` pass. ### Observed behavior On an RTX 5080, `CreateGraphicsPipelineState` fails for every case of both tests: ```text case=0 status=error Translated pixel pipeline failed (HRESULT 0x8007000e) ``` `0x8007000e` is `E_OUTOFMEMORY`. The cause narrows to `log2` (and `log`, which lowers to it) in a shader compiled with `-denorm preserve`: | Minimal shader body | `-denorm preserve` | `-denorm ftz` | `-denorm any` | |---|---|---|---| | `log2(x)`, `log2(abs(x))`, `precise` `log2(x)`, `log(x)` | `E_OUTOFMEMORY` | pipeline created | pipeline created | | `exp2(x)`, `sqrt(x)`, `1.0f / x`, `rsqrt(x)`, `x + 0.5f` | pipeline created | pipeline created | pipeline created | - The DXIL listings for `preserve` and `ftz` differ only in `attributes #0 = { "fp32-denorm-mode"="preserve" }`. - The failure is the same at `ps_6_2`, `ps_6_4`, `ps_6_6` and `ps_6_8`, and with DXC 1.9.2602.17 (Windows SDK) and 1.9.0.5512 (Vulkan SDK 1.4.363.0), measured with driver 32.0.16.2101. - It does not depend on the driver update from 32.0.16.2101 to 32.0.16.2124: both refuse the same shaders. - Every translated program that fails contains `log2`: `e64_approx`, `sdwa_unary_exp` (the first of the three `SDWA_UNARY` programs), and the `curve` and `dpp` programs. The programs without it, `shaping`, `sdwa_unary_root` and `sdwa_unary_exact`, create their pipelines under `preserve`. - Control: on the same machine, the AMD integrated GPU (`XBOX2WINDOWS_ADAPTER=Radeon`) creates every `preserve` pipeline above, and both tests pass on it and on WARP. This looks like the cause of the two exceptions already recorded in `tests/pixel_aot_check.py` and `docs/experiments.md`: `curve` (RTX 5060 Ti, driver 32.0.16.2124, from `68fd84e`) and `dpp` (RTX 5080, driver 32.0.16.2101, #569). Both were changed to `mode="any"` with a `flush_ftz(word) == word` assertion on every expected word. The fixtures from #729 and #756 were measured on an RTX 3060 (driver 32.0.15.9636) and WARP, so the refusal did not show up there. Not established: whether older NVIDIA architectures with these drivers are affected, and whether a later driver fixes it. 32.0.16.2124 was the latest driver offered when I tested. Question for the maintainers: should each fixture that contains `log2` follow the `curve`/`dpp` exception (`mode="any"` when no expected word is a binary32 subnormal), or is a general rule preferred? The existing exception would apply to `e64_approx` and `sdwa_unary_exp`: none of their expected values is a binary32 subnormal (they are 8, 5, 96.25, 0, 16, 3, 32.5, 0 and 8, 5, 8, -4, 16, 3, -2, -16). This investigation was AI-assisted (Claude Code); I ran and checked every result above. ### Environment Windows 11 build 26300.9974 (26H2), VS Build Tools 2026 18.12 (MSVC 14.52.37025), Windows SDK 10.0.26100, DXC 1.9.2602.17. Failing: NVIDIA GeForce RTX 5080 (vendor 10de, device 2c02), driver 32.0.16.2124 (also 32.0.16.2101), hardware backend, debug layer unavailable. Passing control: AMD Radeon(TM) Graphics (vendor 1002, device 13c0), driver 32.0.11034.2, hardware backend; and WARP. ### Checklist - [x] I reproduced this on a source-built input. - [x] I did not include game files, dumps, distribution links or credentials.
R0Y00 commented 2026-11-24 06:49:07 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T09:50:10Z.


The proposed per-fixture change fits the measured failure. Use mode="any" for the two approximate shader programs that actually contain log2 if their fixture inputs, relevant arithmetic and output comparisons do not depend on preserving binary32 subnormals. Keep the existing preserve mode for the other programs, including sdwa_unary_exact, and keep all wrong-reference controls. A focused PR is welcome. Please run both modes on the RTX 5080 with the same driver to show the old pipeline failure and the new successful draw, plus the normal WARP comparison. Keep the minimal preserve reproduction in the issue so a driver retest can still identify the original behavior.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7097153632 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/828#issuecomment-7097153632). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T09:50:10Z. --- The proposed per-fixture change fits the measured failure. Use `mode="any"` for the two approximate shader programs that actually contain `log2` if their fixture inputs, relevant arithmetic and output comparisons do not depend on preserving binary32 subnormals. Keep the existing `preserve` mode for the other programs, including `sdwa_unary_exact`, and keep all wrong-reference controls. A focused PR is welcome. Please run both modes on the RTX 5080 with the same driver to show the old pipeline failure and the new successful draw, plus the normal WARP comparison. Keep the minimal `preserve` reproduction in the issue so a driver retest can still identify the original behavior.
lukaslw-lab commented 2026-11-24 06:49:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-23T13:09:58Z.


Independent NVIDIA data point: on an RTX 3080 Ti (Ampere, driver 32.0.16.1047), both tests pass with the current -denorm preserve compile:

Test Result
pixel_aot_e64_approx_hardware Passed
pixel_aot_sdwa_unary_hardware Passed

Windows 10 22H2 build 19045, dev preset at e97090a (the same base as #851), DXC 1.9.2609, full ctest --preset dev run. So the log2 PSO refusal is not common to all NVIDIA cards. It appears specific to the RTX 5080 or its driver, which supports keeping #851's mode="any" limited to the log2 programs.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7102147633 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/828#issuecomment-7102147633). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-23T13:09:58Z. --- Independent NVIDIA data point: on an RTX 3080 Ti (Ampere, driver 32.0.16.1047), both tests pass with the current `-denorm preserve` compile: | Test | Result | |---|---| | `pixel_aot_e64_approx_hardware` | Passed | | `pixel_aot_sdwa_unary_hardware` | Passed | Windows 10 22H2 build 19045, `dev` preset at `e97090a` (the same base as #851), DXC 1.9.2609, full `ctest --preset dev` run. So the `log2` PSO refusal is not common to all NVIDIA cards. It appears specific to the RTX 5080 or its driver, which supports keeping #851's `mode="any"` limited to the `log2` programs. AI-assisted (Claude Code).
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#822
No description provided.