[Mesa-dev] [PATCH 04/50] glsl: Add "built-in" functions to do eq(fp64, fp64)

Dave Airlie airlied at gmail.com
Thu Mar 15 03:12:25 UTC 2018


> Is a mix really warranted here? Could just use
> return result && !(isaNaN || isbNaN) (since the other mix part is just
> false I think mix is a bit overkill, albeit it might not really make a
> difference).
> Actually I think it should be simplified, you don't need to check both
> vars for NaN (because if just one is NaN, the comparison(s) will be
> false anyway).
> so just return result && !isaNaN

This saves 2 instructions, granted that is a minor drop in a very large
ocean, but seems fine to just do it.

Dave.


More information about the mesa-dev mailing list