mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
llvmpipe: correctly handle waiting in llvmpipe_fence_finish
Currently if the timeout differs from 0, we'll end up with infinite wait... even if the user is perfectly clear they don't want that. Use the new lp_fence_timedwait() helper guarding both waits in an !lp_fence_signalled block like the rest of llvmpipe. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
parent
5b284fe6bc
commit
591955d82d
1 changed files with 6 additions and 1 deletions
|
|
@ -637,7 +637,12 @@ llvmpipe_fence_finish(struct pipe_screen *screen,
|
|||
if (!timeout)
|
||||
return lp_fence_signalled(f);
|
||||
|
||||
lp_fence_wait(f);
|
||||
if (!lp_fence_signalled(f)) {
|
||||
if (timeout != PIPE_TIMEOUT_INFINITE)
|
||||
return lp_fence_timedwait(f, timeout);
|
||||
|
||||
lp_fence_wait(f);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue