xf86-video-intel: 2 commits - src/sna/sna_accel.c

Chris Wilson ickle at kemper.freedesktop.org
Sun Dec 11 02:34:59 PST 2011


 src/sna/sna_accel.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit a02bbd8700690c98c6cf3ae98dd7ee3da9887b0a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Dec 11 10:34:37 2011 +0000

    sna: Only transfer the bo if the src/dst are of matching size
    
    If the src replaces the dst, it could just be a much larger pixmap!
    
    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 0b72626..861cbe7 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2013,7 +2013,9 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
 	     replaces));
 
 	if (replaces) {
-		if (dst_priv && !dst_priv->pinned &&
+		if (src_pixmap->drawable.width == dst_pixmap->drawable.width &&
+		    src_pixmap->drawable.height == dst_pixmap->drawable.height &&
+		    dst_priv && !dst_priv->pinned && 0 &&
 		    src_priv && !src_priv->pinned &&
 		    src_priv->gpu_damage == NULL) {
 			if (sna_pixmap_move_to_gpu(src_pixmap)) {
commit 43a99648635fa76e0d6d71acaeb6ba919d24eb26
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Dec 11 10:30:48 2011 +0000

    sna: Only transfer unpinned buffers
    
    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 44580be..0b72626 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2013,7 +2013,9 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
 	     replaces));
 
 	if (replaces) {
-		if (dst_priv && src_priv && src_priv->gpu_damage == NULL) {
+		if (dst_priv && !dst_priv->pinned &&
+		    src_priv && !src_priv->pinned &&
+		    src_priv->gpu_damage == NULL) {
 			if (sna_pixmap_move_to_gpu(src_pixmap)) {
 				DBG(("%s: transferring src GPU bo to dst\n", __FUNCTION__));
 				if (dst_priv->gpu_bo)


More information about the xorg-commit mailing list