move reset calls to Clean instead of Acquire
parent
c0c6d2f9fd
commit
8edab57f7b
|
@ -9227,27 +9227,6 @@ static Refresh_CommandBuffer* VULKAN_AcquireCommandBuffer(
|
|||
commandBuffer->renderPassInProgress = 0;
|
||||
commandBuffer->renderPassColorTargetCount = 0;
|
||||
|
||||
result = renderer->vkResetCommandBuffer(
|
||||
commandBuffer->commandBuffer,
|
||||
VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT
|
||||
);
|
||||
|
||||
if (result != VK_SUCCESS)
|
||||
{
|
||||
LogVulkanResultAsError("vkResetCommandBuffer", result);
|
||||
}
|
||||
|
||||
result = renderer->vkResetFences(
|
||||
renderer->logicalDevice,
|
||||
1,
|
||||
&commandBuffer->inFlightFence
|
||||
);
|
||||
|
||||
if (result != VK_SUCCESS)
|
||||
{
|
||||
LogVulkanResultAsError("vkResetFences", result);
|
||||
}
|
||||
|
||||
VULKAN_INTERNAL_BeginCommandBuffer(renderer, commandBuffer);
|
||||
|
||||
return (Refresh_CommandBuffer*) commandBuffer;
|
||||
|
@ -9651,6 +9630,7 @@ static void VULKAN_INTERNAL_CleanCommandBuffer(
|
|||
uint32_t i;
|
||||
VulkanUniformBuffer *uniformBuffer;
|
||||
DescriptorSetData *descriptorSetData;
|
||||
VkResult result;
|
||||
|
||||
/* Bound uniform buffers are now available */
|
||||
|
||||
|
@ -9780,12 +9760,35 @@ static void VULKAN_INTERNAL_CleanCommandBuffer(
|
|||
|
||||
SDL_UnlockMutex(renderer->acquireCommandBufferLock);
|
||||
|
||||
/* Resent presentation data */
|
||||
/* Reset presentation data */
|
||||
|
||||
commandBuffer->presentDataCount = 0;
|
||||
commandBuffer->waitSemaphoreCount = 0;
|
||||
commandBuffer->signalSemaphoreCount = 0;
|
||||
|
||||
/* Reset Vulkan state */
|
||||
|
||||
result = renderer->vkResetCommandBuffer(
|
||||
commandBuffer->commandBuffer,
|
||||
VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT
|
||||
);
|
||||
|
||||
if (result != VK_SUCCESS)
|
||||
{
|
||||
LogVulkanResultAsError("vkResetCommandBuffer", result);
|
||||
}
|
||||
|
||||
result = renderer->vkResetFences(
|
||||
renderer->logicalDevice,
|
||||
1,
|
||||
&commandBuffer->inFlightFence
|
||||
);
|
||||
|
||||
if (result != VK_SUCCESS)
|
||||
{
|
||||
LogVulkanResultAsError("vkResetFences", result);
|
||||
}
|
||||
|
||||
/* Remove this command buffer from the submitted list */
|
||||
for (i = 0; i < renderer->submittedCommandBufferCount; i += 1)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue