From fa383289ac8a6dd1cb359e6f1991cc42beb6ff02 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 4 Jan 2007 14:12:45 -0800 Subject: [PATCH] EXA: Wait for sync before we set up new state in our static state buffers. --- src/i965_exa_render.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/i965_exa_render.c b/src/i965_exa_render.c index 68293cd2..dc3d7bfe 100644 --- a/src/i965_exa_render.c +++ b/src/i965_exa_render.c @@ -404,6 +404,9 @@ I965EXAPrepareComposite(int op, PicturePtr pSrcPicture, binding_table_entries = 2; /* default no mask */ + /* Wait for sync before we start setting up our new state */ + i830WaitSync(pScrn); + /* Set up our layout of state in framebuffer. First the general state: */ next_offset = 0; vs_offset = ALIGN(next_offset, 64); @@ -1024,6 +1027,11 @@ I965EXAComposite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, "dstX %d, dstY %d\n", srcX, srcY, srcXend, srcYend, maskX, maskY, maskXend, maskYend, dstX, dstY); + /* Wait for any existing composite rectangles to land before we overwrite + * the VB with the next one. + */ + i830WaitSync(pScrn); + i = 0; /* rect (x2,y2) */ vb[i++] = (float)(srcXend) / pI830->scale_units[0][0]; @@ -1088,4 +1096,9 @@ I965EXAComposite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, OUT_RING(0); /* Immediate data high DW */ ADVANCE_LP_RING(); } + + /* Mark sync so we can wait for it before setting up the VB on the next + * rectangle. + */ + i830MarkSync(pScrn); }