forked from MoonsideGames/Refresh
Reset fence as late as possible
parent
0319c26f6a
commit
a3aea0f796
|
@ -7915,6 +7915,12 @@ static VkFence VULKAN_INTERNAL_AcquireFence(
|
|||
fence = renderer->availableFences[renderer->availableFenceCount - 1];
|
||||
renderer->availableFenceCount -= 1;
|
||||
|
||||
renderer->vkResetFences(
|
||||
renderer->logicalDevice,
|
||||
1,
|
||||
&fence
|
||||
);
|
||||
|
||||
SDL_UnlockMutex(renderer->acquireFenceLock);
|
||||
|
||||
return fence;
|
||||
|
@ -8114,12 +8120,6 @@ static void VULKAN_INTERNAL_CleanCommandBuffer(
|
|||
|
||||
SDL_UnlockMutex(renderer->acquireCommandBufferLock);
|
||||
|
||||
renderer->vkResetFences(
|
||||
renderer->logicalDevice,
|
||||
1,
|
||||
&commandBuffer->inFlightFence
|
||||
);
|
||||
|
||||
SDL_LockMutex(renderer->acquireFenceLock);
|
||||
|
||||
if (renderer->availableFenceCount == renderer->availableFenceCapacity)
|
||||
|
|
Loading…
Reference in New Issue