summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViktor Novotný <noviktor@seznam.cz>2012-05-26 22:15:20 +0200
committerBen Skeggs <bskeggs@redhat.com>2012-06-08 17:27:32 +1000
commit4dbc132f22721e3da30eb2e7fc97dea5b8458df6 (patch)
tree37fd03b92672545d57f9524be7de82ccce86db90
parentaab58ee9a8025422416458d637c203af5ba008fd (diff)
nv04/exa: Reset destination surface offset in the same call of NV04EXACopy
Fixes FDO bug #48954. Signed-off-by: Viktor Novotný <noviktor@seznam.cz> Reviewed-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--src/nv04_exa.c15
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);
}