Shaders: packed integer operations take their neg modifiers #889

Closed
Melow-code wants to merge 1 commit from upstream-pr/890 into main
Melow-code commented 2026-11-25 12:00:50 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Melow-code on 2026-11-25T12:00:50Z.


The packed integer operations (v_pk_add_u16, v_pk_mul_lo_u16 and the rest) refused the neg modifier on both halves.

The VOP3P neg is applied now in packed_src, per half: high halves take neg_hi, low halves neg, and the two's complement wraps to 16 bits, as the console computes it. The clamp and the output modifier stay refused.

Verification

  • cargo test --locked -p victory-shader --lib on Linux: 172 passed, two ignored.
  • New test: a neg on the first low operand of v_pk_add_u16 lowers.

Assisted-by: DeepSeek V4 Pro (OpenCode)

<!-- greyfinch-sync:fxceless/victory-fork:issue:6603993988 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/890). Originally posted by [Melow-code](https://github.com/Melow-code) on 2026-11-25T12:00:50Z. --- The packed integer operations (v_pk_add_u16, v_pk_mul_lo_u16 and the rest) refused the neg modifier on both halves. The VOP3P neg is applied now in `packed_src`, per half: high halves take `neg_hi`, low halves `neg`, and the two's complement wraps to 16 bits, as the console computes it. The clamp and the output modifier stay refused. ## Verification - `cargo test --locked -p victory-shader --lib` on Linux: 172 passed, two ignored. - New test: a neg on the first low operand of `v_pk_add_u16` lowers. Assisted-by: DeepSeek V4 Pro (OpenCode)
upstream-sync closed this pull request 2026-11-25 21:05:40 +00:00

Pull request closed

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
fxceless/victory-fork!889
No description provided.