summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-07-09 23:20:43 -0400
committerIlia Mirkin <[email protected]>2014-07-15 17:57:45 -0400
commitbbc4a7bd31e604ee94b9285ec3e6c8bee0cb9502 (patch)
tree7f384e8e74c92ba640cc85edda7c06dd76c43e2c /src
parentc11096c7497d12b54ace8709e696fcb823de9444 (diff)
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_fence.c3
1 files changed, 3 insertions, 0 deletions
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);