On 9/12/18 8:17 AM, Axel Davy wrote:

The goal is to catch inf and -inf and replace them by FLT_MAX and -FLT_MAX.

Without, the NaN would appear when doing mul or mad.

Axel



I small precision I want to add: This is not the only place clamping makes a difference.

Indeed else MUL_ZERO_WINS would be safe to use and remove all the clamping.


The rasterizers can produce NaN when given Inf in the vertex shader on some devices for example,

and I think on some devices inf and FLT_MAX give different color in the pixel shader.


Thus why I want to test carefully what do the other vendors for all the shader versions (we know already there are

behaviour changes for some) and check with the behaviours mentionned above, before removing the clamps when MUL_ZERO_WINS.



Axel

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to