mirror of
https://github.com/SysRay/psOff_public.git
synced 2025-02-17 04:50:09 +00:00
transfer2Display| remove deadlock
This commit is contained in:
parent
333670815a
commit
eb1ab674b6
@ -203,9 +203,6 @@ PresentData transfer2Display(SwapchainData::DisplayBuffers const* displayBuffer,
|
||||
|
||||
PresentData presentData;
|
||||
|
||||
vkWaitForFences(obj->deviceInfo.device, 1, &displayBuffer->bufferFence, VK_TRUE, UINT64_MAX);
|
||||
vkResetFences(obj->deviceInfo.device, 1, &displayBuffer->bufferFence);
|
||||
|
||||
// Get swapchain image
|
||||
presentData.displayReady = displayBuffer->semDisplayReady;
|
||||
{
|
||||
@ -222,12 +219,16 @@ PresentData transfer2Display(SwapchainData::DisplayBuffers const* displayBuffer,
|
||||
}
|
||||
if (n <= 0) {
|
||||
LOG_ERR(L"vkAcquireNextImageKHR %S", string_VkResult(result));
|
||||
swapchain.waitId--; // would deadlock on next call
|
||||
return {};
|
||||
}
|
||||
}
|
||||
presentData.swapchainImage = swapchain.buffers[presentData.index].image;
|
||||
// -
|
||||
|
||||
vkWaitForFences(obj->deviceInfo.device, 1, &displayBuffer->bufferFence, VK_TRUE, UINT64_MAX);
|
||||
vkResetFences(obj->deviceInfo.device, 1, &displayBuffer->bufferFence);
|
||||
|
||||
auto cmdBuffer = displayBuffer->transferBuffer;
|
||||
|
||||
// Wait and begin command buffer
|
||||
|
Loading…
x
Reference in New Issue
Block a user