[Mesa-dev] [PATCH 3/9] i965: Only wait for the fence bo to be signaled

Chris Wilson chris at chris-wilson.co.uk
Fri Jun 9 13:01:34 UTC 2017


The fence bo may be reused as an input fence to another batch, which
will cause us to treat it as busy until that subsequent batch is idle.
We only need to check if the fence has been signaled, which we can do by
checking the write status of the fence bo -- when the write is
completed, the fence is signaled.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Kenneth Graunke <kenneth at whitecape.org>
Cc: Matt Turner <mattst88 at gmail.com>
---
 src/mesa/drivers/dri/i965/brw_sync.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_sync.c b/src/mesa/drivers/dri/i965/brw_sync.c
index a8356c304f..427108610d 100644
--- a/src/mesa/drivers/dri/i965/brw_sync.c
+++ b/src/mesa/drivers/dri/i965/brw_sync.c
@@ -179,7 +179,7 @@ brw_fence_has_completed_locked(struct brw_fence *fence)
          return false;
       }
 
-      if (brw_bo_busy(fence->batch_bo))
+      if (brw_bo_write_busy(fence->batch_bo))
          return false;
 
       brw_bo_unreference(fence->batch_bo);
-- 
2.11.0



More information about the mesa-dev mailing list