If we lose the Vulkan device, recommend the user to switch to Direct3D11.

:-(
This commit is contained in:
Henrik Rydgård
2019-01-30 17:57:20 +01:00
parent ca6298e24d
commit bb4d91c958
+10 -2
View File
@@ -898,7 +898,11 @@ void VulkanRenderManager::Submit(int frame, bool triggerFence) {
submit_info.pCommandBuffers = cmdBufs;
res = vkQueueSubmit(vulkan_->GetGraphicsQueue(), 1, &submit_info, VK_NULL_HANDLE);
if (res == VK_ERROR_DEVICE_LOST) {
_assert_msg_(G3D, false, "Lost the Vulkan device!");
#ifdef _WIN32
_assert_msg_(G3D, false, "Lost the Vulkan device! If this happens again, switch Graphics Backend from Vulkan to Direct3D11");
#else
_assert_msg_(G3D, false, "Lost the Vulkan device! If this happens again, switch Graphics Backend from Vulkan to OpenGL");
#endif
} else {
_assert_msg_(G3D, res == VK_SUCCESS, "vkQueueSubmit failed (init)! result=%s", VulkanResultToString(res));
}
@@ -922,7 +926,11 @@ void VulkanRenderManager::Submit(int frame, bool triggerFence) {
}
res = vkQueueSubmit(vulkan_->GetGraphicsQueue(), 1, &submit_info, triggerFence ? frameData.fence : VK_NULL_HANDLE);
if (res == VK_ERROR_DEVICE_LOST) {
_assert_msg_(G3D, false, "Lost the Vulkan device!");
#ifdef _WIN32
_assert_msg_(G3D, false, "Lost the Vulkan device! If this happens again, switch Graphics Backend from Vulkan to Direct3D11");
#else
_assert_msg_(G3D, false, "Lost the Vulkan device! If this happens again, switch Graphics Backend from Vulkan to OpenGL");
#endif
} else {
_assert_msg_(G3D, res == VK_SUCCESS, "vkQueueSubmit failed (main, split=%d)! result=%s", (int)splitSubmit_, VulkanResultToString(res));
}