On Tue, 2008-10-14 at 16:02 +0200, Clemens Eisserer wrote:
> 
> I've a use-case where the client uploads 32x32 A8 images to an
> 256x256x8 pixmap  which is later used as mask in a composition
> operation.
> The test-case is able to render with 40fps on xserver-1.3/intel-2.1.1
> however with the latest GIT of both I only get ~10-15fps.
> Unfourtunatly I've not been able to create a stand-alone testcase
> which triggers this problem :-/
> 
> Using sysprof I can see a lot of time is spent moving data arround,
> very strange is that PutImage seems to cause a readback:
> ProcPutImage->ExaCheckPutImage->exaPrepareAccessReg->exaDoMigration->exaDoMoveOutPixmap->exaCopyDirty->exaWaitSync->I830EXASync
> In Composite I see the re-uploading again.
> 
> Any idea why ProcPutImage could to fallback (there's plenty of free vram)?
> Are there tools / settings which could help me to identify the problem?

Does the attached xserver patch help? Looks like we're syncing
unnecessarily in the migration no-op case.


-- 
Earthling Michel Dänzer           |          http://tungstengraphics.com
Libre software enthusiast         |          Debian, X and DRI developer
diff --git a/exa/exa_migration.c b/exa/exa_migration.c
index 56b6945..c68cd76 100644
--- a/exa/exa_migration.c
+++ b/exa/exa_migration.c
@@ -129,6 +131,7 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
     BoxPtr pBox;
     int nbox;
     Bool access_prepared = FALSE;
+    Bool need_sync = FALSE;
 
     /* Damaged bits are valid in current copy but invalid in other one */
     if (exaPixmapIsOffscreen(pPixmap)) {
@@ -220,14 +253,15 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc,
 	    exaMemcpyBox (pPixmap, pBox,
 			  fallback_src, fallback_srcpitch,
 			  fallback_dst, fallback_dstpitch);
-	}
+	} else
+	    need_sync = TRUE;
 
 	pBox++;
     }
 
     if (access_prepared)
 	exaFinishAccess(&pPixmap->drawable, fallback_index);
-    else
+    else if (need_sync)
 	sync (pPixmap->drawable.pScreen);
 
     pExaPixmap->offscreen = save_offscreen;
_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to