mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-16 05:30:07 +01:00
android: fix rsx shutdown
This commit is contained in:
parent
79a2485a41
commit
89e49690f5
|
|
@ -90,6 +90,7 @@ void VKGSRender::reinitialize_swapchain()
|
|||
{
|
||||
rsx_log.warning("Swapchain initialization failed. Request ignored [%dx%d]", m_swapchain_dims.width, m_swapchain_dims.height);
|
||||
swapchain_unavailable = true;
|
||||
surface_lost = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -586,7 +587,13 @@ void VKGSRender::flip(const rsx::display_flip_info_t& info)
|
|||
ensure(m_current_frame->present_image == umax);
|
||||
ensure(m_current_frame->swap_command_buffer == nullptr);
|
||||
|
||||
u64 timeout = m_swapchain->get_swap_image_count() <= VK_MAX_ASYNC_FRAMES? 0ull: 100000000ull;
|
||||
u64 timeout = m_swapchain->get_swap_image_count() <= VK_MAX_ASYNC_FRAMES? 0ull :
|
||||
#ifdef ANDROID
|
||||
1000ull
|
||||
#else
|
||||
100000000ull
|
||||
#endif
|
||||
;
|
||||
while (VkResult status = m_swapchain->acquire_next_swapchain_image(m_current_frame->acquire_signal_semaphore, timeout, &m_current_frame->present_image))
|
||||
{
|
||||
switch (status)
|
||||
|
|
@ -619,7 +626,7 @@ void VKGSRender::flip(const rsx::display_flip_info_t& info)
|
|||
surface_lost = true;
|
||||
swapchain_unavailable = true;
|
||||
reinitialize_swapchain();
|
||||
break;
|
||||
return;
|
||||
|
||||
default:
|
||||
vk::die_with_error(status);
|
||||
|
|
|
|||
|
|
@ -208,7 +208,15 @@ namespace vk
|
|||
}
|
||||
#endif
|
||||
VkSurfaceCapabilitiesKHR surface_descriptors = {};
|
||||
CHECK_RESULT(VK_GET_SYMBOL(vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(dev.gpu(), m_surface, &surface_descriptors));
|
||||
auto result = VK_GET_SYMBOL(vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(dev.gpu(), m_surface, &surface_descriptors);
|
||||
#ifdef ANDROID
|
||||
if (result != VK_ERROR_SURFACE_LOST_KHR)
|
||||
{
|
||||
CHECK_RESULT(result);
|
||||
}
|
||||
#else
|
||||
CHECK_RESULT(result);
|
||||
#endif
|
||||
return { surface_descriptors, false };
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue