diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm b/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm index 0a545d11..ca4b9ff7 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm @@ -1179,6 +1179,11 @@ void MVKPresentableSwapchainImage::presentCAMetalDrawable(id m }]; if (hasPresentTime) { +#if MVK_OS_SIMULATOR + // If MTLDrawable.presentedTime/addPresentedHandler isn't supported, just treat it as if the + // present happened when requested + _swapchain->recordPresentTime(presentID, desiredPresentTime, desiredPresentTime); +#else if ([_mtlDrawable respondsToSelector: @selector(addPresentedHandler:)]) { [_mtlDrawable addPresentedHandler: ^(id drawable) { // Record the presentation time @@ -1191,7 +1196,9 @@ void MVKPresentableSwapchainImage::presentCAMetalDrawable(id m // present happened when requested _swapchain->recordPresentTime(presentID, desiredPresentTime, desiredPresentTime); } +#endif } + } // Resets the MTLTexture and CAMetalDrawable underlying this image. diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKSync.mm b/MoltenVK/MoltenVK/GPUObjects/MVKSync.mm index 4f8ec3d5..c63a16e5 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKSync.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKSync.mm @@ -78,7 +78,7 @@ MVKSemaphoreImpl::~MVKSemaphoreImpl() { #pragma mark - -#pragma mark MVKSemaphoreMTLEvent +#pragma mark MVKSemaphoreMTLFence // Could use any encoder. Assume BLIT is fastest and lightest. // Nil mtlCmdBuff will do nothing.