mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 13:10:10 +01:00
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:
parent
8bdac874e6
commit
8980ac0411
2 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue