st/xlib: Flush the front buffer before doing CopySubBuffer

We flush pending rendering before running CopySubBuffer, which
ensures that the right bits get to the screen.

NOTE: This is a candidate for stable release branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Stéphane Marchesin 2013-05-10 18:30:46 -07:00
parent 4e5416b0e2
commit 4f905d4900
1 changed files with 4 additions and 0 deletions

View File

@ -1253,6 +1253,10 @@ void XMesaSwapBuffers( XMesaBuffer b )
*/
void XMesaCopySubBuffer( XMesaBuffer b, int x, int y, int width, int height )
{
XMesaContext xmctx = XMesaGetCurrentContext();
xmctx->st->flush( xmctx->st, ST_FLUSH_FRONT, NULL);
xmesa_copy_st_framebuffer(b->stfb,
ST_ATTACHMENT_BACK_LEFT, ST_ATTACHMENT_FRONT_LEFT,
x, b->height - y - height, width, height);