Shaders: preserve signaling NaNs in typed buffer loads #1642

Open
github-bot wants to merge 1 commit from github-bot/gh-1642 into main AGit
Owner

@⁠zhaibingye on GitHub · 2026-11-24 20:18 UTC · original
zhaibingye:fix/typed-buffer-nan-payload → main · +56 −4 · 2 files · 1 commits · open

Addresses the signaling-NaN case in #1242 (VIC-BT-019). Loading half 0x7c01 on main returned 0x7fc02000 on llvmpipe, while RDNA2 returns 0x7f802000. This change preserves the signaling bit and payload when widening typed buffer loads.

Exhaustive tests covered 68,608 channel encodings per backend. llvmpipe mismatches fell from 1,068 to 0; SwiftShader matched on both revisions. Portable shader tests: 96 passed, 1 ignored. Native D3D12 and game rendering were not tested locally.

AI assistance: OpenAI Codex.

**@⁠zhaibingye** on GitHub · 2026-11-24 20:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/1642) `zhaibingye:fix/typed-buffer-nan-payload` → `main` · +56 −4 · 2 files · 1 commits · open Addresses the signaling-NaN case in #1242 (VIC-BT-019). Loading half 0x7c01 on main returned 0x7fc02000 on llvmpipe, while RDNA2 returns 0x7f802000. This change preserves the signaling bit and payload when widening typed buffer loads. Exhaustive tests covered 68,608 channel encodings per backend. llvmpipe mismatches fell from 1,068 to 0; SwiftShader matched on both revisions. Portable shader tests: 96 passed, 1 ignored. Native D3D12 and game rendering were not tested locally. AI assistance: OpenAI Codex.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:39:30 +00:00
Author
Owner

@⁠geiyiliyabumo on GitHub · 2026-11-24 20:46 UTC · original

Verified head f876a82 merged cleanly onto main (ffe310e) on Windows 11 / AMD Radeon RX 9060 XT (RDNA4, gfx1200) + WARP / Rust 1.98.1 MSVC:

  • cargo test -p victory-shader --lib: 121 passed, 0 failed, 1 ignored (typed_float_loads_preserve_nan_bits passes on both RDNA4 hardware and WARP).
  • cargo clippy -p victory-shader --all-targets -- -D warnings: clean.

AI-assisted; synthetic tests only, no game files.

**@⁠geiyiliyabumo** on GitHub · 2026-11-24 20:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/1642#issuecomment-7144045227) Verified head `f876a82` merged cleanly onto `main` (`ffe310e`) on **Windows 11 / AMD Radeon RX 9060 XT (RDNA4, `gfx1200`) + WARP / Rust 1.98.1 MSVC**: - `cargo test -p victory-shader --lib`: **121 passed, 0 failed, 1 ignored** (typed_float_loads_preserve_nan_bits passes on both RDNA4 hardware and WARP). - `cargo clippy -p victory-shader --all-targets -- -D warnings`: clean. *AI-assisted; synthetic tests only, no game files.*
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:33 UTC · original

Automated triage for the maintainers.

Needs rebase. This pull request conflicts with main (conflicting: crates/victory-shader/src/emit/valu_tests.rs). It will be reviewed once it is rebased onto the current main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/1642#issuecomment-7149674791) <!-- victory-triage v1 head=f876a822b059108c145f87c847e39bc810729a02 verdict=needs-rebase at=2026-11-25T01:33:00Z --> Automated triage for the maintainers. **Needs rebase.** This pull request conflicts with `main` (conflicting: `crates/victory-shader/src/emit/valu_tests.rs`). It will be reviewed once it is rebased onto the current `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request has changes conflicting with the target branch.
  • crates/victory-shader/src/emit/valu_tests.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1642/head:github-bot/gh-1642'
git switch 'github-bot/gh-1642'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1642'
git switch 'github-bot/gh-1642'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1642'
git switch 'github-bot/gh-1642'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1642'
git switch 'main'
git merge --squash 'github-bot/gh-1642'
git switch 'main'
git merge --ff-only 'github-bot/gh-1642'
git switch 'main'
git merge 'github-bot/gh-1642'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1642
No description provided.