summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/nouveau/nouveau_pushbuf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdrm/nouveau/nouveau_pushbuf.c b/libdrm/nouveau/nouveau_pushbuf.c
index 86d5a4e3..1192e228 100644
--- a/libdrm/nouveau/nouveau_pushbuf.c
+++ b/libdrm/nouveau/nouveau_pushbuf.c
@@ -267,6 +267,8 @@ nouveau_pushbuf_flush(struct nouveau_channel *chan, unsigned min)
*(nvpb->base.cur++) = nvpb->cal_suffix0;
*(nvpb->base.cur++) = nvpb->cal_suffix1;
+ if (nvpb->base.remaining > 2) /* space() will fixup if not */
+ nvpb->base.remaining -= 2;
req.channel = chan->id;
req.handle = nvpb->buffer[nvpb->current]->handle;