You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fixed
reacquire next image after call windowResize
void VulkanBase::prepareFrame() {
if (m_pause or !m_prepared) {
return;
}
// Acquire the next image from the swap chain
VkResult err = m_swapChain.acquireNextImage(m_semaphores.presentComplete, &m_currentBuffer);
// Recreate the swapchain if it's no longer compatible with the surface (OUT_OF_DATE) or no longer optimal for presentation (SUBOPTIMAL)
if ((err == VK_ERROR_OUT_OF_DATE_KHR) || (err == VK_SUBOPTIMAL_KHR)) {
LOGI("VulkanEngine VK_ERROR_OUT_OF_DATE_KHR");
windowResize();
//////////////-----reacquire next image
VkResult err = m_swapChain.acquireNextImage(m_semaphores.presentComplete, &m_currentBuffer);
if ((err == VK_ERROR_OUT_OF_DATE_KHR) || (err == VK_SUBOPTIMAL_KHR)) {
LOGI("VulkanEngine VK_ERROR_OUT_OF_DATE_KHR");
}
} else {
VK_CHECK_RESULT(err);
}
VK_CHECK_RESULT(vkQueueWaitIdle(m_queue));
}
@173619070 Are you on Intel?
yes, Intel UHD Graphics 620,i used the Intel graphics card before. then I tried to replace it with an independent graphics card(NVIDIA MX150). and there was no crash now,thanks a lot! but i think it is more efficient to use the vkWaitForFences instead of vkQueueWaitIdle when submit or present, what do you think.
Activity
173619070 commentedon Feb 3, 2023
engineer1109 commentedon Feb 3, 2023
@173619070 Are you on Intel?
173619070 commentedon Feb 3, 2023
engineer1109 commentedon Feb 5, 2023
@173619070 210c9dc should fix intel crash.
Wait for fence suggestion I need time to check.