summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau/nouveau_stateobj.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_stateobj.h')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_stateobj.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_stateobj.h b/src/gallium/drivers/nouveau/nouveau_stateobj.h
index d501b76b51..78b2738070 100644
--- a/src/gallium/drivers/nouveau/nouveau_stateobj.h
+++ b/src/gallium/drivers/nouveau/nouveau_stateobj.h
@@ -2,6 +2,7 @@
#define __NOUVEAU_STATEOBJ_H__
#include "pipe/p_util.h"
+#include "pipe/p_debug.h"
struct nouveau_stateobj_reloc {
struct pipe_buffer *bo;
@@ -68,6 +69,14 @@ so_data(struct nouveau_stateobj *so, unsigned data)
}
static INLINE void
+so_datap(struct nouveau_stateobj *so, unsigned *data, unsigned size)
+{
+ so->cur_packet += (4 * size);
+ while (size--)
+ (*so->cur++) = (*data++);
+}
+
+static INLINE void
so_method(struct nouveau_stateobj *so, struct nouveau_grobj *gr,
unsigned mthd, unsigned size)
{
@@ -92,6 +101,15 @@ so_reloc(struct nouveau_stateobj *so, struct pipe_buffer *bo,
}
static INLINE void
+so_dump(struct nouveau_stateobj *so)
+{
+ unsigned i, nr = so->cur - so->push;
+
+ for (i = 0; i < nr; i++)
+ debug_printf("+0x%04x: 0x%08x\n", i, so->push[i]);
+}
+
+static INLINE void
so_emit(struct nouveau_winsys *nvws, struct nouveau_stateobj *so)
{
struct nouveau_pushbuf *pb = nvws->channel->pushbuf;