Add missing check for no Vulkan devices
This commit is contained in:
parent
640ac3f9fe
commit
bd60b873ec
1 changed files with 6 additions and 0 deletions
|
|
@ -158,6 +158,12 @@ bool PlVkRenderer::chooseVulkanDevice(PDECODER_PARAMETERS params, bool hdrOutput
|
|||
std::set<uint32_t> 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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue