mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-08-21 19:23:22 +02:00
renderer_vulkan: Catch and report exceptions
Move more Vulkan code to report errors with exceptions and report them through a log before notifying it with an error boolean for backwards compatibility. In the future we can replace the rasterizer two-step initialization to always use exceptions.
This commit is contained in:
parent
47843b4f09
commit
dce8720780
@ -137,7 +137,7 @@ void RendererVulkan::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) {
|
|||||||
render_window.OnFrameDisplayed();
|
render_window.OnFrameDisplayed();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RendererVulkan::Init() {
|
bool RendererVulkan::Init() try {
|
||||||
library = OpenLibrary();
|
library = OpenLibrary();
|
||||||
std::tie(instance, instance_version) = CreateInstance(
|
std::tie(instance, instance_version) = CreateInstance(
|
||||||
library, dld, render_window.GetWindowInfo().type, true, Settings::values.renderer_debug);
|
library, dld, render_window.GetWindowInfo().type, true, Settings::values.renderer_debug);
|
||||||
@ -168,8 +168,11 @@ bool RendererVulkan::Init() {
|
|||||||
blit_screen =
|
blit_screen =
|
||||||
std::make_unique<VKBlitScreen>(cpu_memory, render_window, *rasterizer, *device,
|
std::make_unique<VKBlitScreen>(cpu_memory, render_window, *rasterizer, *device,
|
||||||
*memory_manager, *swapchain, *scheduler, screen_info);
|
*memory_manager, *swapchain, *scheduler, screen_info);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
} catch (const vk::Exception& exception) {
|
||||||
|
LOG_ERROR(Render_Vulkan, "Vulkan initialization failed with error: {}", exception.what());
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RendererVulkan::ShutDown() {
|
void RendererVulkan::ShutDown() {
|
||||||
|
Loading…
Reference in New Issue
Block a user