diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-21 00:28:40 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-21 00:39:46 +0100 |
commit | 4ee2e227ddf61c87f08f55d4922d2562b563ca87 (patch) | |
tree | c9922ae35225a394d030e6db6723c2ff5fc33404 /src/sna/kgem.c | |
parent | eee181e9d71273d94fe735805ed84e8f7b7b2180 (diff) |
sna: Mark all levels of a proxy as dirty
So that if we write to a surface through one view, we make sure that the
sample cache is invalidated for all future views.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/kgem.c')
-rw-r--r-- | src/sna/kgem.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 49e27d07..7498e739 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -1789,10 +1789,11 @@ static void kgem_commit(struct kgem *kgem) bo->dirty = false; if (bo->proxy) { + assert(bo->exec == &_kgem_dummy_exec); /* proxies are not used for domain tracking */ list_del(&bo->request); bo->rq = NULL; - bo->exec = &_kgem_dummy_exec; + bo->exec = NULL; } } @@ -3546,14 +3547,18 @@ uint32_t kgem_add_reloc(struct kgem *kgem, delta += bo->delta; assert(bo->handle == bo->proxy->handle); /* need to release the cache upon batch submit */ - list_move_tail(&bo->request, - &kgem->next_request->buffers); - bo->exec = &_kgem_dummy_exec; + if (bo->exec == NULL) { + list_move_tail(&bo->request, + &kgem->next_request->buffers); + bo->rq = kgem->next_request; + bo->exec = &_kgem_dummy_exec; + } + bo = bo->proxy; + assert(bo->refcnt); + assert(!bo->purged); } - assert(!bo->purged); - if (bo->exec == NULL) _kgem_add_bo(kgem, bo); assert(bo->rq == kgem->next_request); |