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>
This commit is contained in:
parent
eee181e9d7
commit
4ee2e227dd
|
|
@ -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,13 +3547,17 @@ 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;
|
||||
bo = bo->proxy;
|
||||
}
|
||||
if (bo->exec == NULL) {
|
||||
list_move_tail(&bo->request,
|
||||
&kgem->next_request->buffers);
|
||||
bo->rq = kgem->next_request;
|
||||
bo->exec = &_kgem_dummy_exec;
|
||||
}
|
||||
|
||||
assert(!bo->purged);
|
||||
bo = bo->proxy;
|
||||
assert(bo->refcnt);
|
||||
assert(!bo->purged);
|
||||
}
|
||||
|
||||
if (bo->exec == NULL)
|
||||
_kgem_add_bo(kgem, bo);
|
||||
|
|
|
|||
|
|
@ -536,15 +536,17 @@ static inline bool kgem_bo_is_dirty(struct kgem_bo *bo)
|
|||
|
||||
static inline void kgem_bo_mark_dirty(struct kgem_bo *bo)
|
||||
{
|
||||
if (bo->dirty)
|
||||
return;
|
||||
do {
|
||||
if (bo->dirty)
|
||||
return;
|
||||
|
||||
DBG(("%s: handle=%d\n", __FUNCTION__, bo->handle));
|
||||
DBG(("%s: handle=%d\n", __FUNCTION__, bo->handle));
|
||||
assert(bo->exec);
|
||||
assert(bo->rq);
|
||||
|
||||
assert(bo->exec);
|
||||
assert(bo->rq);
|
||||
bo->needs_flush = bo->dirty = true;
|
||||
list_move(&bo->request, &bo->rq->buffers);
|
||||
bo->needs_flush = bo->dirty = true;
|
||||
list_move(&bo->request, &bo->rq->buffers);
|
||||
} while ((bo = bo->proxy));
|
||||
}
|
||||
|
||||
#define KGEM_BUFFER_WRITE 0x1
|
||||
|
|
|
|||
Loading…
Reference in New Issue