loader: Temp workaround to add WSI surface extensions enumerated.
authorJon Ashburn <jon@lunarg.com>
Mon, 4 Apr 2016 22:55:24 +0000 (16:55 -0600)
committerJon Ashburn <jon@lunarg.com>
Tue, 5 Apr 2016 22:11:32 +0000 (16:11 -0600)
Change-Id: Ibb9ffa80bbb71d15296e39730f48f33c23bd331a

loader/loader.c

index b4dbe55319f0fd312ba3cba739d558b7038b837f..e5b9efe08272ae103a2cb0e62a24a629e05cc81d 100644 (file)
@@ -1128,6 +1128,17 @@ void loader_get_icd_loader_instance_extensions(
                                     (struct loader_generic_list *)&icd_exts);
     };
 
+    // TODO REMOVE THIS, HACK ALERT
+    // AMD driver doesn't advertise KHR_surface or KHR_win32_surface, add them
+#ifdef _WIN32
+    VkExtensionProperties props[2];
+    strcpy(props[0].extensionName, VK_KHR_SURFACE_EXTENSION_NAME);
+    props[0].specVersion = VK_KHR_SURFACE_SPEC_VERSION;
+    strcpy(props[1].extensionName, VK_KHR_WIN32_SURFACE_EXTENSION_NAME);
+    props[1].specVersion = VK_KHR_WIN32_SURFACE_SPEC_VERSION;
+    loader_add_to_ext_list(inst, inst_exts, 2, props);
+
+#endif
     // Traverse loader's extensions, adding non-duplicate extensions to the list
     debug_report_add_instance_extensions(inst, inst_exts);
 }