shader: hoist DPP quad swizzles and use mode="any" for dpp fixture #569

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

@⁠KomaGuy on GitHub · 2026-11-22 12:54 UTC · original
KomaGuy:shader/dpp-nvidia-denorm-fix → main · +25 −8 · 3 files · 1 commits · merged 2026-11-22 13:42 UTC

Change

Follow-up to #408 and the NVIDIA RTX 5080 hardware report in #408:

  1. Record mode="any" for check_dpp_draw (matching the #363 curve exception):
    • In #363, the NVIDIA Blackwell driver (32.0.16.2124, RTX 5060 Ti) refused CreateGraphicsPipelineState with E_OUTOFMEMORY under -denorm preserve specifically on the curve fixture (v_log_f32, v_exp_f32, v_rcp_f32, v_mul_legacy_f32), while passing under mode="any" and on WARP/AMD.
    • DPP_BODY exercises the same operations (v_log_f32_dpp, v_exp_f32_dpp, v_rcp_f32_dpp, v_mul_legacy_f32_dpp) and hit the identical CreateGraphicsPipelineState E_OUTOFMEMORY failure on RTX 5080 (driver 32.0.16.2101) after #408 switched to compile_shader() (mode="preserve").
    • check_dpp_draw now compiles with mode="any" and asserts all(flush_ftz(word) == word for word in expected) on every constant set, matching curve.
  2. Hoist non-identity QuadRead* intrinsics out of conditional expressions (tools/pixel_aot.py):
    • emit_quad_swizzle_u32 previously returned fast-path QuadReadAcross*/QuadReadLaneAt calls inline, causing v_mul_legacy_f32_dpp to emit QuadReadLaneAt twice (the second time inside a ?: branch) and allowing fast-path v_cndmask_b32_dpp to place QuadRead* inside a ?: branch.
    • Non-identity fast paths now bind uint dpp{idx}_s = QuadRead*(...); unconditionally before the instruction expression, with a unit control in check_controls.

Verification

  • Verified locally on Linux (tests/pixel_aot_check.py binary, ffx_dispatch_aot_check.py, script_state_check.py, bcpack_check.py, resource_ranges_check.py, layout_chunks_check.py, docs_links_check.py, bidi_controls_check.py).
  • Windows WARP draw and /O2 builds run in CI; NVIDIA RTX 5080 hardware re-verification requested from @⁠Leyukaka on #408.
**@⁠KomaGuy** on GitHub · 2026-11-22 12:54 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/569) `KomaGuy:shader/dpp-nvidia-denorm-fix` → `main` · +25 −8 · 3 files · 1 commits · merged 2026-11-22 13:42 UTC ## Change Follow-up to #408 and the NVIDIA RTX 5080 hardware report in https://git.gtahub.st/github/R0Y00--Xbox2Windows/pulls/408: 1. **Record `mode="any"` for `check_dpp_draw` (matching the `#363` `curve` exception):** - In #363, the NVIDIA Blackwell driver (`32.0.16.2124`, RTX 5060 Ti) refused `CreateGraphicsPipelineState` with `E_OUTOFMEMORY` under `-denorm preserve` specifically on the `curve` fixture (`v_log_f32`, `v_exp_f32`, `v_rcp_f32`, `v_mul_legacy_f32`), while passing under `mode="any"` and on WARP/AMD. - `DPP_BODY` exercises the same operations (`v_log_f32_dpp`, `v_exp_f32_dpp`, `v_rcp_f32_dpp`, `v_mul_legacy_f32_dpp`) and hit the identical `CreateGraphicsPipelineState` `E_OUTOFMEMORY` failure on RTX 5080 (driver `32.0.16.2101`) after #408 switched to `compile_shader()` (`mode="preserve"`). - `check_dpp_draw` now compiles with `mode="any"` and asserts `all(flush_ftz(word) == word for word in expected)` on every constant set, matching `curve`. 2. **Hoist non-identity `QuadRead*` intrinsics out of conditional expressions (`tools/pixel_aot.py`):** - `emit_quad_swizzle_u32` previously returned fast-path `QuadReadAcross*`/`QuadReadLaneAt` calls inline, causing `v_mul_legacy_f32_dpp` to emit `QuadReadLaneAt` twice (the second time inside a `?:` branch) and allowing fast-path `v_cndmask_b32_dpp` to place `QuadRead*` inside a `?:` branch. - Non-identity fast paths now bind `uint dpp{idx}_s = QuadRead*(...);` unconditionally before the instruction expression, with a unit control in `check_controls`. ## Verification - Verified locally on Linux (`tests/pixel_aot_check.py binary`, `ffx_dispatch_aot_check.py`, `script_state_check.py`, `bcpack_check.py`, `resource_ranges_check.py`, `layout_chunks_check.py`, `docs_links_check.py`, `bidi_controls_check.py`). - Windows WARP draw and `/O2` builds run in CI; NVIDIA RTX 5080 hardware re-verification requested from @⁠Leyukaka on #408.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:02:35 +00:00
github manually merged commit 199cef9a1c into gh-pr/569/base 2026-11-26 22:02:37 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.