From 05aa56a8275cc6f78e85b1fdf731500d1a5e5b08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 27 Aug 2009 20:27:28 +0200 Subject: st/xorg: Flush context if necessary in ExaPrepareAccess. --- src/gallium/state_trackers/xorg/xorg_exa.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium/state_trackers/xorg') 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, -- cgit v1.2.3