diff --git a/examples/gmr-test/main.c b/examples/gmr-test/main.c index 6e0567c..6c50b28 100644 --- a/examples/gmr-test/main.c +++ b/examples/gmr-test/main.c @@ -188,8 +188,16 @@ GMR_GenericCopy(SVGAGuestPtr *dest, SVGA3D_DestroySurface(tempSurfaceId); - /* Wait for both DMA operations to finish. */ - SVGA_SyncToFence(SVGA_InsertFence()); + /* + * 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()); + } else { + SVGA_WriteReg(SVGA_REG_SYNC, 1); + while (SVGA_ReadReg(SVGA_REG_BUSY)); + } }