xf86-video-intel: 2 commits - configure.ac src/sna/sna_blt.c src/sna/sna_transform.c tools/virtual.c

Chris Wilson ickle at kemper.freedesktop.org
Mon Mar 17 00:59:13 PDT 2014


 configure.ac            |    2 ++
 src/sna/sna_blt.c       |    8 +++++---
 src/sna/sna_transform.c |   25 +++++++++++++++++++------
 tools/virtual.c         |    2 +-
 4 files changed, 27 insertions(+), 10 deletions(-)

New commits:
commit 28ebbe8fa902a1d3ee4ecbda5041de5e7b68ada7
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Mar 17 07:56:39 2014 +0000

    sna: Fix logic inversion in use of imprecise transform conversion
    
    An accidental drop of the if (!is_translation) broke composite copies
    under a transform.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76244
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c
index 41058c6..284f77e 100644
--- a/src/sna/sna_blt.c
+++ b/src/sna/sna_blt.c
@@ -2515,13 +2515,15 @@ fill:
 		return false;
 	}
 
-	if (sna_transform_is_imprecise_integer_translation(src->transform, src->filter,
-							   dst->polyMode == PolyModePrecise,
-							   &tx, &ty)) {
+	if (!sna_transform_is_imprecise_integer_translation(src->transform, src->filter,
+							    dst->polyMode == PolyModePrecise,
+							    &tx, &ty)) {
 		DBG(("%s: source transform is not an integer translation\n",
 		     __FUNCTION__));
 		return false;
 	}
+	DBG(("%s: converting transform to integer translation? (%d, %d)\n",
+	     __FUNCTION__, src->transform != NULL, tx, ty));
 	x += tx;
 	y += ty;
 
diff --git a/src/sna/sna_transform.c b/src/sna/sna_transform.c
index 57d1987..3b54df4 100644
--- a/src/sna/sna_transform.c
+++ b/src/sna/sna_transform.c
@@ -102,36 +102,49 @@ sna_transform_is_imprecise_integer_translation(const PictTransform *t,
 					       int16_t *tx, int16_t *ty)
 {
 	if (t == NULL) {
+		DBG(("%s: no transform\n", __FUNCTION__));
 		*tx = *ty = 0;
 		return true;
 	}
 
+	DBG(("%s: FilterNearest?=%d, precise?=%d, transform=[%f %f %f, %f %f %f, %f %f %f]\n",
+	     __FUNCTION__, filter==PictFilterNearest, precise,
+	     t->matrix[0][0]/65536., t->matrix[0][1]/65536., t->matrix[0][2]/65536.,
+	     t->matrix[1][0]/65536., t->matrix[1][1]/65536., t->matrix[1][2]/65536.,
+	     t->matrix[2][0]/65536., t->matrix[2][1]/65536., t->matrix[2][2]/65536.));
+
 	if (t->matrix[0][0] != IntToxFixed(1) ||
 	    t->matrix[0][1] != 0 ||
 	    t->matrix[1][0] != 0 ||
 	    t->matrix[1][1] != IntToxFixed(1) ||
 	    t->matrix[2][0] != 0 ||
 	    t->matrix[2][1] != 0 ||
-	    t->matrix[2][2] != IntToxFixed(1))
+	    t->matrix[2][2] != IntToxFixed(1)) {
+		DBG(("%s: not unity scaling\n", __FUNCTION__));
 		return false;
+	}
 
-	DBG(("%s: filter=%d, translation (%x, %x), precise? %d\n",
-	     __FUNCTION__, filter, t->matrix[0][2], t->matrix[1][2], precise));
 	if (filter != PictFilterNearest) {
 		if (precise) {
 			if (pixman_fixed_fraction(t->matrix[0][2]) ||
-			    pixman_fixed_fraction(t->matrix[1][2]))
+			    pixman_fixed_fraction(t->matrix[1][2])) {
+				DBG(("%s: precise, fractional translation\n", __FUNCTION__));
 				return false;
+			}
 		} else {
 			int f;
 
 			f = pixman_fixed_fraction(t->matrix[0][2]);
-			if (f < IntToxFixed(1)/4 || f > IntToxFixed(3)/4)
+			if (f < IntToxFixed(1)/4 || f > IntToxFixed(3)/4) {
+				DBG(("%s: imprecise, fractional translation X\n", __FUNCTION__));
 				return false;
+			}
 
 			f = pixman_fixed_fraction(t->matrix[1][2]);
-			if (f < IntToxFixed(1)/4 || f > IntToxFixed(3)/4)
+			if (f < IntToxFixed(1)/4 || f > IntToxFixed(3)/4) {
+				DBG(("%s: imprecise, fractional translation Y\n", __FUNCTION__));
 				return false;
+			}
 		}
 	}
 
commit 57e63221ec0fa304a02beed356549cadb28bcf19
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Mar 14 19:49:59 2014 +0000

    intel-virtual-output: Minor DBG fixes
    
    Improve the summary after failing to detect MIT-SHM, and fix a DBG
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/configure.ac b/configure.ac
index 7bf07ae..f68cdf4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -235,7 +235,9 @@ if test "x$tools" = "xyes"; then
       AC_CHECK_HEADERS([X11/extensions/XShm.h X11/extensions/shmproto.h X11/extensions/shmstr.h], [], [tools=no],
 		       [#include <X11/Xlibint.h>
 			#include <X11/Xproto.h>])
+fi
 
+if test "x$tools" = "xyes"; then
       tools_msg="$tools_msg intel-virtual-output"
 fi
 
diff --git a/tools/virtual.c b/tools/virtual.c
index c994574..5883950 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -1201,7 +1201,7 @@ err:
 					     (long)src->mode.id,
 					     src->mode.width,
 					     src->mode.height,
-					     dst->name (long)id,));
+					     dst->name, (long)id));
 					XRRAddOutputMode(dst->dpy, dst->rr_output, id);
 					dst->mode.id = id;
 				} else {


More information about the xorg-commit mailing list