diff options
author | Christoph Bumiller <[email protected]> | 2011-03-13 13:07:54 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2011-03-13 13:23:55 +0100 |
commit | 4388817a678431146744a030bc7c0b8c01da9f72 (patch) | |
tree | 2e6b1e9efc9ee19768a5bb78dbb58b67f9a93dd1 /src/gallium/drivers/nouveau/nouveau_fence.c | |
parent | 26a199efac43cc0509f174ca47ad0d2b0044eee0 (diff) |
nv50,nvc0: clean up flushes
Diffstat (limited to 'src/gallium/drivers/nouveau/nouveau_fence.c')
-rw-r--r-- | src/gallium/drivers/nouveau/nouveau_fence.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_fence.c b/src/gallium/drivers/nouveau/nouveau_fence.c index 18bdb18ad41..d8f59dce9ed 100644 --- a/src/gallium/drivers/nouveau/nouveau_fence.c +++ b/src/gallium/drivers/nouveau/nouveau_fence.c @@ -90,6 +90,9 @@ nouveau_fence_emit(struct nouveau_fence *fence) assert(fence->state == NOUVEAU_FENCE_STATE_AVAILABLE); + /* set this now, so that if fence.emit triggers a flush we don't recurse */ + fence->state = NOUVEAU_FENCE_STATE_EMITTED; + screen->fence.emit(&screen->base, fence->sequence); ++fence->ref; @@ -100,8 +103,6 @@ nouveau_fence_emit(struct nouveau_fence *fence) screen->fence.head = fence; screen->fence.tail = fence; - - fence->state = NOUVEAU_FENCE_STATE_EMITTED; } void @@ -215,6 +216,8 @@ nouveau_fence_wait(struct nouveau_fence *fence) void nouveau_fence_next(struct nouveau_screen *screen) { - nouveau_fence_emit(screen->fence.current); + if (screen->fence.current->state < NOUVEAU_FENCE_STATE_EMITTED) + nouveau_fence_emit(screen->fence.current); + nouveau_fence_new(screen, &screen->fence.current, FALSE); } |