By waking the clients before we finish the work associated with the
fence we expose ourselves to a race where the clients may see the
incomplete results.

Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
---
 miext/sync/misyncshm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/miext/sync/misyncshm.c b/miext/sync/misyncshm.c
index 01f82fc..4d11b57 100644
--- a/miext/sync/misyncshm.c
+++ b/miext/sync/misyncshm.c
@@ -50,9 +50,9 @@ miSyncShmFenceSetTriggered(SyncFence * pFence)
 {
     SyncShmFencePrivatePtr      pPriv = SYNC_FENCE_PRIV(pFence);
 
+    miSyncFenceSetTriggered(pFence);
     if (pPriv->fence)
         xshmfence_trigger(pPriv->fence);
-    miSyncFenceSetTriggered(pFence);
 }
 
 static void
-- 
2.0.0.rc2

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to