summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/xorg
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-08-27 20:27:28 +0200
committerMichel Dänzer <daenzer@vmware.com>2009-08-27 20:27:28 +0200
commit05aa56a8275cc6f78e85b1fdf731500d1a5e5b08 (patch)
tree0189e079d48de470f37fbf65fbb80871ba80f22c /src/gallium/state_trackers/xorg
parentf3a540f6d7fce1465c16647b209e14694a5291df (diff)
st/xorg: Flush context if necessary in ExaPrepareAccess.
Diffstat (limited to 'src/gallium/state_trackers/xorg')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index 3c90c2c942..e4d73f7eef 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -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,