anv/wsi: fix apps that acquire multiple images up front

This fix was found in the radv codebase when running dota2,
no idea if anyone has reported it on anv, but the same problem
occurs.

Once an image is acquired we need to mark it busy.

Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie 2016-10-13 12:43:07 +10:00
parent 8bdac874e6
commit 8980ac0411
2 changed files with 2 additions and 0 deletions

View File

@ -523,6 +523,7 @@ wsi_wl_swapchain_acquire_next_image(struct anv_swapchain *anv_chain,
if (!chain->images[i].busy) {
/* We found a non-busy image */
*image_index = i;
chain->images[image_index].busy = true;
return VK_SUCCESS;
}
}

View File

@ -574,6 +574,7 @@ x11_acquire_next_image(struct anv_swapchain *anv_chain,
/* We found a non-busy image */
xshmfence_await(chain->images[i].shm_fence);
*image_index = i;
chain->images[i].busy = true;
return VK_SUCCESS;
}
}