Mesa (master): r300-gallium: Move maths from r300_state to r300_state_inlines.

Corbin Simpson csimpson at kemper.freedesktop.org
Sat Feb 28 19:23:17 UTC 2009


Module: Mesa
Branch: master
Commit: 2b7d39da1f5445e1b0beb3b8b1ef9004e684c600
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2b7d39da1f5445e1b0beb3b8b1ef9004e684c600

Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date:   Sat Feb 28 11:20:26 2009 -0800

r300-gallium: Move maths from r300_state to r300_state_inlines.

---

 src/gallium/drivers/r300/r300_state.c         |    4 ----
 src/gallium/drivers/r300/r300_state_inlines.h |    6 ++++++
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index 693f3c1..6e64ad2 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
@@ -318,10 +318,6 @@ static void r300_set_polygon_stipple(struct pipe_context* pipe,
     /* XXX */
 }
 
-static INLINE int pack_float_16_6x(float f) {
-    return ((int)(f * 6.0) & 0xffff);
-}
-
 /* Create a new rasterizer state based on the CSO rasterizer state.
  *
  * This is a very large chunk of state, and covers most of the graphics
diff --git a/src/gallium/drivers/r300/r300_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h
index 361443a..e125405 100644
--- a/src/gallium/drivers/r300/r300_state_inlines.h
+++ b/src/gallium/drivers/r300/r300_state_inlines.h
@@ -28,6 +28,12 @@
 
 #include "r300_reg.h"
 
+/* Some maths. These should probably find their way to u_math, if needed. */
+
+static INLINE int pack_float_16_6x(float f) {
+    return ((int)(f * 6.0) & 0xffff);
+}
+
 /* Blend state. */
 
 static INLINE uint32_t r300_translate_blend_function(int blend_func)




More information about the mesa-commit mailing list