mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-09 16:38:17 +02:00
nouveau: fix fence_ref() where fence and *ref are the same fence
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
d6bdf1f6ae
commit
3a38a4b0a8
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue