diff options
-rw-r--r-- | src/i830_batchbuffer.c | 31 | ||||
-rw-r--r-- | src/i830_batchbuffer.h | 1 | ||||
-rw-r--r-- | src/i915_render.c | 7 |
3 files changed, 25 insertions, 14 deletions
diff --git a/src/i830_batchbuffer.c b/src/i830_batchbuffer.c index 2107acbd..d8dc02d4 100644 --- a/src/i830_batchbuffer.c +++ b/src/i830_batchbuffer.c @@ -144,6 +144,24 @@ void intel_batch_teardown(ScrnInfoPtr scrn) } } +void intel_batch_do_flush(ScrnInfoPtr scrn) +{ + intel_screen_private *intel = intel_get_screen_private(scrn); + + while (!list_is_empty(&intel->flush_pixmaps)) { + struct intel_pixmap *entry; + + entry = list_first_entry(&intel->flush_pixmaps, + struct intel_pixmap, + flush); + + entry->flush_read_domains = entry->flush_write_domain = 0; + list_del(&entry->flush); + } + + intel->need_mi_flush = FALSE; +} + void intel_batch_emit_flush(ScrnInfoPtr scrn) { intel_screen_private *intel = intel_get_screen_private(scrn); @@ -160,18 +178,7 @@ void intel_batch_emit_flush(ScrnInfoPtr scrn) OUT_BATCH(MI_FLUSH | flags); ADVANCE_BATCH(); - while (!list_is_empty(&intel->flush_pixmaps)) { - struct intel_pixmap *entry; - - entry = list_first_entry(&intel->flush_pixmaps, - struct intel_pixmap, - flush); - - entry->flush_read_domains = entry->flush_write_domain = 0; - list_del(&entry->flush); - } - - intel->need_mi_flush = FALSE; + intel_batch_do_flush(scrn); } void intel_batch_submit(ScrnInfoPtr scrn) diff --git a/src/i830_batchbuffer.h b/src/i830_batchbuffer.h index 17c223f6..5e09f4dc 100644 --- a/src/i830_batchbuffer.h +++ b/src/i830_batchbuffer.h @@ -36,6 +36,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. void intel_batch_init(ScrnInfoPtr scrn); void intel_batch_teardown(ScrnInfoPtr scrn); void intel_batch_emit_flush(ScrnInfoPtr scrn); +void intel_batch_do_flush(ScrnInfoPtr scrn); void intel_batch_submit(ScrnInfoPtr scrn); void intel_batch_wait_last(ScrnInfoPtr scrn); diff --git a/src/i915_render.c b/src/i915_render.c index caf1b5d8..0fe960a7 100644 --- a/src/i915_render.c +++ b/src/i915_render.c @@ -828,8 +828,11 @@ i915_prepare_composite(int op, PicturePtr source_picture, intel->i915_render_state.op = op; - if((source && i830_uxa_pixmap_is_dirty(source)) || - (mask && i830_uxa_pixmap_is_dirty(mask))) + /* BUF_INFO is an implicit flush */ + if (dest != intel->render_current_dest) + intel_batch_do_flush(scrn); + else if((source && i830_uxa_pixmap_is_dirty(source)) || + (mask && i830_uxa_pixmap_is_dirty(mask))) intel_batch_emit_flush(scrn); intel->needs_render_state_emit = TRUE; |