From f664e31d73bd31594e069d8bcca872687b84d8d9 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Wed, 14 Dec 2011 10:22:22 +0100 Subject: saa: Always read back hw contents on poly_fill_rect The damage region may be much larger than the actual area filled, so make sure we read back any hw contents in the damage region since we use it to mark sw dirty. Revisit this in the future since it may increase readbacks in an undesired way. There are workarounds. Signed-off-by: Thomas Hellstrom Reviewed-by: Jakob Bornecrantz --- saa/saa_unaccel.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'saa') diff --git a/saa/saa_unaccel.c b/saa/saa_unaccel.c index 8c1d89b..deaf5aa 100644 --- a/saa/saa_unaccel.c +++ b/saa/saa_unaccel.c @@ -389,7 +389,13 @@ saa_check_poly_fill_rect(DrawablePtr pDrawable, GCPtr pGC, SAA_FALLBACK(("to %p (%c)\n", pDrawable, saa_drawable_loc(pDrawable))); sscreen->fallback_count++; - if (!saa_pad_write(pDrawable, pGC, TRUE, &access)) + + /* + * TODO: Use @prect for readback / damaging instead of + * the damage region. This may fragment the dirty regions more + * but should avoid unnecessary readbacks. + */ + if (!saa_pad_write(pDrawable, pGC, FALSE, &access)) goto out_no_access;; if (!saa_prepare_access_gc(pGC)) goto out_no_gc; -- cgit v1.2.3