summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/nouveau
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/nouveau')
-rw-r--r--src/mesa/pipe/nouveau/nouveau_bo.h1
-rw-r--r--src/mesa/pipe/nouveau/nouveau_push.h13
2 files changed, 12 insertions, 2 deletions
diff --git a/src/mesa/pipe/nouveau/nouveau_bo.h b/src/mesa/pipe/nouveau/nouveau_bo.h
index 2b57ee9263..18020e9c65 100644
--- a/src/mesa/pipe/nouveau/nouveau_bo.h
+++ b/src/mesa/pipe/nouveau/nouveau_bo.h
@@ -35,6 +35,7 @@
#define NOUVEAU_BO_HIGH (1 << 7)
#define NOUVEAU_BO_OR (1 << 8)
#define NOUVEAU_BO_LOCAL (1 << 9)
+#define NOUVEAU_BO_DUMMY (1 << 31)
struct nouveau_bo {
struct nouveau_device *device;
diff --git a/src/mesa/pipe/nouveau/nouveau_push.h b/src/mesa/pipe/nouveau/nouveau_push.h
index 117e3535cf..679472669b 100644
--- a/src/mesa/pipe/nouveau/nouveau_push.h
+++ b/src/mesa/pipe/nouveau/nouveau_push.h
@@ -44,9 +44,8 @@
#define OUT_RELOC(bo,data,flags,vor,tor) do { \
NOUVEAU_PUSH_CONTEXT(pc); \
pc->nvws->push_reloc(pc->nvws->channel, \
- pc->nvws->channel->pushbuf->cur, \
+ pc->nvws->channel->pushbuf->cur++, \
(bo), (data), (flags), (vor), (tor)); \
- OUT_RING(0); \
} while(0)
/* Raw data + flags depending on FB/TT buffer */
@@ -71,4 +70,14 @@
OUT_RELOC((bo), (delta), (flags) | NOUVEAU_BO_HIGH, 0, 0); \
} while(0)
+/* A reloc which'll recombine into a NV_DMA_METHOD packet header */
+#define OUT_RELOCm(bo, flags, obj, mthd, size) do { \
+ NOUVEAU_PUSH_CONTEXT(pc); \
+ if (pc->nvws->channel->pushbuf->remaining < ((size) + 1)) \
+ pc->nvws->push_flush(pc->nvws->channel, ((size) + 1)); \
+ OUT_RELOCd((bo), (pc->obj->subc << 13) | ((size) << 18) | (mthd), \
+ (flags), 0, 0); \
+ pc->nvws->channel->pushbuf->remaining -= ((size) + 1); \
+} while(0)
+
#endif