diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-09-19 19:12:46 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-09-19 19:12:46 +0100 |
commit | 7bb2c5c4d55560f7901fd8036cab164460f81edc (patch) | |
tree | ed9fab18221e742c547f7a217d08d1e6fbc096f6 | |
parent | 686a5ec52c9ae475fac22c36fff18814372def71 (diff) |
sna: Move an assertion to the point of import
All the guesswork is so that when we require an inactive bo, we do
actually get a buffer that is not currently on a GPU active list. For
some unresolved reason, this assertion was firing when putting the
buffer onto the inactive list - so just workaround the worrisome issue
by delaying the check until use.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/kgem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 7df019a4..1e7065da 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -613,7 +613,6 @@ void kgem_retire(struct kgem *kgem) if (bo->needs_flush) { list_add(&bo->request, &kgem->flushing); } else if (bo->reusable) { - assert(!kgem_busy(kgem, bo->handle)); list_move(&bo->list, inactive(kgem, bo->size)); } else { @@ -1507,6 +1506,8 @@ skip_active_search: bo->pitch, bo->tiling, bo->handle, bo->unique_id)); assert(bo->refcnt == 0); assert(bo->reusable); + assert((flags & CREATE_INACTIVE) == 0 || + !kgem_busy(kgem, bo->handle)); return kgem_bo_reference(bo); next_bo: |