diff options
author | Eric Anholt <eric@anholt.net> | 2008-09-03 16:37:25 +0100 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-09-04 16:26:41 +0100 |
commit | 71ec627c3a65cfc7bca7353af43c60b18e73230d (patch) | |
tree | 5a928913df04a30bf1780c98844a3fd98d1161cf | |
parent | daaefd173b4c98d0ebabd43352bfa3a030a62e4b (diff) |
DRI2: Emit the MI_FLUSH before flushing batch in swapbuffers.
Should fix issues with swapbuffers flushing to front buffer on 965.
-rw-r--r-- | src/i830_dri.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c index 6519b489..56339f39 100644 --- a/src/i830_dri.c +++ b/src/i830_dri.c @@ -1576,7 +1576,7 @@ i830_update_sarea(ScrnInfoPtr pScrn, drmI830Sarea *sarea) I830Ptr pI830 = I830PTR(pScrn); if (pI830->directRenderingType == DRI_DRI2) - return TRUE; + return; sarea->width = pScreen->width; sarea->height = pScreen->height; @@ -1921,12 +1921,17 @@ I830DRI2SwapBuffers(DrawablePtr pDraw, DRI2BufferPtr pSrcBuffer, (*pGC->ops->CopyArea)(&pPixmap->drawable, pDraw, pGC, x, y, width, height, x, y); FreeScratchGC(pGC); - + + /* Emit a flush of the rendering cache, or on the 965 and beyond + * rendering results may not hit the framebuffer until significantly + * later. + */ + I830EmitFlush(pScrn); + pI830->need_mi_flush = FALSE; + /* We can't rely on getting into the block handler before the DRI * client gets to run again so flush now. */ intel_batch_flush(pScrn); - I830EmitFlush(pScrn); - pI830->need_mi_flush = FALSE; #if ALWAYS_SYNC I830Sync(pScrn); #endif |