Mesa (master): r300g: inline FLUSH_CS
Marek Olšák
mareko at kemper.freedesktop.org
Sun Jun 13 15:44:22 UTC 2010
Module: Mesa
Branch: master
Commit: 7ca24dfa6daead4722d03d9a947f1e049b9c7d38
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7ca24dfa6daead4722d03d9a947f1e049b9c7d38
Author: Marek Olšák <maraeo at gmail.com>
Date: Sat Jun 12 23:45:02 2010 +0200
r300g: inline FLUSH_CS
The fewer macros, the better.
---
src/gallium/drivers/r300/r300_cs.h | 7 -------
src/gallium/drivers/r300/r300_flush.c | 7 ++++---
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/src/gallium/drivers/r300/r300_cs.h b/src/gallium/drivers/r300/r300_cs.h
index e4b7631..1cdd4b8 100644
--- a/src/gallium/drivers/r300/r300_cs.h
+++ b/src/gallium/drivers/r300/r300_cs.h
@@ -58,13 +58,6 @@
cs_winsys->end_cs(cs_winsys, __FILE__, __FUNCTION__, __LINE__); \
} while (0)
-#define FLUSH_CS do { \
- if (SCREEN_DBG_ON(r300->screen, DBG_STATS)) { \
- r300->flush_counter++; \
- } \
- cs_winsys->flush_cs(cs_winsys); \
-} while (0)
-
/**
* Writing pure DWORDs.
diff --git a/src/gallium/drivers/r300/r300_flush.c b/src/gallium/drivers/r300/r300_flush.c
index 360b19a..ba840bf 100644
--- a/src/gallium/drivers/r300/r300_flush.c
+++ b/src/gallium/drivers/r300/r300_flush.c
@@ -39,8 +39,6 @@ static void r300_flush(struct pipe_context* pipe,
struct r300_atom *atom;
struct r300_fence **rfence = (struct r300_fence**)fence;
- CS_LOCALS(r300);
- (void) cs_count;
/* We probably need to flush Draw, but we may have been called from
* within Draw. This feels kludgy, but it might be the best thing.
*
@@ -52,7 +50,10 @@ static void r300_flush(struct pipe_context* pipe,
if (r300->dirty_hw) {
r300_emit_query_end(r300);
- FLUSH_CS;
+ if (SCREEN_DBG_ON(r300->screen, DBG_STATS)) {
+ r300->flush_counter++;
+ }
+ r300->rws->flush_cs(r300->rws);
r300->dirty_hw = 0;
/* New kitchen sink, baby. */
More information about the mesa-commit
mailing list