summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2009-09-25 20:49:53 +0200
committerMichel Dänzer <[email protected]>2009-09-25 20:49:53 +0200
commit07e2d6edfac618729bc2321fd64e15f34360d5fa (patch)
tree6cef98993a85eb57697e7064e7b407e4a27d4f2b /src
parent626553f327394b835cecaf4795692028c2378efa (diff)
st/xorg: Flush render cache if but only if a source has pending write operations.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_composite.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_composite.c b/src/gallium/state_trackers/xorg/xorg_composite.c
index a97cad48b52..9d15a615f15 100644
--- a/src/gallium/state_trackers/xorg/xorg_composite.c
+++ b/src/gallium/state_trackers/xorg/xorg_composite.c
@@ -465,6 +465,12 @@ bind_samplers(struct exa_context *exa, int op,
memset(&src_sampler, 0, sizeof(struct pipe_sampler_state));
memset(&mask_sampler, 0, sizeof(struct pipe_sampler_state));
+ if ((pSrc && exa->pipe->is_texture_referenced(exa->pipe, pSrc->tex, 0, 0) &
+ PIPE_REFERENCED_FOR_WRITE) ||
+ (pMask && exa->pipe->is_texture_referenced(exa->pipe, pMask->tex, 0, 0) &
+ PIPE_REFERENCED_FOR_WRITE))
+ exa->pipe->flush(exa->pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
+
if (pSrcPicture && pSrc) {
unsigned src_wrap = render_repeat_to_gallium(
pSrcPicture->repeatType);
@@ -995,7 +1001,9 @@ void xorg_copy_pixmap(struct exa_context *ctx,
struct pipe_texture *dst = dst_priv->tex;
struct pipe_texture *src = src_priv->tex;
- xorg_exa_finish(ctx);
+ if (ctx->pipe->is_texture_referenced(ctx->pipe, src, 0, 0) &
+ PIPE_REFERENCED_FOR_WRITE)
+ ctx->pipe->flush(ctx->pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
dst_loc[0] = dx;
dst_loc[1] = dy;