mesa: Move U_FIXED/S_FIXED macros from i965 to macros.h.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 8 Jul 2013 01:44:12 +0000 (18:44 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 13 Oct 2013 07:10:44 +0000 (00:10 -0700)
commit67601da24c98a13a1a349b4e3df38ad10ff812bb
tree4ec599ed0a19cd43ce4e954960f9de946dbdafb2
parent1a82081db6e57eaa74f852ed8acb391a7f4c2ca6
mesa: Move U_FIXED/S_FIXED macros from i965 to macros.h.

These make it easy to convert a floating point value to a fixed point
numbers.  The second parameter is the number of bits used for the
fractional part of the number.

It looks like core Mesa has similar functions already, but none that
allows an arbitrary number of fractional bits.  The more generic version
is probably useful to everyone.

r600g apparently has an identical copy of the S_FIXED macro, but doesn't
include this file.  I'm not sure what to do about that, so I'm just
going to leave it for now.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i915/intel_context.h
src/mesa/drivers/dri/i965/intel_context.h
src/mesa/main/macros.h