nir: Make the type casting operations static inline functions
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 5 Dec 2014 19:00:05 +0000 (11:00 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 15 Jan 2015 15:20:20 +0000 (07:20 -0800)
commit8edcd1de143816d4e1268dc7617ec23a067db970
treeb37a0748a0212286a4c95901bc0088977929703d
parent919426631b7bd32f012eb9b6ffd8a9aff74788e1
nir: Make the type casting operations static inline functions

Previously, the casting operations were macros.  While this is usually
fine, the casting macro used the input parameter twice leading to strange
behavior when you passed the result of another function into it.  Since we
know the source and destination types explicitly, we don't loose anything
by making it a function.

Also, this gives us a nice little macro for creating cast function that
will hopefully prevent mistyping.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/glsl/nir/nir.h