Skip to content

aco: fix fddx/y with uniform inf/nan input

Rhys Perry requested to merge pendingchaos/mesa:aco_uniform_fddxy_infnan into main

inf or nan subtracted by itself is not zero.

I don't think Vulkan requires this, but this better matches NIR's constant folding and the divergent implementation.

fossil-db (navi31):

Totals from 3 (0.00% of 79395) affected shaders:
Instrs: 537 -> 588 (+9.50%)
CodeSize: 3132 -> 3380 (+7.92%)
Latency: 2806 -> 2819 (+0.46%)
InvThroughput: 286 -> 316 (+10.49%)
Copies: 24 -> 39 (+62.50%)
VALU: 262 -> 289 (+10.31%)
SALU: 33 -> 51 (+54.55%)

Merge request reports