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

Merged
KomaGuy merged 1 commit from upstream-pr/569 into main 2026-11-22 13:42:25 +00:00
KomaGuy commented 2026-11-22 12:54:52 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by KomaGuy on 2026-11-22T12:54:52Z.


Change

Follow-up to #408 and the NVIDIA RTX 5080 hardware report in https://github.com/R0Y00/Xbox2Windows/pull/408#issuecomment-7079197426:

  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.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6542635027 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/569). Originally posted by [KomaGuy](https://github.com/KomaGuy) on 2026-11-22T12:54:52Z. --- ## Change Follow-up to #408 and the NVIDIA RTX 5080 hardware report in https://github.com/R0Y00/Xbox2Windows/pull/408#issuecomment-7079197426: 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.
upstream-sync closed this pull request 2026-11-24 06:43:44 +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!563
No description provided.