Skip to content

Commit

Permalink
Vulkan: Even more logging in VulkanMayBeAvailable.
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Sep 2, 2019
1 parent 63305d5 commit 95367b3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Common/Vulkan/VulkanLoader.cpp
Expand Up @@ -247,12 +247,14 @@ void VulkanSetAvailable(bool available) {
} }


bool VulkanMayBeAvailable() { bool VulkanMayBeAvailable() {
if (g_vulkanAvailabilityChecked) if (g_vulkanAvailabilityChecked) {
return g_vulkanMayBeAvailable; return g_vulkanMayBeAvailable;
}


std::string name = System_GetProperty(SYSPROP_NAME); std::string name = System_GetProperty(SYSPROP_NAME);
for (const char *blacklisted_name : device_name_blacklist) { for (const char *blacklisted_name : device_name_blacklist) {
if (!strcmp(name.c_str(), blacklisted_name)) { if (!strcmp(name.c_str(), blacklisted_name)) {
ILOG("VulkanMayBeAvailable: Device blacklisted ('%s')", name.c_str());
g_vulkanAvailabilityChecked = true; g_vulkanAvailabilityChecked = true;
g_vulkanMayBeAvailable = false; g_vulkanMayBeAvailable = false;
return false; return false;
Expand Down Expand Up @@ -387,7 +389,7 @@ bool VulkanMayBeAvailable() {
goto bail; goto bail;
} }
if (physicalDeviceCount == 0) { if (physicalDeviceCount == 0) {
ELOG("VulkanMayBeAvailable: No physical Vulkan devices."); ELOG("VulkanMayBeAvailable: No physical Vulkan devices (count = 0).");
goto bail; goto bail;
} }
devices.resize(physicalDeviceCount); devices.resize(physicalDeviceCount);
Expand All @@ -407,6 +409,7 @@ bool VulkanMayBeAvailable() {
anyGood = true; anyGood = true;
break; break;
default: default:
ILOG("VulkanMayBeAvailable: Ineligible device found and ignored: '%s'", props.deviceName);
break; break;
} }
// TODO: Should also check queuefamilyproperties for a GRAPHICS queue family? Oh well. // TODO: Should also check queuefamilyproperties for a GRAPHICS queue family? Oh well.
Expand Down

0 comments on commit 95367b3

Please sign in to comment.