sna: Restore CPU domain for vmapped buffers when reusing

For a vmapped upload buffer, we need to notify the kernel (and thereby
the GPU) to invalidate the sampler and flush its caches when we reuse an
idle buffer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-04-12 22:46:22 +01:00
parent d29b8650c4
commit e269ed5d4e
1 changed files with 4 additions and 0 deletions

View File

@ -3600,6 +3600,10 @@ struct kgem_bo *kgem_create_buffer(struct kgem *kgem,
offset = 0;
bo->used = size;
list_move(&bo->base.list, &kgem->active_partials);
if (bo->base.vmap)
kgem_bo_sync__cpu(kgem, &bo->base);
goto done;
} while (kgem_retire(kgem));
}