diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2014-07-09 23:20:43 -0400 |
---|---|---|
committer | Ilia Mirkin <imirkin@alum.mit.edu> | 2014-07-15 17:57:45 -0400 |
commit | bbc4a7bd31e604ee94b9285ec3e6c8bee0cb9502 (patch) | |
tree | 7f384e8e74c92ba640cc85edda7c06dd76c43e2c | |
parent | c11096c7497d12b54ace8709e696fcb823de9444 (diff) | |
download | external_mesa3d-bbc4a7bd31e604ee94b9285ec3e6c8bee0cb9502.zip external_mesa3d-bbc4a7bd31e604ee94b9285ec3e6c8bee0cb9502.tar.gz external_mesa3d-bbc4a7bd31e604ee94b9285ec3e6c8bee0cb9502.tar.bz2 |
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 <imirkin@alum.mit.edu>
-rw-r--r-- | src/gallium/drivers/nouveau/nouveau_fence.c | 3 |
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 c686710..a9448a4 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); |