Trying to fix weird sync issue

This commit is contained in:
Dynamitos
2024-01-26 23:19:18 +01:00
parent 09790c4cbd
commit 1bf08f696b
12 changed files with 54 additions and 31 deletions
+1 -1
View File
@@ -111,8 +111,8 @@ void Window::beginFrame()
imageAvailableFences[currentSemaphoreIndex]->wait(100000);
imageAvailableFences[currentSemaphoreIndex]->reset();
vkAcquireNextImageKHR(graphics->getDevice(), swapchain, std::numeric_limits<uint64>::max(), imageAvailableSemaphores[currentSemaphoreIndex]->getHandle(), imageAvailableFences[currentSemaphoreIndex]->getHandle(), &currentImageIndex);
swapChainTextures[currentImageIndex]->changeLayout(Gfx::SE_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL);
graphics->getGraphicsCommands()->getCommands()->waitForSemaphore(VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, imageAvailableSemaphores[currentSemaphoreIndex]);
swapChainTextures[currentImageIndex]->changeLayout(Gfx::SE_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL);
}
void Window::endFrame()