r300g: add framebuffer state debug logging
[mesa.git] / src / gallium / drivers / r300 / r300_cs.h
index ad07efbffdbef9168fae852c5f47c1f84050f113..996a4f491e7c5c6ecdb493a05c4cf66c056a01a3 100644 (file)
@@ -26,8 +26,7 @@
 #include "util/u_math.h"
 
 #include "r300_reg.h"
-
-#include "radeon_winsys.h"
+#include "r300_winsys.h"
 
 /* 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
     cs_count--; \
 } while (0)
 
+#define OUT_CS_TABLE(values, count) do { \
+    if (VERY_VERBOSE_REGISTERS) \
+        DBG(cs_context_copy, DBG_CS, "r300: writing table of %d dwords\n", count); \
+    cs_winsys->write_cs_table(cs_winsys, values, count); \
+    cs_count -= count; \
+} while (0)
+
 #define OUT_CS_BUF_RELOC(bo, offset, rd, wd, flags) do { \
     DBG(cs_context_copy, DBG_CS, "r300: writing relocation for buffer %p, offset %d, " \
             "domains (%d, %d, %d)\n", \
         DBG(cs_context_copy, DBG_CS, "r300: FLUSH_CS in %s (%s:%d)\n\n", __FUNCTION__, \
                 __FILE__, __LINE__); \
     } \
+    if (SCREEN_DBG_ON(r300->screen, DBG_STATS)) { \
+        r300->flush_counter++; \
+    } \
     cs_winsys->flush_cs(cs_winsys); \
 } while (0)