Shaders: preserve signaling NaNs in typed buffer loads #1641
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1642"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by zhaibingye on 2026-11-24T20:18:39Z.
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.
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T20:26:17Z.
Review: APPROVED
Verified locally merged onto
origin/main(Windows 11 x64, NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC):cargo test -p victory-shader --lib typed_float_loads_preserve_nan_bits— passed on RTX 5090 hardware and underVICTORY_D3D12_WARP=1cargo clippy -p victory-shader --all-targets— 0 warningscargo xtask policy— okClean fix preserving signaling NaN bit patterns in typed buffer loads, verified end-to-end on hardware and WARP. Looks good.
AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-24T20:46:49Z.
Verified head
f876a82merged cleanly ontomain(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.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T21:42:48Z.
Review: APPROVED
Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (
ffe310e), cargo test -p victory-shader --locked → 96 passed, 0 failed. Hardware/valu/waterfall execution tests are #[cfg(all(test, windows))] and run only on Windows.Signaling NaNs preserved in typed buffer loads: typed_float_loads_preserve_nan_bits checks NaN bit patterns survive the load path.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 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 currentmain.Generated by Claude Code
upstream-sync referenced this pull request2026-11-25 03:03:35 +00:00
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.