From 81c7b7034c8cc8338d77c7e2f87494bdc198d5e8 Mon Sep 17 00:00:00 2001 From: yours3lf <0.tamas.marton@gmail.com> Date: Tue, 19 May 2020 22:30:42 +0100 Subject: [PATCH] actually use the indices the user requested --- driver/wsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driver/wsi.c b/driver/wsi.c index be974f9..ad63239 100644 --- a/driver/wsi.c +++ b/driver/wsi.c @@ -636,8 +636,8 @@ VKAPI_ATTR VkResult VKAPI_CALL RPIFUNC(vkQueuePresentKHR)( for(int c = 0; c < pPresentInfo->swapchainCount; ++c) { _swapchain* s = pPresentInfo->pSwapchains[c]; - modeset_present(controlFd, &s->images[s->backbufferIdx], s->surface); - s->backbufferIdx = (s->backbufferIdx + 1) % s->numImages; + modeset_present(controlFd, &s->images[pPresentInfo->pImageIndices[c]], s->surface); + s->backbufferIdx = (pPresentInfo->pImageIndices[c] + 1) % s->numImages; } PROFILEEND(RPIFUNC(vkQueuePresentKHR));