From 38061ae636400a449029ad2028e3d0eb1cfdcf6a Mon Sep 17 00:00:00 2001 From: psucien Date: Thu, 16 May 2024 09:07:03 +0200 Subject: [PATCH] fix for crash in apps when splash is missing --- src/video_core/amdgpu/liverpool.h | 4 +++- src/video_core/renderer_vulkan/renderer_vulkan.cpp | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/video_core/amdgpu/liverpool.h b/src/video_core/amdgpu/liverpool.h index 2e0030fd..01c20c01 100644 --- a/src/video_core/amdgpu/liverpool.h +++ b/src/video_core/amdgpu/liverpool.h @@ -622,7 +622,9 @@ public: void SubmitDone() { // This is wrong as `submitDone()` should never be blocking. The behavior will be // reworked with mutiple queues introduction - cp.get(); + if (cp.valid()) { + cp.get(); + } } private: diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 2c351116..65c0533e 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -161,13 +161,17 @@ void RendererVulkan::RecreateFrame(Frame* frame, u32 width, u32 height) { } bool RendererVulkan::ShowSplash(Frame* frame /*= nullptr*/) { + const auto* splash = Common::Singleton::Instance(); + if (splash->GetImageData().empty()) { + return false; + } + if (!Libraries::SystemService::IsSplashVisible()) { return false; } if (!frame) { if (!splash_img.has_value()) { - const auto* splash = Common::Singleton::Instance(); VideoCore::ImageInfo info{}; info.pixel_format = vk::Format::eR8G8B8A8Srgb;