summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-12-13 01:01:31 -0800
committerEric Anholt <eric@anholt.net>2007-12-13 23:24:53 -0800
commit9f7d6b72108d9d8bec5f567bcaf33714ffe3ebc2 (patch)
treedbe33fd073c917f578cd160aaa520e54796ed0dd /src/mesa/drivers/dri
parent37406c2038c418a1d6f26b5ac5691586c9f05631 (diff)
[intel] assert that buffers are not mapped at last unreference.
bufmgr_fake doesn't care about it, but with ttm we would end up with the buffer remaining referenced until application exit.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/common/dri_bufmgr_fake.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/dri_bufmgr_fake.c b/src/mesa/drivers/dri/common/dri_bufmgr_fake.c
index 5cd96f0821..f022552ed8 100644
--- a/src/mesa/drivers/dri/common/dri_bufmgr_fake.c
+++ b/src/mesa/drivers/dri/common/dri_bufmgr_fake.c
@@ -665,6 +665,7 @@ dri_fake_bo_unreference(dri_bo *bo)
_glthread_LOCK_MUTEX(bufmgr_fake->mutex);
if (--bo_fake->refcount == 0) {
+ assert(bo_fake->map_count == 0);
/* No remaining references, so free it */
if (bo_fake->block)
free_block(bufmgr_fake, bo_fake->block);