From 62789005dd61738921eec22b44d8cbd73476d214 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Wed, 12 Jan 2022 22:04:07 -0800 Subject: [PATCH] fix for multi-submit --- src/Refresh_Driver_Vulkan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Refresh_Driver_Vulkan.c b/src/Refresh_Driver_Vulkan.c index 4da01a9..192ef98 100644 --- a/src/Refresh_Driver_Vulkan.c +++ b/src/Refresh_Driver_Vulkan.c @@ -8683,7 +8683,7 @@ static void VULKAN_Submit( if (renderer->submittedCommandBufferCount + commandBufferCount >= renderer->submittedCommandBufferCapacity) { - renderer->submittedCommandBufferCapacity += commandBufferCount; + renderer->submittedCommandBufferCapacity = renderer->submittedCommandBufferCount + commandBufferCount; renderer->submittedCommandBuffers = SDL_realloc( renderer->submittedCommandBuffers, @@ -8696,8 +8696,8 @@ static void VULKAN_Submit( { ((VulkanCommandBuffer*)pCommandBuffers[i])->submitted = 1; renderer->submittedCommandBuffers[renderer->submittedCommandBufferCount] = (VulkanCommandBuffer*) pCommandBuffers[i]; + renderer->submittedCommandBufferCount += 1; } - renderer->submittedCommandBufferCount += commandBufferCount; /* Present, if applicable */