From bbc4a7bd31e604ee94b9285ec3e6c8bee0cb9502 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Wed, 9 Jul 2014 23:20:43 -0400 Subject: [PATCH] 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 --- src/gallium/drivers/nouveau/nouveau_fence.c | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.30.2