summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2009-02-14 03:23:50 -0800
committerCorbin Simpson <MostAwesomeDude@gmail.com>2009-02-15 05:05:58 -0800
commitf176c94e49a50b05b3af9f748a67e2ebd2e1b8fd (patch)
tree9f954f9d374504c56c287b11f5e7f533f4b48c75 /src
parent8520b15018ca10e2bc47c1db4f7378df6d3c2e99 (diff)
r300-gallium: Use fui instead of a roll-my-own.
Man, util/u_math just gets better by the day.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r300/r300_cs.h16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/gallium/drivers/r300/r300_cs.h b/src/gallium/drivers/r300/r300_cs.h
index 385b61a096..3049702a94 100644
--- a/src/gallium/drivers/r300/r300_cs.h
+++ b/src/gallium/drivers/r300/r300_cs.h
@@ -23,21 +23,11 @@
#ifndef R300_CS_H
#define R300_CS_H
+#include "util/u_math.h"
+
#include "r300_reg.h"
#include "r300_winsys.h"
-/* Pack a 32-bit float into a dword. */
-static uint32_t pack_float_32(float f)
-{
- union {
- float f;
- uint32_t u;
- } u;
-
- u.f = f;
- return u.u;
-}
-
/* Yes, I know macros are ugly. However, they are much prettier than the code
* that they neatly hide away, and don't have the cost of function setup,so
* we're going to use them. */
@@ -80,7 +70,7 @@ static uint32_t pack_float_32(float f)
} while (0)
#define OUT_CS_32F(value) do { \
- cs_winsys->write_cs_dword(cs, pack_float_32(value)); \
+ cs_winsys->write_cs_dword(cs, fui(value)); \
cs_count--; \
} while (0)