From: Ilia Mirkin Date: Thu, 10 Jul 2014 03:20:43 +0000 (-0400) Subject: nouveau: check if a fence has already been signalled X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bbc4a7bd31e604ee94b9285ec3e6c8bee0cb9502;p=mesa.git nouveau: check if a fence has already been signalled nouveau_fence_update does real work unconditionally. Avoid doing that if the fence we're checking on has already been signalled. Signed-off-by: Ilia Mirkin --- diff --git a/src/gallium/drivers/nouveau/nouveau_fence.c b/src/gallium/drivers/nouveau/nouveau_fence.c index c6867104adb..a9448a4c721 100644 --- a/src/gallium/drivers/nouveau/nouveau_fence.c +++ b/src/gallium/drivers/nouveau/nouveau_fence.c @@ -174,6 +174,9 @@ nouveau_fence_signalled(struct nouveau_fence *fence) { struct nouveau_screen *screen = fence->screen; + if (fence->state == NOUVEAU_FENCE_STATE_SIGNALLED) + return TRUE; + if (fence->state >= NOUVEAU_FENCE_STATE_EMITTED) nouveau_fence_update(screen, FALSE);