Index: src/gpu/vk/GrVkBackendContext.cpp |
diff --git a/src/gpu/vk/GrVkBackendContext.cpp b/src/gpu/vk/GrVkBackendContext.cpp |
index ccc834788f603aade7a3a3f0ca87ad87a154de35..b6cc3dd3ed9ed8b88f04e1967e54740df380d885 100644 |
--- a/src/gpu/vk/GrVkBackendContext.cpp |
+++ b/src/gpu/vk/GrVkBackendContext.cpp |
@@ -68,6 +68,30 @@ const GrVkBackendContext* GrVkBackendContext::Create() { |
instanceExtensionNames.push_back(VK_EXT_DEBUG_REPORT_EXTENSION_NAME); |
extensionFlags |= kEXT_debug_report_GrVkExtensionFlag; |
} |
+ if (extensions.hasInstanceExtension(VK_KHR_SURFACE_EXTENSION_NAME)) { |
+ instanceExtensionNames.push_back(VK_KHR_SURFACE_EXTENSION_NAME); |
+ extensionFlags |= kKHR_surface_GrVkExtensionFlag; |
+ } |
+ if (extensions.hasInstanceExtension(VK_KHR_SWAPCHAIN_EXTENSION_NAME)) { |
+ instanceExtensionNames.push_back(VK_KHR_SWAPCHAIN_EXTENSION_NAME); |
+ extensionFlags |= kKHR_swapchain_GrVkExtensionFlag; |
+ } |
+#ifdef SK_BUILD_FOR_WIN |
+ if (extensions.hasInstanceExtension(VK_KHR_WIN32_SURFACE_EXTENSION_NAME)) { |
+ instanceExtensionNames.push_back(VK_KHR_WIN32_SURFACE_EXTENSION_NAME); |
+ extensionFlags |= kKHR_win32_surface_GrVkExtensionFlag; |
+ } |
+#elif SK_BUILD_FOR_ANDROID |
+ if (extensions.hasInstanceExtension(VK_KHR_ANDROID_SURFACE_EXTENSION_NAME)) { |
+ instanceExtensionNames.push_back(VK_KHR_ANDROID_SURFACE_EXTENSION_NAME); |
+ extensionFlags |= kKHR_android_surface_GrVkExtensionFlag; |
+} |
+#elif SK_BUILD_FOR_UNIX |
+ if (extensions.hasInstanceExtension(VK_KHR_XLIB_SURFACE_EXTENSION_NAME)) { |
+ instanceExtensionNames.push_back(VK_KHR_XLIB_SURFACE_EXTENSION_NAME); |
+ extensionFlags |= kKHR_xlib_surface_GrVkExtensionFlag; |
+ } |
+#endif |
#endif |
const VkInstanceCreateInfo instance_create = { |