summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-02-21 17:01:00 -0700
committerBrian Paul <brianp@vmware.com>2011-02-21 17:01:00 -0700
commit12f25eb6d5521ad2dc61eab08331c1ea8d3c67f7 (patch)
tree39d4a50fa9b195c87169db5e72c2a64b7ed91a87 /src/mesa/main
parente2d108ec828bdbebdc7e8f9df30c86f0b521aa8d (diff)
Revert "mesa: convert macros to inline functions"
This reverts commit e9ff76aa81d9bd973d46b7e46f1e4ece2112a5b7. Need to use macros so __FUNCTION__ reports the caller.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/context.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 8c115c73c6..4e391dde49 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -192,41 +192,41 @@ _mesa_Flush( void );
/**
* Flush vertices.
- * \param newstate bitmask of _NEW_x flags
+ *
+ * \param ctx GL context.
+ * \param newstate new state.
*
* Checks if dd_function_table::NeedFlush is marked to flush stored vertices,
* and calls dd_function_table::FlushVertices if so. Marks
* __struct gl_contextRec::NewState with \p newstate.
*/
-static INLINE void
-FLUSH_VERTICES(struct gl_context *ctx, GLbitfield newstate)
-{
- if (MESA_VERBOSE & VERBOSE_STATE)
- _mesa_debug(ctx, "FLUSH_VERTICES in %s\n", MESA_FUNCTION);
- if (ctx->Driver.NeedFlush & FLUSH_STORED_VERTICES)
- ctx->Driver.FlushVertices(ctx, FLUSH_STORED_VERTICES);
- ctx->NewState |= newstate;
-}
-
+#define FLUSH_VERTICES(ctx, newstate) \
+do { \
+ if (MESA_VERBOSE & VERBOSE_STATE) \
+ _mesa_debug(ctx, "FLUSH_VERTICES in %s\n", MESA_FUNCTION);\
+ if (ctx->Driver.NeedFlush & FLUSH_STORED_VERTICES) \
+ ctx->Driver.FlushVertices(ctx, FLUSH_STORED_VERTICES); \
+ ctx->NewState |= newstate; \
+} while (0)
/**
* Flush current state.
- * \param newstate bitmask of _NEW_x flags
+ *
+ * \param ctx GL context.
+ * \param newstate new state.
*
* Checks if dd_function_table::NeedFlush is marked to flush current state,
* and calls dd_function_table::FlushVertices if so. Marks
* __struct gl_contextRec::NewState with \p newstate.
*/
-static INLINE void
-FLUSH_CURRENT(struct gl_context *ctx, GLbitfield newstate)
-{
- if (MESA_VERBOSE & VERBOSE_STATE)
- _mesa_debug(ctx, "FLUSH_CURRENT in %s\n", MESA_FUNCTION);
- if (ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT)
- ctx->Driver.FlushVertices(ctx, FLUSH_UPDATE_CURRENT);
- ctx->NewState |= newstate;
-}
-
+#define FLUSH_CURRENT(ctx, newstate) \
+do { \
+ if (MESA_VERBOSE & VERBOSE_STATE) \
+ _mesa_debug(ctx, "FLUSH_CURRENT in %s\n", MESA_FUNCTION); \
+ if (ctx->Driver.NeedFlush & FLUSH_UPDATE_CURRENT) \
+ ctx->Driver.FlushVertices(ctx, FLUSH_UPDATE_CURRENT); \
+ ctx->NewState |= newstate; \
+} while (0)
/**
* Macro to assert that the API call was made outside the