summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-12-25 06:04:31 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-12-31 06:07:33 +0100
commitdce8720780d7fbbe4741a68ec11232d6ea304b06 (patch)
tree449c8051b70bc968c040ab36189b1e26e2ba4748 /src/video_core
parentrenderer_vulkan: Create debug callback on separate file and throw (diff)
downloadyuzu-dce8720780d7fbbe4741a68ec11232d6ea304b06.tar
yuzu-dce8720780d7fbbe4741a68ec11232d6ea304b06.tar.gz
yuzu-dce8720780d7fbbe4741a68ec11232d6ea304b06.tar.bz2
yuzu-dce8720780d7fbbe4741a68ec11232d6ea304b06.tar.lz
yuzu-dce8720780d7fbbe4741a68ec11232d6ea304b06.tar.xz
yuzu-dce8720780d7fbbe4741a68ec11232d6ea304b06.tar.zst
yuzu-dce8720780d7fbbe4741a68ec11232d6ea304b06.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_vulkan/renderer_vulkan.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp
index 8e01dc191..ccdc86ed7 100644
--- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp
+++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp
@@ -137,7 +137,7 @@ void RendererVulkan::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) {
render_window.OnFrameDisplayed();
}
-bool RendererVulkan::Init() {
+bool RendererVulkan::Init() try {
library = OpenLibrary();
std::tie(instance, instance_version) = CreateInstance(
library, dld, render_window.GetWindowInfo().type, true, Settings::values.renderer_debug);
@@ -168,8 +168,11 @@ bool RendererVulkan::Init() {
blit_screen =
std::make_unique<VKBlitScreen>(cpu_memory, render_window, *rasterizer, *device,
*memory_manager, *swapchain, *scheduler, screen_info);
-
return true;
+
+} catch (const vk::Exception& exception) {
+ LOG_ERROR(Render_Vulkan, "Vulkan initialization failed with error: {}", exception.what());
+ return false;
}
void RendererVulkan::ShutDown() {