Fix sync bug.
This commit is contained in:
parent
c338c34337
commit
363259a52e
|
|
@ -129,13 +129,13 @@ main(int, char **)
|
|||
viewport.width = Cast<f32>(swapchain.m_Extent.width);
|
||||
viewport.height = -Cast<f32>(swapchain.m_Extent.height);
|
||||
scissor.extent = swapchain.m_Extent;
|
||||
break;
|
||||
continue; // Image acquire has failed. We move to the next frame.
|
||||
default:
|
||||
ERROR("Waiting for swapchain image {} failed. Cause: {}", frameIndex, result)
|
||||
THEN_ABORT(result);
|
||||
}
|
||||
}
|
||||
|
||||
// Reset fences here. In case swapchain was out of date, we leave the fences signalled.
|
||||
result = device.m_Device.resetFences(1, ¤tFrame->m_FrameAvailableFence);
|
||||
ERROR_IF(Failed(result), "Fence {} reset failed. Cause: {}", frameIndex, result)
|
||||
THEN_ABORT(result);
|
||||
|
|
@ -227,7 +227,7 @@ main(int, char **)
|
|||
viewport.width = Cast<f32>(swapchain.m_Extent.width);
|
||||
viewport.height = -Cast<f32>(swapchain.m_Extent.height);
|
||||
scissor.extent = swapchain.m_Extent;
|
||||
break;
|
||||
break; // Present failed. We redo the frame.
|
||||
default:
|
||||
ERROR("Command queue present failed. Cause: {}", result)
|
||||
THEN_ABORT(result);
|
||||
|
|
|
|||
Loading…
Reference in New Issue