To get better test coverage of the host-side DMA code, alternate between using Fences and legacy Sync.

This commit is contained in:
Micah Dowty 2009-07-13 23:12:04 +00:00
parent 15fd4340d6
commit aab0cde61f

View file

@ -188,8 +188,16 @@ GMR_GenericCopy(SVGAGuestPtr *dest,
SVGA3D_DestroySurface(tempSurfaceId); SVGA3D_DestroySurface(tempSurfaceId);
/* Wait for both DMA operations to finish. */ /*
* Wait for both DMA operations to finish. For better test
* coverage, we'll alternate between using fences and legacy syncs.
*/
if (testIters & 1) {
SVGA_SyncToFence(SVGA_InsertFence()); SVGA_SyncToFence(SVGA_InsertFence());
} else {
SVGA_WriteReg(SVGA_REG_SYNC, 1);
while (SVGA_ReadReg(SVGA_REG_BUSY));
}
} }