fix some fence edge cases
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
e59e3e6b02
commit
80fdf09d86
|
@ -8469,6 +8469,8 @@ static void VULKAN_INTERNAL_ResetUsedFences(
|
|||
) {
|
||||
uint32_t i;
|
||||
|
||||
if (renderer->usedFenceCount > 0)
|
||||
{
|
||||
/* Prepare the command buffer fence for submission */
|
||||
renderer->vkResetFences(
|
||||
renderer->logicalDevice,
|
||||
|
@ -8493,6 +8495,7 @@ static void VULKAN_INTERNAL_ResetUsedFences(
|
|||
}
|
||||
renderer->usedFenceCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Submission structure */
|
||||
|
||||
|
@ -8501,6 +8504,8 @@ static void VULKAN_Wait(
|
|||
) {
|
||||
VulkanRenderer *renderer = (VulkanRenderer*) driverData;
|
||||
|
||||
if (renderer->usedFenceCount > 0)
|
||||
{
|
||||
renderer->vkWaitForFences(
|
||||
renderer->logicalDevice,
|
||||
renderer->usedFenceCount,
|
||||
|
@ -8511,6 +8516,7 @@ static void VULKAN_Wait(
|
|||
|
||||
VULKAN_INTERNAL_ResetUsedFences(renderer);
|
||||
}
|
||||
}
|
||||
|
||||
static void VULKAN_Submit(
|
||||
Refresh_Renderer *driverData,
|
||||
|
@ -8573,6 +8579,8 @@ static void VULKAN_Submit(
|
|||
if (present)
|
||||
{
|
||||
/* Wait for the previous submission to complete */
|
||||
if (renderer->usedFenceCount)
|
||||
{
|
||||
vulkanResult = renderer->vkWaitForFences(
|
||||
renderer->logicalDevice,
|
||||
renderer->usedFenceCount,
|
||||
|
@ -8587,6 +8595,7 @@ static void VULKAN_Submit(
|
|||
LogVulkanResultAsError("vkWaitForFences", vulkanResult);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
VULKAN_INTERNAL_PostWorkCleanup(renderer);
|
||||
|
||||
|
|
Loading…
Reference in New Issue