zink: only get swapchain present semaphore on batch flush if not presented

otherwise this has already been present-waited and can just be used whenever

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15820>
This commit is contained in:
Mike Blumenkrantz 2022-04-08 09:51:57 -04:00 committed by Marge Bot
parent 21496dea9c
commit b3ee943050
1 changed files with 1 additions and 1 deletions

View File

@ -497,7 +497,7 @@ zink_end_batch(struct zink_context *ctx, struct zink_batch *batch)
batch->work_count = 0;
if (batch->swapchain) {
if (batch->swapchain->obj->acquired) {
if (batch->swapchain->obj->acquired && !batch->swapchain->obj->present) {
batch->state->present = zink_kopper_present(screen, batch->swapchain);
batch->state->swapchain = batch->swapchain;
}