[Nouveau] [PATCH] nv04/exa: Reset destination surface offset in the same call of NV04EXACopy

Viktor Novotný noviktor at seznam.cz
Sat May 26 13:15:20 PDT 2012


Fixes FDO bug #48954.

Signed-off-by: Viktor Novotný <noviktor at seznam.cz>
---
 src/nv04_exa.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/nv04_exa.c b/src/nv04_exa.c
index 7ede9d9..ca92868 100644
--- a/src/nv04_exa.c
+++ b/src/nv04_exa.c
@@ -220,7 +220,7 @@ NV04EXACopy(PixmapPtr pdpix, int srcX, int srcY, int dstX, int dstY,
 	int split_dstY = NOUVEAU_ALIGN(dstY + 1, 64);
 	int split_height = split_dstY - dstY;
 
-	if (nouveau_pushbuf_space(push, 16, 1, 0))
+	if (nouveau_pushbuf_space(push, 16, 2, 0))
 		return;
 
 	if ((width * height) >= 200000 && pNv->pspix != pNv->pdpix &&
@@ -249,7 +249,13 @@ NV04EXACopy(PixmapPtr pdpix, int srcX, int srcY, int dstX, int dstY,
 		height -= split_height;
 		dstY = 0;
 		pNv->pmpix = pdpix;
-	} else
+	}
+
+	BEGIN_NV04(push, NV01_BLIT(POINT_IN), 3);
+	PUSH_DATA (push, (srcY << 16) | srcX);
+	PUSH_DATA (push, (dstY << 16) | dstX);
+	PUSH_DATA (push, (height  << 16) | width);
+
 	if (pNv->pmpix) {
 		struct nouveau_bo *dst_bo = nouveau_pixmap_bo(pdpix);
 
@@ -258,11 +264,6 @@ NV04EXACopy(PixmapPtr pdpix, int srcX, int srcY, int dstX, int dstY,
 		pNv->pmpix = NULL;
 	}
 
-	BEGIN_NV04(push, NV01_BLIT(POINT_IN), 3);
-	PUSH_DATA (push, (srcY << 16) | srcX);
-	PUSH_DATA (push, (dstY << 16) | dstX);
-	PUSH_DATA (push, (height  << 16) | width);
-
 	if ((width * height) >= 512)
 		PUSH_KICK(push);
 }
-- 
1.7.8.6



More information about the Nouveau mailing list