AGC: agc_driver_mul_lo_u16_high_half fails on an AMD Radeon RDNA 2 iGPU (Windows driver 32.0.21045.5002): masked-factor v_mul_lo_u16 keeps the full product #8266
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 boykopovar/AnyPS5. Originally posted by TheSovietWaffle on 2026-10-20T07:41:25Z.
agc_driver_mul_lo_u16_high_half(added by #7018) fails 3 of 3 on main7e12b3da8on an AMD Radeon RDNA 2 iGPU (1002:164e, AMD Windows driver 32.0.21045.5002), Windows 10 Pro 22H2 (19045), WinLibs GCC 15.2.0, Release. It passes on an RTX 3080 (617.42) in the same build.ZeroHighCode,ChainCode,KeptHighCode) pass; the failure is the fourth,MaskedFactorsCode(v_and_b32of both factors with0xffff, thenv_mul_lo_u16).0xfffe0001is0xffff * 0xffff: the 32-bit product of the masked factors, with neither the low-16 truncation nor the zero high half of the destination applied. That looks like the driver's compiler folding the masks of the 24-bit field reads against the explicit0xffffmasks and dropping the final truncation, but I have not looked at the SPIR-V or the driver ISA, so it may also be something in how the recompiler emits this case.agcrun). Not checked: other AMD devices on this driver (@thuanquang's RX 6700 XT on 32.0.21045.5002 in #7936 may tell whether it is specific to this iGPU), RADV.AI-assisted: yes (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-20T08:21:55Z.
This is the same failure as #8271: same test case, same value (
0xfffe0001) and same driver 32.0.21045.5002. #8271 bisects it to #7673 and has the SPIR-V comparison, so I'm closing this one as a duplicate; the iGPU (1002:164e) result here is a useful second data point, please add it there if you can.Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-20T08:24:32Z.
@TheSovietWaffle the same failure on a discrete RDNA 2 card (RX 6700 XT, same driver 32.0.21045.5002), and it comes from our side of the pipeline. #7018 reads
v_mul_lo_u16's factors as 24-bit fields partly to hide them from this driver, which stores the full 32-bit product when it knows both factors fit in 16 bits. #7673 then added a constant-folder rule that turnsBitFieldUExtract(x, 0, 24)back intoxwhenxis already masked to 16 bits. InMaskedFactorsCodeboth factors arev_and_b32 ..., 0xffff, so the workaround was folded away and the driver was handed the pattern it miscompiles.mainwith #7673 reverted passes 3/3 here.#8280 keeps a field read that a multiply uses out of that fold, and adds two CPU cases to
agc_constant_bit_testso CI catches the fold coming back. It passes 3/3 here, with all six cases of the test, including the two packed ones that never ran because the test stopped at the fourth.