Win32: Plumb through an attempt at handling Vulkan device lost.

Unfortunately, recreating the device fails on NV.
This commit is contained in:
Henrik Rydgård committed 2023-05-29 18:32:29 +02:00
1 parent f33776bc4a
commit 485131a29c
23 files changed
+184 -43

No files matched your search

+5
View File
@@ -119,6 +119,7 @@ bool WindowsVulkanContext::Init(HINSTANCE hInst, HWND hWnd, std::string *error_m
vulkan_->ChooseDevice(deviceNum);
if (vulkan_->CreateDevice() != VK_SUCCESS) {
*error_message = vulkan_->InitError();
vulkan_->DestroyInstance();
delete vulkan_;
vulkan_ = nullptr;
return false;
@@ -184,3 +185,7 @@ void WindowsVulkanContext::Poll() {
void *WindowsVulkanContext::GetAPIContext() {
return vulkan_;
}
bool WindowsVulkanContext::DeviceIsLost() const {
return renderManager_->DeviceIsLost();
}