diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-10 21:34:52 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-10 21:34:52 +0100 |
commit | b44307753655fac985404c519a54ca65da323900 (patch) | |
tree | 44dfa3cdb49ab3c6958fdb1a70adb77553edde18 | |
parent | 005075de9d20fe7c2b9a6e184c912559929710ad (diff) |
sna: Make sure all sna_write_boxes* flag the GTT is dirty
Better would be to start passing in the sna_pixmap so that we can mark
the GTT as dirty in a single location, and only if we do indeed then do
a GTT update or pwrite.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 14 | ||||
-rw-r--r-- | src/sna/sna_blt.c | 12 |
2 files changed, 21 insertions, 5 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index bf5832b3..850463b1 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2889,6 +2889,7 @@ sna_pixmap_move_area_to_gpu(PixmapPtr pixmap, const BoxRec *box, unsigned int fl pixmap->devKind, 0, 0, box, 1); + priv->gtt_dirty = true; } if (!ok) return false; @@ -2920,6 +2921,7 @@ sna_pixmap_move_area_to_gpu(PixmapPtr pixmap, const BoxRec *box, unsigned int fl pixmap->devKind, 0, 0, box, n); + priv->gtt_dirty = true; } if (!ok) return false; @@ -3581,11 +3583,11 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags) pixmap->devKind); } else { ok = sna_write_boxes(sna, pixmap, - priv->gpu_bo, 0, 0, - pixmap->devPrivate.ptr, - pixmap->devKind, - 0, 0, - box, n); + priv->gpu_bo, 0, 0, + pixmap->devPrivate.ptr, + pixmap->devKind, + 0, 0, + box, n); } if (!ok) return NULL; @@ -4976,6 +4978,8 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc, src_dx, src_dy, box, n)) goto fallback; + + dst_priv->gtt_dirty = true; } assert(dst_priv->clear == false); diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c index 70026389..2520af4e 100644 --- a/src/sna/sna_blt.c +++ b/src/sna/sna_blt.c @@ -1719,6 +1719,8 @@ blt_put_composite(struct sna *sna, &box, 1); assert(ok); } + + dst_priv->gtt_dirty = true; } fastcall static void blt_put_composite_box(struct sna *sna, @@ -1755,6 +1757,8 @@ fastcall static void blt_put_composite_box(struct sna *sna, box, 1); assert(ok); } + + dst_priv->gtt_dirty = true; } static void blt_put_composite_boxes(struct sna *sna, @@ -1792,6 +1796,8 @@ static void blt_put_composite_boxes(struct sna *sna, box, n); assert(ok); } + + dst_priv->gtt_dirty = true; } fastcall static void @@ -1837,6 +1843,8 @@ blt_put_composite_with_alpha(struct sna *sna, &box, 1, 0xffffffff, op->u.blt.pixel); } + + dst_priv->gtt_dirty = true; } fastcall static void @@ -1874,6 +1882,8 @@ blt_put_composite_box_with_alpha(struct sna *sna, box, 1, 0xffffffff, op->u.blt.pixel); } + + dst_priv->gtt_dirty = true; } static void @@ -1912,6 +1922,8 @@ blt_put_composite_boxes_with_alpha(struct sna *sna, box, n, 0xffffffff, op->u.blt.pixel); } + + dst_priv->gtt_dirty = true; } static bool |