From bd60b873ec81cde11a65c62160a7f31252b0e89b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 18 Jun 2024 00:12:08 -0500 Subject: [PATCH] Add missing check for no Vulkan devices --- app/streaming/video/ffmpeg-renderers/plvk.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/streaming/video/ffmpeg-renderers/plvk.cpp b/app/streaming/video/ffmpeg-renderers/plvk.cpp index 80796688..b2d5eb34 100644 --- a/app/streaming/video/ffmpeg-renderers/plvk.cpp +++ b/app/streaming/video/ffmpeg-renderers/plvk.cpp @@ -158,6 +158,12 @@ bool PlVkRenderer::chooseVulkanDevice(PDECODER_PARAMETERS params, bool hdrOutput std::set devicesTried; VkPhysicalDeviceProperties deviceProps; + if (physicalDeviceCount == 0) { + SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, + "No Vulkan devices found!"); + return false; + } + // First, try the first device in the list to support device selection layers // that put the user's preferred GPU in the first slot. fn_vkGetPhysicalDeviceProperties(physicalDevices[0], &deviceProps);