shader: lower scalar multiply-high instructions in pixel_aot #604
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!604
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/604/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@descent81 on GitHub · 2026-11-22 15:14 UTC · original
descent81:shader/scalar-mul-high→main· +54 −1 · 2 files · 1 commits · merged 2026-11-22 15:43 UTCChange
pixel_aotnow lowerss_mul_hi_i32ands_mul_hi_u32. Both return the high 32 bits of a 32×32 product and preserve SCC. The unsigned lowering uses 16-bit partial products. The signed lowering adjusts that high word for each negative operand. Both paths use 32-bit integer arithmetic.The source-built fixture compares both full result words with independent Python integer references and draws SCC in a separate output channel. It covers zero, signed extrema, mixed signs in both operand orders, mixed halfwords and all-one operands. For
0xFFFFFFFF × 0xFFFFFFFF, the signed high word is0x00000000and the unsigned high word is0xFFFFFFFE. Replacing the signed instruction with the unsigned instruction while keeping that reference must fail.Verification
Tested
2019dbfon base997518d.pixel_mismatch.Run from the repository root:
The draw is also registered through the Windows
pixel_aot_predicate_rounding_*tests:Evidence and follow-up
The fixture uses original assembly and synthetic inputs under the repository's MIT license. The coverage figures describe the local binary suite. AMD RDNA 2 ISA reference
AI-assisted.