Shaders: preserve FP16 rounding changes in whole-wave sections #978

Merged
yumaste merged 1 commit from upstream-pr/978 into main 2026-11-29 08:16:58 +00:00
yumaste commented 2026-11-28 10:30:56 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by yumaste on 2026-11-28T10:30:56Z.


Port of Marvisak/VIctory#2886. The existing port on my fork was rebased onto current main.

Track constant FP16 rounding-mode writes through whole-wave sections so later conversions see the requested mode. Preserve this fork's current conversion when there is no known explicit round-to-nearest or round-toward-zero selection.

Windows validation: 8 tests passed and 1 was ignored with cargo test -p victory-shader --locked round. The synthetic GPU test exercises positive and negative values, plus restoring nearest-even with s_setreg_imm32_b32. Clippy passed with warnings denied except for the existing clippy::let_and_return in emit/mod.rs.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5539204867 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/978). Originally posted by [yumaste](https://github.com/yumaste) on 2026-11-28T10:30:56Z. --- Port of Marvisak/VIctory#2886. The existing port on my fork was rebased onto current main. Track constant FP16 rounding-mode writes through whole-wave sections so later conversions see the requested mode. Preserve this fork's current conversion when there is no known explicit round-to-nearest or round-toward-zero selection. Windows validation: 8 tests passed and 1 was ignored with `cargo test -p victory-shader --locked round`. The synthetic GPU test exercises positive and negative values, plus restoring nearest-even with `s_setreg_imm32_b32`. Clippy passed with warnings denied except for the existing `clippy::let_and_return` in `emit/mod.rs`.
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
trustno1-coder/VIctory-NVIDIA!978
No description provided.