summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/window.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 4d816ca..999cfcc 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -862,6 +862,7 @@ void RecordCommandBuffer(VkCommandBuffer commandBuffer, uint32_t imageIndex) {
renderPassInfo.renderArea.extent = extent;
renderPassInfo.clearValueCount = 1;
renderPassInfo.pClearValues = &clearColor;
+ renderPassInfo.pNext = VK_NULL_HANDLE;
vkCmdBeginRenderPass(commandBuffer, &renderPassInfo, VK_SUBPASS_CONTENTS_INLINE);
vkCmdBindPipeline(commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, graphicsPipeline);
@@ -919,6 +920,9 @@ void RecreateSwapchain() {
glfwGetFramebufferSize(window, &width, &height);
glfwWaitEvents();
}
+ extent.width = width;
+ extent.height = height;
+ vkDeviceWaitIdle(vkDevice);
DestroySwapchain();
CreateSwapchain();
CreateFramebuffers();
@@ -929,8 +933,6 @@ void FramebufferResizeCallback(GLFWwindow *window, int width, int height) {
if (extent.width == width && extent.height != height) {
return;
}
- extent.width = width;
- extent.height = height;
shouldRecreateSwapchain = true;
}