aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon/common_cmdbuf.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2009-01-15 16:50:58 +1000
committerDave Airlie <[email protected]>2009-01-15 16:56:50 +1000
commit08d90fe8a5e12d92994c05b2ec9f68ab7232275c (patch)
treedc3b02c900e7142b5842fc97afe41b522fe53d84 /src/mesa/drivers/dri/radeon/common_cmdbuf.h
parent1a51b76343255af9be6282f93614e92788ad4f0f (diff)
r300: move some more function to generic
Diffstat (limited to 'src/mesa/drivers/dri/radeon/common_cmdbuf.h')
-rw-r--r--src/mesa/drivers/dri/radeon/common_cmdbuf.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/radeon/common_cmdbuf.h b/src/mesa/drivers/dri/radeon/common_cmdbuf.h
index 018049b4523..fbcbf72b2bf 100644
--- a/src/mesa/drivers/dri/radeon/common_cmdbuf.h
+++ b/src/mesa/drivers/dri/radeon/common_cmdbuf.h
@@ -31,7 +31,7 @@ void rcommonBeginBatch(radeonContextPtr rmesa,
/**
* Same as BEGIN_BATCH, but do not cause automatic state emits.
*/
-#define BEGIN_BATCH_NO_AUTOSTATE(n) rcommonBeginBatch(b_l_r300, n, 0, __FILE__, __FUNCTION__, __LINE__)
+#define BEGIN_BATCH_NO_AUTOSTATE(n) rcommonBeginBatch(b_l_rmesa, n, 0, __FILE__, __FUNCTION__, __LINE__)
/**
* Write one dword to the command buffer.
@@ -89,5 +89,17 @@ void rcommonBeginBatch(radeonContextPtr rmesa,
} while(0)
+/** Single register write to command buffer; requires 2 dwords. */
+#define OUT_BATCH_REGVAL(reg, val) \
+ OUT_BATCH(cmdpacket0(b_l_rmesa->radeonScreen, (reg), 1)); \
+ OUT_BATCH((val))
+/** Continuous register range write to command buffer; requires 1 dword,
+ * expects count dwords afterwards for register contents. */
+#define OUT_BATCH_REGSEQ(reg, count) \
+ OUT_BATCH(cmdpacket0(b_l_rmesa->radeonScreen, (reg), (count)));
+
+/** Write a 32 bit float to the ring; requires 1 dword. */
+#define OUT_BATCH_FLOAT32(f) \
+ OUT_BATCH(radeonPackFloat32((f)));
#endif