xshader: accept immediates in signed no-carry add and subtract #125

Merged
smith-3 merged 2 commits from upstream-pr/125 into main 2026-11-25 01:50:15 +00:00
smith-3 commented 2026-11-25 00:21:21 +00:00 (Migrated from github.com)

Imported from brcly/TuxBox. Originally posted by smith-3 on 2026-11-25T00:21:21Z.


Summary

Extend #95 to accept integer immediates in v_add_nc_i32 and
v_sub_nc_i32, and low-half integer immediates in v_add_nc_i16 and
v_sub_nc_i16. The 16-bit regression covers writes to either destination
half and checks that the other half is preserved. Both regressions use
synthetic RDNA 2 instructions assembled by LLVM.

Checks

  • All checks in CONTRIBUTING.md passed locally.
  • DXC compiled three synthetic compute shaders. DXV validated all three.
  • On an RTX 4080 SUPER with Proton Experimental, all 24 results for
    32-bit operations and all 48 results for 16-bit operations matched
    the expected values. The untouched half was preserved in all 48
    16-bit results. All 1,152 GPU readback words matched.

AI-assisted contribution.

<!-- greyfinch-sync:brcly/TuxBox:issue:5482673149 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/pull/125). Originally posted by [smith-3](https://github.com/smith-3) on 2026-11-25T00:21:21Z. --- ## Summary Extend #95 to accept integer immediates in `v_add_nc_i32` and `v_sub_nc_i32`, and low-half integer immediates in `v_add_nc_i16` and `v_sub_nc_i16`. The 16-bit regression covers writes to either destination half and checks that the other half is preserved. Both regressions use synthetic RDNA 2 instructions assembled by LLVM. ## Checks - All checks in CONTRIBUTING.md passed locally. - DXC compiled three synthetic compute shaders. DXV validated all three. - On an RTX 4080 SUPER with Proton Experimental, all 24 results for 32-bit operations and all 48 results for 16-bit operations matched the expected values. The untouched half was preserved in all 48 16-bit results. All 1,152 GPU readback words matched. AI-assisted contribution.
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
brcly/TuxBox!125
No description provided.