Repository navigation
Shaders: sign-extend 24-bit multiply operands with Ibfe - #3737
andrewpozdnakov7-jpg wants to merge 2 commits into
Conversation
|
Windows CI passed on The next step is maintainer review. Please retain the Git author on cherry-pick or rebase, or add AI-assisted with OpenAI Codex. |
|
Hardware run: RX 5700 XT (Navi 10, RDNA1, 32–64 lanes, driver 32.0.21045.29003, Windows 11 26200), head
AI use: Claude Code (Claude Opus 5.5). |
|
Thanks, @ColorMeBoom. The existing suite didn't directly exercise the signed path. 96547d5 adds that coverage without changing the lowerer. The compute fixture checks the low product, signed high product, and wrapping multiply-add in one dispatch. It combines 12 factors per input with four full-width addends. The factors include both sides of bit 23 and pairs that differ only in the ignored high byte. On WARP 1.0.22, all 1,728 result words matched the integer model on both main and the PR. Strict Clippy and Windows CI passed. If you have another RX 5700 XT slot, could you run just the new test on the updated head? Leave the default adapter enabled to check both the card and WARP. Please retain the Git author on cherry-pick or rebase, or add a Co-authored-by trailer for andrewpozdnakov7-jpg andrewpozdnakov7-jpg@users.noreply.github.com if folding the commit. AI-assisted with OpenAI Codex. |
Use DXIL
Ibfe(24, 0, value)to sign-extend each multiplicand in signed 24-bit MUL, MUL_HI, and MAD. The unsigned forms use their existing logical shift sequence through the same helper. DXIL Ibfe semantics.On Microsoft WARP 1.0.22 with Agility 1.620.2, both revisions matched 6,912 output words against a wide-integer model. The generated cases cover both multiply encodings, the 24-bit sign boundary, ignored upper-byte bits, and full-width MAD addends. The existing integer model and 24-bit lowering tests passed, along with strict all-feature shader Clippy and the asset policy. The table describes emitted DXIL. Game performance was unmeasured.
#3632 covers the unsigned operand mask. #3731 replaces the multiply/add pair after extension. #3007 can replace the multiply-high calculation after extension.
Please retain the Git author on cherry-pick or rebase, or add
Co-authored-by: andrewpozdnakov7-jpg <andrewpozdnakov7-jpg@users.noreply.github.com>if folding the change into another commit.AI-assisted with OpenAI Codex.