xshader: check the guest mode on its real encoding before lowering extrema #543
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/543"
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 brcly/TuxBox. Originally posted by csj0oe on 2026-11-29T21:08:34Z.
What
A divergent f32 extrema reduction was lowered to
WaveActiveMin/Maxeven when the guest had changed the floating-point mode. The check only matcheds_round_mode/s_denorm_mode(Sopp 0x24/0x25), but this decoder representss_setreg_b32/s_setreg_imm32_b32as Sopk 19/21 — which is how a program actually setsMODE. One shared predicate now covers both encodings and theHW_REG_MODEfield, and bothEmitter::newand the extrema lowering call it.Also from review: the unreachable second proof is gone rather than left as a claim; 64-lane reductions cover
high == sum,high != sumand a later read; the scratch reuse carries a note naming its 32-lane ceiling; the select is matched exactly atfirst - 1with its mnemonic, and the restore is verified by mnemonic, destination and saved register.GPU verification pending
AMD and NVIDIA. No GPU or present gate was run; the extrema lowering's identity and flush behaviour is checked statically and at DXIL level only.
Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-29T21:11:52Z.
Thanks. This is in our current focus. You noted no GPU checks were run, so we're running the full check on an NVIDIA and an AMD card here, and measuring how many recorded programs' translations change. We'll merge it if that passes.