shader: check FP32 exponent edge cases on Vulkan #467

Merged
venetanji merged 1 commit from upstream-pr/473 into main 2026-11-22 05:53:50 +00:00
venetanji commented 2026-11-22 05:49:28 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by venetanji on 2026-11-22T05:49:28Z.


Change

Add an optional Vulkan compute fixture for the frexp_mant32 and ldexp32 helpers introduced in #310. Check 23 input pairs against Python's floating-point reference. Compare finite results, zeros, and infinities by raw binary32 bits and compare NaNs by class. A negative control changes tie-to-even rounding to round up on ties. The fixture generates its shader and inputs from source and adds no CI dependency.

Refs #312 for the separate question of pixel shader floating-point mode.

Verification

Tested commit 17810653e27cf6583891e628e7d4987fa7604dc1 on x86-64 Linux with Python 3.14.8, DXC 1.9.2609.5, VkRunner 3f73c7c3, and NVIDIA driver 615.78.08.

VK_DRIVER_FILES=/usr/share/vulkan/icd.d/nvidia_icd.json python -B tests/pixel_fp32_vulkan_check.py "$DXC" "$VKRUNNER" --device 1 --device 2
python -B tests/pixel_aot_check.py binary /usr/bin/llvm-mc /usr/bin/llvm-objcopy /usr/lib/libLLVM.so
python -B tests/docs_links_check.py
git diff --check

The RTX 3080 Ti and RTX 3090 each passed 46 output-word comparisons and rejected the altered rounding rule at the storage-buffer comparison. There were no capability skips. The LLVM 23.1.3 binary lowering and docs checks passed. The optional probe measures helper behavior through SPIR-V on Vulkan.

GitHub Actions passed the Linux checks and the Windows dev job. The Windows /O2 job passed pixel_aot_warp but failed the existing cpu_native_worker_alive test after a timeout on its first launch. That symptom is also reported in #281. CI run

Evidence and follow-up

The fixture uses synthetic binary32 inputs and the repository's HLSL helpers. The added test is an original MIT-licensed contribution. The Linux host guide records the command and prerequisites.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6539021221 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/473). Originally posted by [venetanji](https://github.com/venetanji) on 2026-11-22T05:49:28Z. --- ## Change Add an optional Vulkan compute fixture for the `frexp_mant32` and `ldexp32` helpers introduced in #310. Check 23 input pairs against Python's floating-point reference. Compare finite results, zeros, and infinities by raw binary32 bits and compare NaNs by class. A negative control changes tie-to-even rounding to round up on ties. The fixture generates its shader and inputs from source and adds no CI dependency. Refs #312 for the separate question of pixel shader floating-point mode. ## Verification Tested commit `17810653e27cf6583891e628e7d4987fa7604dc1` on x86-64 Linux with Python 3.14.8, DXC 1.9.2609.5, VkRunner `3f73c7c3`, and NVIDIA driver 615.78.08. ```sh VK_DRIVER_FILES=/usr/share/vulkan/icd.d/nvidia_icd.json python -B tests/pixel_fp32_vulkan_check.py "$DXC" "$VKRUNNER" --device 1 --device 2 python -B tests/pixel_aot_check.py binary /usr/bin/llvm-mc /usr/bin/llvm-objcopy /usr/lib/libLLVM.so python -B tests/docs_links_check.py git diff --check ``` The RTX 3080 Ti and RTX 3090 each passed 46 output-word comparisons and rejected the altered rounding rule at the storage-buffer comparison. There were no capability skips. The LLVM 23.1.3 binary lowering and docs checks passed. The optional probe measures helper behavior through SPIR-V on Vulkan. GitHub Actions passed the Linux checks and the Windows dev job. The Windows /O2 job passed `pixel_aot_warp` but failed the existing `cpu_native_worker_alive` test after a timeout on its first launch. That symptom is also reported in #281. [CI run](https://github.com/R0Y00/Xbox2Windows/actions/runs/44991049459) ## Evidence and follow-up The fixture uses synthetic binary32 inputs and the repository's HLSL helpers. The added test is an original MIT-licensed contribution. The Linux host guide records the command and prerequisites. AI-assisted.
upstream-sync closed this pull request 2026-11-24 06:43:14 +00:00
chatgpt-codex-connector[bot commented 2026-11-24 06:48:25 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-22T05:49:40Z.


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-22T05:52:47.882333Z 1781065 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:7074970478 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/473#issuecomment-7074970478). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-22T05:49:40Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"17810653e27cf6583891e628e7d4987fa7604dc1","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-22T05:52:47.882333Z">2026-11-22T05:52:47.882333Z</relative-time> | `1781065` | 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!467
No description provided.