shader: lower scalar multiply-high instructions in pixel_aot #598
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/604"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by descent81 on 2026-11-22T15:14:43Z.
Change
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.