[Mesa-dev] [PATCH 03/13] gallium/auxiliary: Use exp2(x) instead of pow(2.0, x).

Matt Turner mattst88 at gmail.com
Mon Jul 13 19:03:57 PDT 2015


On Mon, Jul 13, 2015 at 5:13 PM, Roland Scheidegger <sroland at vmware.com> wrote:
> Did you replace 2 of them by exp2f but one by exp2f on purpose?

Yes, two of them are converting their results to floats so they were
converted to exp2f().

Upon inspection, the argument of the one exp2 is just an integer...
can't we convert that to (double)(1 << arg)?

> I don't think we can use exp2/exp2f in gallium. This requires msvc 2013
> (all of exp2, exp2f, powf are c99, powf is supported by older msvc but
> the others are not). I guess though could throw some wrappers into
> c99_math.h.

Yeah, if we need to put wrappers in c99_math.h I can do that.


More information about the mesa-dev mailing list