VulkanMaybeAvailable: Bail earlier in some cases where there's no surface extension.

This commit is contained in:
Henrik Rydgård committed 2019-09-01 15:39:33 +02:00
1 parent 5f2ad2a25e
commit 515bbd28fc
1 file changed
+8 -1
+8 -1
View File
@@ -334,7 +334,9 @@ bool VulkanMayBeAvailable() {
ELOG("Enumerating VK extensions failed.");
goto bail;
}
for (auto &ext: instanceExts) {
ILOG(" %s", ext.extensionName);
}
if (platformSurfaceExtension) {
for (auto iter : instanceExts) {
ILOG("VulkanMaybeAvailable: Instance extension found: %s (%08x)", iter.extensionName, iter.specVersion);
@@ -352,6 +354,11 @@ bool VulkanMayBeAvailable() {
ELOG("Platform surface extension not found");
goto bail;
}
} else {
if (!surfaceExtensionFound) {
ELOG("Surface extension not found");
goto bail;
}
}
// This can't happen unless the driver is double-reporting a surface extension.
if (ci.enabledExtensionCount > 2) {