st/xorg: Flush context if necessary in ExaPrepareAccess.

This commit is contained in:
Michel Dänzer 2009-08-27 20:27:28 +02:00
parent f3a540f6d7
commit 05aa56a827
1 changed files with 4 additions and 0 deletions

View File

@ -115,6 +115,10 @@ ExaPrepareAccess(PixmapPtr pPix, int index)
if (priv->map_count++ == 0)
{
if (exa->ctx->is_texture_referenced(exa->ctx, priv->tex, 0, 0) &
PIPE_REFERENCED_FOR_WRITE)
exa->ctx->flush(exa->ctx, 0, NULL);
priv->map_transfer =
exa->scrn->get_tex_transfer(exa->scrn, priv->tex, 0, 0, 0,
PIPE_TRANSFER_READ_WRITE,