diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-11-29 21:07:45 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-11-29 22:42:07 +0000 |
commit | 9a2c18fb92659d57741bfdcacbe4f69aab361532 (patch) | |
tree | ae8f274a7b29c6b90f2b0b11e1f3c018fc25c051 | |
parent | 285f286597df5af13ac3f3d366f2fc9d0468dafa (diff) |
batch: Emit a 'pipelined' flush when using a dirty source.
Ensure that the render caches and texture caches are appropriately
flushed when switching a pixmap from a target to a source.
This should fix bug 24315,
[855GM] Rendering corruption in text (usually)
https://bugs.freedesktop.org/show_bug.cgi?id=24315
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/i830_render.c | 4 | ||||
-rw-r--r-- | src/i830_uxa.c | 12 | ||||
-rw-r--r-- | src/i915_render.c | 5 | ||||
-rw-r--r-- | src/i965_render.c | 4 |
4 files changed, 22 insertions, 3 deletions
diff --git a/src/i830_render.c b/src/i830_render.c index ee89950d..fd8003f0 100644 --- a/src/i830_render.c +++ b/src/i830_render.c @@ -553,6 +553,10 @@ i830_prepare_composite(int op, PicturePtr source_picture, intel->s8_blendctl = blendctl; } + if(i830_uxa_pixmap_is_dirty(source) || + (mask && i830_uxa_pixmap_is_dirty(mask))) + intel_batch_pipelined_flush(scrn); + intel->needs_render_state_emit = TRUE; return TRUE; diff --git a/src/i830_uxa.c b/src/i830_uxa.c index 6dac79ec..8f8c5e9c 100644 --- a/src/i830_uxa.c +++ b/src/i830_uxa.c @@ -310,6 +310,9 @@ i830_uxa_prepare_copy(PixmapPtr source, PixmapPtr dest, int xdir, if (!intel_check_pitch_2d(dest)) return FALSE; + if(i830_uxa_pixmap_is_dirty(source)) + intel_batch_pipelined_flush(scrn); + intel->render_source = source; intel->BR[13] = I830CopyROP[alu] << 16; @@ -372,11 +375,14 @@ i830_uxa_copy(PixmapPtr dest, int src_x1, int src_y1, int dst_x1, OUT_BATCH(intel->BR[13] | dst_pitch); OUT_BATCH((dst_y1 << 16) | (dst_x1 & 0xffff)); OUT_BATCH((dst_y2 << 16) | (dst_x2 & 0xffff)); - OUT_RELOC_PIXMAP(dest, I915_GEM_DOMAIN_RENDER, - I915_GEM_DOMAIN_RENDER, 0); + OUT_RELOC_PIXMAP(dest, + I915_GEM_DOMAIN_RENDER, + I915_GEM_DOMAIN_RENDER, + 0); OUT_BATCH((src_y1 << 16) | (src_x1 & 0xffff)); OUT_BATCH(src_pitch); - OUT_RELOC_PIXMAP(intel->render_source, I915_GEM_DOMAIN_RENDER, 0, + OUT_RELOC_PIXMAP(intel->render_source, + I915_GEM_DOMAIN_RENDER, 0, 0); ADVANCE_BATCH(); diff --git a/src/i915_render.c b/src/i915_render.c index c720f2f3..34fd2538 100644 --- a/src/i915_render.c +++ b/src/i915_render.c @@ -459,6 +459,11 @@ i915_prepare_composite(int op, PicturePtr source_picture, } intel->i915_render_state.op = op; + + if(i830_uxa_pixmap_is_dirty(source) || + (mask && i830_uxa_pixmap_is_dirty(mask))) + intel_batch_pipelined_flush(scrn); + intel->needs_render_state_emit = TRUE; return TRUE; diff --git a/src/i965_render.c b/src/i965_render.c index 8746eb99..cb057d77 100644 --- a/src/i965_render.c +++ b/src/i965_render.c @@ -1636,6 +1636,10 @@ i965_prepare_composite(int op, PicturePtr source_picture, } } + if(i830_uxa_pixmap_is_dirty(source) || + (mask && i830_uxa_pixmap_is_dirty(mask))) + intel_batch_pipelined_flush(scrn); + intel->needs_render_state_emit = TRUE; return TRUE; |