Mesa (master): nouveau: fix for latest libdrm

Ben Skeggs darktama at kemper.freedesktop.org
Tue Feb 16 00:33:44 UTC 2010


Module: Mesa
Branch: master
Commit: bd3829b5f5b204d95d9ac3e5538ca11d0904ba7d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bd3829b5f5b204d95d9ac3e5538ca11d0904ba7d

Author: Ben Skeggs <bskeggs at redhat.com>
Date:   Mon Feb 15 16:45:39 2010 +1000

nouveau: fix for latest libdrm

---

 src/gallium/drivers/nouveau/nouveau_stateobj.h |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/nouveau/nouveau_stateobj.h b/src/gallium/drivers/nouveau/nouveau_stateobj.h
index e844f6a..5357e98 100644
--- a/src/gallium/drivers/nouveau/nouveau_stateobj.h
+++ b/src/gallium/drivers/nouveau/nouveau_stateobj.h
@@ -229,7 +229,6 @@ so_bo_is_reloc(struct nouveau_stateobj *so, struct nouveau_bo *bo)
 static INLINE void
 so_emit(struct nouveau_channel *chan, struct nouveau_stateobj *so)
 {
-	struct nouveau_pushbuf *pb = chan->pushbuf;
 	unsigned nr, i;
 	int ret = 0;
 
@@ -260,7 +259,7 @@ so_emit(struct nouveau_channel *chan, struct nouveau_stateobj *so)
 	for (i = 0; i < so->cur_reloc; i++) {
 		struct nouveau_stateobj_reloc *r = &so->reloc[i];
 
-		if ((ret = nouveau_pushbuf_emit_reloc(chan, pb->cur - nr +
+		if ((ret = nouveau_pushbuf_emit_reloc(chan, chan->cur - nr +
 						r->push_offset, r->bo, r->data,
 						0, r->flags, r->vor, r->tor))) {
 			debug_printf("so_emit failed reloc with error %d\n", ret);
@@ -272,7 +271,6 @@ so_emit(struct nouveau_channel *chan, struct nouveau_stateobj *so)
 static INLINE void
 so_emit_reloc_markers(struct nouveau_channel *chan, struct nouveau_stateobj *so)
 {
-	struct nouveau_pushbuf *pb = chan->pushbuf;
 	struct nouveau_grobj *gr = NULL;
 	unsigned i;
 	int ret = 0;
@@ -318,8 +316,6 @@ so_emit_reloc_markers(struct nouveau_channel *chan, struct nouveau_stateobj *so)
 			debug_printf("OUT_RELOC failed %d\n", ret);
 			assert(0);
 		}
-
-		pb->remaining -= 2;
 	}
 }
 




More information about the mesa-commit mailing list