summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nouveau_stateobj.h
diff options
context:
space:
mode:
authorMaarten Maathuis <[email protected]>2009-12-20 12:19:19 +0100
committerMaarten Maathuis <[email protected]>2010-01-05 19:13:34 +0100
commitc306ef5e81da5456d39a6e98cfc1f5f00b9c77a7 (patch)
tree58f0c404f138e55e98e5140ea6ec2c292dc61e5b /src/gallium/drivers/nouveau/nouveau_stateobj.h
parent3e18bad36d90255dca6cb519eb7ecfc540c292c1 (diff)
nv50: remove vtxbuf stateobject after a referenced vtxbuf is mapped
- This avoids problematic "reloc'ed while mapped" messages and some associated corruption as well. Signed-off-by: Maarten Maathuis <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_stateobj.h')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_stateobj.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_stateobj.h b/src/gallium/drivers/nouveau/nouveau_stateobj.h
index 9aee9e49566..77ff7dcf209 100644
--- a/src/gallium/drivers/nouveau/nouveau_stateobj.h
+++ b/src/gallium/drivers/nouveau/nouveau_stateobj.h
@@ -98,6 +98,19 @@ so_reloc(struct nouveau_stateobj *so, struct nouveau_bo *bo,
so_data(so, data);
}
+/* Determine if this buffer object is referenced by this state object. */
+static INLINE boolean
+so_bo_is_reloc(struct nouveau_stateobj *so, struct nouveau_bo *bo)
+{
+ int i;
+
+ for (i = 0; i < so->cur_reloc; i++)
+ if (so->reloc[i].bo == bo)
+ return true;
+
+ return false;
+}
+
static INLINE void
so_dump(struct nouveau_stateobj *so)
{