Repository navigation
Shaders: lower v_mad_{u16,i16} and saturating clamp on 16-bit integer ops (#1211) - #69
Merged
LAKSHYA-cmd-tech merged 1 commit intoNov 24, 2026
Conversation
… ops AI-generated & verified with Gemini 4 Neon (High Mode) — not written by a human engineer. - Add `v_mad_u16` (VOP3 0x340) and `v_mad_i16` (VOP3 0x35e) to `valu16` / `valu16_op` in `crates/victory-shader/src/emit/lower.rs`, preserving the untouched half of the destination VGPR via `write_half`. - Allow saturating `v.clamp` on `v_add_nc_u16`, `v_sub_nc_u16`, `v_subrev_nc_u16`, `v_mad_u16`, and `v_mad_i16` (clamping to `[0, 65535]` for unsigned and `[-32768, 32767]` for signed in 32-bit intermediate precision). Non-saturating 16-bit integer ops continue to reject `v.clamp`. Verified with synthetic GPU + WARP + dxil.dll tests in `valu_tests.rs` on NVIDIA GeForce RTX 3060 Ti (Windows 11, Rust 1.98.1). No game data used. Co-Authored-By: Gemini 4 Neon (High Mode) <noreply@google.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports PR Marvisak#1211: