summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_cs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r300/r300_cs.h')
-rw-r--r--src/gallium/drivers/r300/r300_cs.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_cs.h b/src/gallium/drivers/r300/r300_cs.h
index 1cdd4b82caa..1649766989d 100644
--- a/src/gallium/drivers/r300/r300_cs.h
+++ b/src/gallium/drivers/r300/r300_cs.h
@@ -56,6 +56,7 @@
if (cs_count != 0) \
debug_printf("r300: Warning: cs_count off by %d\n", cs_count); \
cs_winsys->end_cs(cs_winsys, __FILE__, __FUNCTION__, __LINE__); \
+ cs_count = 0; \
} while (0)
@@ -137,4 +138,15 @@
cs_count -= 4; \
} while (0)
+
+/**
+ * Command buffer emission.
+ */
+
+/* It's recommended not to call begin_cs/end_cs before/after this macro. */
+#define WRITE_CS_TABLE(values, count) do { \
+ assert(cs_count == 0); \
+ cs_winsys->write_cs_table(cs_winsys, values, count); \
+} while (0)
+
#endif /* R300_CS_H */