summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Huillet <arthur.huillet@free.fr>2007-07-15 00:35:46 +0200
committerArthur Huillet <arthur.huillet@free.fr>2007-07-19 21:26:46 +0200
commit74ed14e1d27903f0647fe650da666cacb1e2e940 (patch)
treed34a405b3c8520d3cd1ef1b2b6d60fddef4f670a
parent590e385cb5e4f26532ec5ee380f2aaae1cd69894 (diff)
VERY EXPERIMENTAL moved the notifier wait at the beginning of NvPutImage
-rw-r--r--src/nv_video.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/nv_video.c b/src/nv_video.c
index fc654fd..7a0d070 100644
--- a/src/nv_video.c
+++ b/src/nv_video.c
@@ -1128,7 +1128,12 @@ NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y,
lc = pNv->GARTScratch->size / line_len;
}
- while (nlines) { /*actually Xv doesn't like looping here much, especially for YV12*/
+
+ if (!NVNotifierWaitStatus(pScrn, pNv->Notifier0, 0, 0))
+ //you lost
+ return FALSE;
+
+ while (nlines > 0) { /*actually Xv doesn't like looping here much, especially for YV12*/
char *dst = pNv->GARTScratch->map;
/* Upload to GART */
@@ -1172,9 +1177,10 @@ NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y,
NVDmaNext (pNv, 0);
NVDmaKickoff(pNv);
- if (!NVNotifierWaitStatus(pScrn, pNv->Notifier0, 0, 0))
- //you lost
- return FALSE;
+ if ( (nlines - lc ) > 0 )
+ if (!NVNotifierWaitStatus(pScrn, pNv->Notifier0, 0, 0))
+ //you lost
+ return FALSE;
nlines -= lc;
}
@@ -1201,6 +1207,8 @@ NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y,
pPriv->currentBuffer ^= 1;
}
}
+
+
return Success;
}