sna: Upload the ordinary partial buffers!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-02-27 12:06:50 +00:00
parent 4adb6967a8
commit 6fd8d74a6a
1 changed files with 9 additions and 8 deletions

View File

@ -1393,6 +1393,7 @@ static void kgem_finish_partials(struct kgem *kgem)
assert(bo->base.rq == kgem->next_request);
assert(bo->base.domain != DOMAIN_GPU);
assert(bo->need_io);
if (bo->base.refcnt == 1 && bo->used < bytes(&bo->base) / 2) {
struct kgem_bo *shrink;
@ -1439,16 +1440,16 @@ static void kgem_finish_partials(struct kgem *kgem)
bubble_sort_partial(kgem, bo);
continue;
}
DBG(("%s: handle=%d, uploading %d/%d\n",
__FUNCTION__, bo->base.handle, bo->used, bytes(&bo->base)));
assert(!kgem_busy(kgem, bo->base.handle));
assert(bo->used <= bytes(&bo->base));
gem_write(kgem->fd, bo->base.handle,
0, bo->used, bo->mem);
bo->need_io = 0;
}
DBG(("%s: handle=%d, uploading %d/%d\n",
__FUNCTION__, bo->base.handle, bo->used, bytes(&bo->base)));
assert(!kgem_busy(kgem, bo->base.handle));
assert(bo->used <= bytes(&bo->base));
gem_write(kgem->fd, bo->base.handle,
0, bo->used, bo->mem);
bo->need_io = 0;
decouple:
list_del(&bo->base.list);
kgem_bo_unref(kgem, &bo->base);