diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-08 20:48:48 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-08 22:48:11 +0000 |
commit | 6c70558ae7298db94724c931d88a730ef0151608 (patch) | |
tree | ddf1c4183b2fb22fda3ac21d22e17043856bba59 /src | |
parent | 9ec31af02922bb016d0dfba07bc60cdca35b36f8 (diff) |
sna: mark the cpu bo used for the upload buffer as in CPU domain
For correctness we need to inform GEM of the change of domain for the
buffer so that it knows to invalidate any caches when it is next used by
the GPU.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/kgem.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 643771fd..6801c597 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -2883,6 +2883,9 @@ struct kgem_bo *kgem_create_buffer(struct kgem *kgem, return NULL; } + if (write) + kgem_bo_sync__cpu(kgem, &bo->base); + bo->need_io = false; bo->base.io = true; |