Skip to content

mesa/main: drop use_legacy_math_rules

Seems the only thing that really needs this is fpow(0, 0), which should return NaN, but then gets multiplied with zero. Let's fix that by doing a bcsel instead of fmul to select the result here. While we're at it, get rid of the fabs for stop, which isn't needed.

This fixes a piglits failure for most (if not all?) drivers that doesn't support legacy math rules.

I've left the xfail on nv92, as that GPU already supports legacy math rules, but still somehow fails the test (according to the xfails). I haven't been able to verify that failure myself.

Edited by Erik Faye-Lund

Merge request reports