diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-23 22:14:15 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-24 01:29:31 +0000 |
commit | ec794f7594ae5e2c223b7f7255ff8979d9fb06c1 (patch) | |
tree | f320e5d4450a77c22eb2a31286561d8d37cbc732 | |
parent | 2574a04c940e032fdcf1cd39a0950515e8652471 (diff) |
sna: Track a proxy's dirty status upon itself rather than the target
As proxy's are short-lived and are not used outside of the operation for
which they are created, dirtied or flushed, we can safely copy the dirty
status onto the proxy object itself.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/kgem.c | 1 | ||||
-rw-r--r-- | src/sna/kgem.h | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index c0c97bc1..d8a30174 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -2900,6 +2900,7 @@ struct kgem_bo *kgem_create_proxy(struct kgem_bo *target, return NULL; bo->io = target->io; + bo->dirty = target->dirty; bo->reusable = false; bo->proxy = kgem_bo_reference(target); bo->delta = offset; diff --git a/src/sna/kgem.h b/src/sna/kgem.h index 8a861718..652c2d74 100644 --- a/src/sna/kgem.h +++ b/src/sna/kgem.h @@ -414,16 +414,12 @@ static inline bool kgem_bo_is_dirty(struct kgem_bo *bo) if (bo == NULL) return FALSE; - if (bo->proxy) - bo = bo->proxy; return bo->dirty; } static inline void kgem_bo_mark_dirty(struct kgem_bo *bo) { DBG_HDR(("%s: handle=%d\n", __FUNCTION__, bo->handle)); - if (bo->proxy) - bo = bo->proxy; bo->dirty = true; } |