r300g: inline FLUSH_CS
authorMarek Olšák <maraeo@gmail.com>
Sat, 12 Jun 2010 21:45:02 +0000 (23:45 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sun, 13 Jun 2010 15:43:38 +0000 (17:43 +0200)
The fewer macros, the better.

src/gallium/drivers/r300/r300_cs.h
src/gallium/drivers/r300/r300_flush.c

index e4b76319e17eb34419b27f0c0d2882f961e3f3d7..1cdd4b82caa529347e00d2d4cb6a769040521264 100644 (file)
     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.
index 360b19a0c1ed74ec4871f5188ef27a1f51ebb68d..ba840bfff81b8b68da3f4aa3d22a7dfb9d70bb6e 100644 (file)
@@ -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. */