summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_cs.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2009-03-22 12:01:21 +1000
committerDave Airlie <airlied@linux.ie>2009-03-22 12:01:21 +1000
commit2d26d4ac66e8c3e48b73d3e172d0e0d2a2ad31a5 (patch)
tree6b0d899db605b28e10b9b953d181b09bf40bb472 /src/gallium/drivers/r300/r300_cs.h
parent407e8ae5b167b0193e1e5b1266a5d61ed836dfb5 (diff)
parent699897e81c623e53be51fba0488f535b0a8d7761 (diff)
Merge remote branch 'origin/master' into HEAD
Diffstat (limited to 'src/gallium/drivers/r300/r300_cs.h')
-rw-r--r--src/gallium/drivers/r300/r300_cs.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_cs.h b/src/gallium/drivers/r300/r300_cs.h
index d8038ff1e1..9913678d27 100644
--- a/src/gallium/drivers/r300/r300_cs.h
+++ b/src/gallium/drivers/r300/r300_cs.h
@@ -47,9 +47,6 @@
#define CP_PACKET0(register, count) \
(RADEON_CP_PACKET0 | ((count) << 16) | ((register) >> 2))
-#define CP_PACKET3(op, count) \
- (RADEON_CP_PACKET3 | (op) | ((count) << 16))
-
#define CS_LOCALS(context) \
struct r300_winsys* cs_winsys = context->winsys; \
struct radeon_cs* cs = cs_winsys->cs; \
@@ -118,6 +115,21 @@
cs_winsys->flush_cs(cs); \
} while (0)
-#include "r300_cs_inlines.h"
+#define RADEON_ONE_REG_WR (1 << 15)
+
+#define OUT_CS_ONE_REG(register, count) do { \
+ if (VERY_VERBOSE_REGISTERS) \
+ debug_printf("r300: writing data sequence of %d to 0x%04X\n", \
+ count, register); \
+ assert(register); \
+ OUT_CS(CP_PACKET0(register, ((count) - 1)) | RADEON_ONE_REG_WR); \
+} while (0)
+
+#define CP_PACKET3(op, count) \
+ (RADEON_CP_PACKET3 | (op) | ((count) << 16))
+
+#define OUT_CS_PKT3(op, count) do { \
+ OUT_CS(CP_PACKET3(op, count)); \
+} while (0)
#endif /* R300_CS_H */