From 74ed14e1d27903f0647fe650da666cacb1e2e940 Mon Sep 17 00:00:00 2001 From: Arthur Huillet Date: Sun, 15 Jul 2007 00:35:46 +0200 Subject: VERY EXPERIMENTAL moved the notifier wait at the beginning of NvPutImage --- src/nv_video.c | 16 ++++++++++++---- 1 file 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; } -- cgit v1.2.1