shader: round signed half-export references toward zero #202

Manually merged
github merged 1 commit from gh-pr/202/head into gh-pr/202/base 2026-11-26 21:34:12 +00:00
Owner

@⁠Vonsek on GitHub · 2026-11-21 18:21 UTC · original
Vonsek:codex/pixel-signed-export → main · +11 −1 · 1 files · 1 commits · merged 2026-11-21 18:23 UTC

Change

Round negative half-precision pixel export references toward zero. The previous reference could move a negative result farther from zero after the nearest-half conversion.

Verification

At 2931900, ctest --preset dev --no-tests=error -R '^pixel_aot_(hardware|warp)$' -V passed both tests on an NVIDIA GeForce RTX 5080 and Microsoft WARP. Each signed draw checked 4,096 pixels and 16,384 channels with zero maximum absolute error. The D3D12 debug layer was unavailable.

Evidence and follow-up

The test generates four signed values on either side of a half-precision rounding midpoint from source in this repository under its license. Before the fix WARP returned -1 in the two negative channels at (0, 0), while the reference expected -1.00098 and -0.999512. The two positive channels agreed.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the verification command and result.
  • I verified the negative control before changing the reference.
  • Existing build and reproduction instructions still apply.
  • I did not include game files, dumps, distribution links or secrets.

This change was AI-assisted.

**@⁠Vonsek** on GitHub · 2026-11-21 18:21 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/202) `Vonsek:codex/pixel-signed-export` → `main` · +11 −1 · 1 files · 1 commits · merged 2026-11-21 18:23 UTC ## Change Round negative half-precision pixel export references toward zero. The previous reference could move a negative result farther from zero after the nearest-half conversion. ## Verification At 2931900, `ctest --preset dev --no-tests=error -R '^pixel_aot_(hardware|warp)$' -V` passed both tests on an NVIDIA GeForce RTX 5080 and Microsoft WARP. Each signed draw checked 4,096 pixels and 16,384 channels with zero maximum absolute error. The D3D12 debug layer was unavailable. ## Evidence and follow-up The test generates four signed values on either side of a half-precision rounding midpoint from source in this repository under its license. Before the fix WARP returned -1 in the two negative channels at (0, 0), while the reference expected -1.00098 and -0.999512. The two positive channels agreed. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the verification command and result. - [x] I verified the negative control before changing the reference. - [x] Existing build and reproduction instructions still apply. - [x] I did not include game files, dumps, distribution links or secrets. This change was AI-assisted.
The reference moved one half step in the wrong direction for negative binary32 inputs. Check values on both sides of a rounding midpoint against actual RGBA32F readback.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:34:10 +00:00
github manually merged commit 293190094c into gh-pr/202/base 2026-11-26 21:34:12 +00:00
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-21 18:21 UTC · original · edited 2026-11-21 18:24 UTC

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:24:21.595887Z 2931900 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.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-21 18:21 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/202#issuecomment-7067192142) · edited 2026-11-21 18:24 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"293190094c4acde9e49f3d778d23021df8394e5d","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:24:21.595887Z">2026-11-21T18:24:21.595887Z</relative-time> | `2931900` | 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>
This discussion has been locked. Commenting is limited to contributors.
No description provided.