diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-12 22:46:22 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-12 22:46:22 +0100 |
commit | e269ed5d4e1b9d758aeb9a85ed0fa631f0aff0b1 (patch) | |
tree | 64193c9f4a5909e3c54c0d7860e59fdf301fd596 | |
parent | d29b8650c40c673e6ddddaf52db9247e9836cba8 (diff) |
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>
-rw-r--r-- | src/sna/kgem.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 6ea4d480..14a00679 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -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)); } |