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>
This commit is contained in:
Chris Wilson 2011-09-19 19:12:46 +01:00
parent 686a5ec52c
commit 7bb2c5c4d5
1 changed files with 2 additions and 1 deletions

View File

@ -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: