summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2009-11-18 17:45:39 +0100
committerJakob Bornecrantz <[email protected]>2009-11-18 17:49:38 +0100
commit5109484bd9cd79ed88af59280bd0be5a4150f37c (patch)
tree09c8b7c05746d72ee2d2f195ff496dafa288e7b6 /src
parent8d6da811d4fff50dc42e71c6149759908a458f7f (diff)
st/xorg: Flush any pending operations on upload
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index 3a51ad2d598..3d83b5700d5 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -230,6 +230,11 @@ ExaUploadToScreen(PixmapPtr pPix, int x, int y, int w, int h, char *src,
if (!priv || !priv->tex)
return FALSE;
+ /* make sure that any pending operations are flushed to hardware */
+ if (exa->pipe->is_texture_referenced(exa->pipe, priv->tex, 0, 0) &
+ (PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE))
+ xorg_exa_flush(exa, 0, NULL);
+
transfer = exa->scrn->get_tex_transfer(exa->scrn, priv->tex, 0, 0, 0,
PIPE_TRANSFER_WRITE, x, y, w, h);
if (!transfer)