diff options
author | Ben Skeggs <[email protected]> | 2011-03-01 10:43:44 +1000 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2011-03-01 14:44:43 +1000 |
commit | 3a38a4b0a8caae9be9a66f10e12ad41a1806037f (patch) | |
tree | e0297f12b4038bbea405c652ac52bf67862dcab3 | |
parent | d6bdf1f6ae6f8d06db740ad75e9151ef275755b2 (diff) |
nouveau: fix fence_ref() where fence and *ref are the same fence
Signed-off-by: Ben Skeggs <[email protected]>
-rw-r--r-- | src/gallium/drivers/nouveau/nouveau_fence.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_fence.h b/src/gallium/drivers/nouveau/nouveau_fence.h index 785fc8d2a0a..680c75e99f9 100644 --- a/src/gallium/drivers/nouveau/nouveau_fence.h +++ b/src/gallium/drivers/nouveau/nouveau_fence.h @@ -39,12 +39,13 @@ boolean nouveau_fence_signalled(struct nouveau_fence *); static INLINE void nouveau_fence_ref(struct nouveau_fence *fence, struct nouveau_fence **ref) { + if (fence) + ++fence->ref; + if (*ref) { if (--(*ref)->ref == 0) nouveau_fence_del(*ref); } - if (fence) - ++fence->ref; *ref = fence; } |