shader: preserve the unordered case in NLG comparisons #186

Merged
Vonsek merged 2 commits from upstream-pr/187 into main 2026-11-21 18:14:30 +00:00
Vonsek commented 2026-11-21 18:10:34 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T18:10:34Z.


Change

Refs #179. Lower v_cmp_nlg_f32 as equality plus an explicit unordered test. The earlier lowering produced a chain of ordered comparisons on the reported RX 9070 XT driver. The regression compiles an isolated NLG predicate so another predicate cannot supply the NaN test.

Verification

At a07738d the new DXIL check failed before the lowering change with “NLG lacks an explicit unordered comparison in DXIL”. With the change, the following passed on Windows x64:

cmake --build --preset dev --target offscreen_check
ctest --preset dev --no-tests=error -R '^pixel_aot_(hardware|warp)$' -V
python -B tests/pixel_aot_check.py draw <configured-dxc> out/build/dev/offscreen_check.exe warp

Both CTest cases passed on RTX 5080 (32.0.16.1692) and WARP (10.0.26100.9818). The predicate readback includes NaN on either side and signed zero. No pixel mismatch or capability skip.

Evidence and follow-up

The added shader is generated from original MIT-licensed fixture source. A retest of the two reported NaN draws on RX 9070 XT driver 32.0.32015.7029 would verify the device-specific result; that adapter was unavailable here.

Checklist

  • One reviewable behavior.
  • Commands and results included.
  • Previous DXIL lowering fails the new control.
  • Experiment notes updated.
  • No game files, dumps, distribution links or secrets.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6532565916 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/187). Originally posted by [Vonsek](https://github.com/Vonsek) on 2026-11-21T18:10:34Z. --- ## Change Refs #179. Lower `v_cmp_nlg_f32` as equality plus an explicit unordered test. The earlier lowering produced a chain of ordered comparisons on the reported RX 9070 XT driver. The regression compiles an isolated NLG predicate so another predicate cannot supply the NaN test. ## Verification At a07738d the new DXIL check failed before the lowering change with “NLG lacks an explicit unordered comparison in DXIL”. With the change, the following passed on Windows x64: ```powershell cmake --build --preset dev --target offscreen_check ctest --preset dev --no-tests=error -R '^pixel_aot_(hardware|warp)$' -V python -B tests/pixel_aot_check.py draw <configured-dxc> out/build/dev/offscreen_check.exe warp ``` Both CTest cases passed on RTX 5080 (32.0.16.1692) and WARP (10.0.26100.9818). The predicate readback includes NaN on either side and signed zero. No pixel mismatch or capability skip. ## Evidence and follow-up The added shader is generated from original MIT-licensed fixture source. A retest of the two reported NaN draws on RX 9070 XT driver 32.0.32015.7029 would verify the device-specific result; that adapter was unavailable here. ## Checklist - [x] One reviewable behavior. - [x] Commands and results included. - [x] Previous DXIL lowering fails the new control. - [x] Experiment notes updated. - [x] No game files, dumps, distribution links or secrets. AI-assisted.
upstream-sync closed this pull request 2026-11-24 06:41:44 +00:00
chatgpt-codex-connector[bot commented 2026-11-24 06:47:46 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T18:10:48Z.


Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T18:13:37.597387Z a07738d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7067061006 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/187#issuecomment-7067061006). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-21T18:10:48Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"a07738d9f92637bdbfa559374e5dd599806fd8e1","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-21T18:13:37.597387Z">2026-11-21T18:13:37.597387Z</relative-time> | `a07738d` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
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!186
No description provided.