mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
zink: use vkGetFenceStatus when we're obviously checking for status
a timeout of 0 indicates that gallium wants to know whether a fence is done, so we can use a simpler call here Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9154>
This commit is contained in:
parent
79861e3d88
commit
31dd0a4a1e
1 changed files with 7 additions and 2 deletions
|
|
@ -113,8 +113,13 @@ zink_fence_finish(struct zink_screen *screen, struct zink_fence *fence,
|
||||||
{
|
{
|
||||||
if (!fence->submitted)
|
if (!fence->submitted)
|
||||||
return true;
|
return true;
|
||||||
bool success = vkWaitForFences(screen->dev, 1, &fence->fence, VK_TRUE,
|
bool success;
|
||||||
timeout_ns) == VK_SUCCESS;
|
|
||||||
|
if (timeout_ns)
|
||||||
|
success = vkWaitForFences(screen->dev, 1, &fence->fence, VK_TRUE, timeout_ns) == VK_SUCCESS;
|
||||||
|
else
|
||||||
|
success = vkGetFenceStatus(screen->dev, fence->fence) == VK_SUCCESS;
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
if (fence->active_queries)
|
if (fence->active_queries)
|
||||||
zink_prune_queries(screen, fence);
|
zink_prune_queries(screen, fence);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue