xf86-video-intel: src/sna/sna_accel.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Jan 14 16:20:41 PST 2013
src/sna/sna_accel.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 6abd442279fd32d1ce9b33a72eabbeb922316151
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Jan 15 00:15:23 2013 +0000
sna: Avoid allocating an active CPU bo unnecessarily
If we will not write back the GPU damage to the bo as we intend to
overwrite it for the next operation, we can forgo allocating the active
CPU bo and skip the synchronisation overhead.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 9125f9c..0562641 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -1645,7 +1645,8 @@ skip_inplace_map:
}
if (pixmap->devPrivate.ptr == NULL &&
- !sna_pixmap_alloc_cpu(sna, pixmap, priv, priv->gpu_damage != NULL && !priv->clear))
+ !sna_pixmap_alloc_cpu(sna, pixmap, priv,
+ flags & MOVE_READ ? priv->gpu_damage && !priv->clear : 0))
return false;
if (priv->clear) {
@@ -1985,7 +1986,7 @@ sna_drawable_move_region_to_cpu(DrawablePtr drawable,
if (pixmap->devPrivate.ptr == NULL &&
!sna_pixmap_alloc_cpu(sna, pixmap, priv,
- priv->gpu_damage && !priv->clear)) {
+ flags & MOVE_READ ? priv->gpu_damage && !priv->clear : 0)) {
if (dx | dy)
RegionTranslate(region, -dx, -dy);
return false;
More information about the xorg-commit
mailing list