util/rgb9e5: Get rid of the float754 union
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 3 Aug 2016 16:54:03 +0000 (09:54 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 5 Aug 2016 16:07:01 +0000 (09:07 -0700)
commitc7eb9a75653c1df54e6c36873c8c4ddd142b98d6
treec510310ece0e56fd1f99cdc08d9b226b466393bb
parentcda8d9566043a75dbe0bc3eaf75c61e37b65d792
util/rgb9e5: Get rid of the float754 union

There are a number of reasons for this refactor.  First, format_rgb9e5.h is
not something that a user would expect to define such a generic union.
Second, defining it requires checking for endianness which is ugly.  Third,
90% of what we were doing with the union was float <-> uint32_t bitcasts
and the remaining 10% can be done with a sinmple left-shift by 23.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/util/format_rgb9e5.h