diff options
| author | Ian Elliott <ian@lunarg.com> | 2015-07-06 14:36:13 -0600 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-07-17 10:05:22 -0600 |
| commit | c0bb127c15882098b791a4d69dca51cd1cfba21c (patch) | |
| tree | c2e96aef873d9c790f35d6b05350da959c27f75d /loader/loader.c | |
| parent | 4723fe81628c65f0a216614cc1feff1bc7f1849a (diff) | |
| download | usermoji-c0bb127c15882098b791a4d69dca51cd1cfba21c.tar.xz | |
loader: Changes to use new WSI swapchain extensions.
Use device extension list, not global. When validating the PhysicalDevice
extensions really need to use the device extension list not the loader's global
list.
Fix include to find aligned_alloc
Diffstat (limited to 'loader/loader.c')
| -rw-r--r-- | loader/loader.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/loader/loader.c b/loader/loader.c index bb1ba994..f89db4a8 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -42,7 +42,6 @@ #endif // WIN32 #include "vk_loader_platform.h" #include "loader.h" -#include "wsi_lunarg.h" #include "gpa_helper.h" #include "table_ops.h" #include "debug_report.h" @@ -83,6 +82,9 @@ uint32_t g_loader_log_msgs = 0; // additionally CreateDevice and DestroyDevice needs to be locked loader_platform_thread_mutex loader_lock; +// This table contains the loader's instance dispatch table, which contains +// default functions if no instance layers are activated. This contains +// pointers to "terminator functions". const VkLayerInstanceDispatchTable instance_disp = { .GetInstanceProcAddr = loader_GetInstanceProcAddr, .CreateInstance = loader_CreateInstance, @@ -98,6 +100,7 @@ const VkLayerInstanceDispatchTable instance_disp = { .GetPhysicalDeviceExtensionProperties = loader_GetPhysicalDeviceExtensionProperties, .GetPhysicalDeviceLayerProperties = loader_GetPhysicalDeviceLayerProperties, .GetPhysicalDeviceSparseImageFormatProperties = loader_GetPhysicalDeviceSparseImageFormatProperties, + .GetPhysicalDeviceSurfaceSupportWSI = loader_GetPhysicalDeviceSurfaceSupportWSI, .DbgCreateMsgCallback = loader_DbgCreateMsgCallback, .DbgDestroyMsgCallback = loader_DbgDestroyMsgCallback, }; @@ -822,6 +825,7 @@ void loader_coalesce_extensions(void) }; // Traverse loader's extensions, adding non-duplicate extensions to the list + wsi_swapchain_add_instance_extensions(&loader.global_extensions); debug_report_add_instance_extensions(&loader.global_extensions); } @@ -1083,6 +1087,10 @@ static void loader_icd_init_entrys(struct loader_icd *icd, LOOKUP(DbgDestroyMsgCallback); #undef LOOKUP + icd->GetPhysicalDeviceSurfaceSupportWSI = + (PFN_vkGetPhysicalDeviceSurfaceSupportWSI) loader_platform_get_proc_address(scanned_icds->handle, + "vkGetPhysicalDeviceSurfaceSupportWSI"); + return; } @@ -2843,8 +2851,7 @@ static PFN_vkVoidFunction VKAPI loader_GetInstanceProcAddr(VkInstance instance, return addr; } - /* TODO Remove this once WSI has no loader special code */ - addr = wsi_lunarg_GetInstanceProcAddr(instance, pName); + addr = wsi_swapchain_GetInstanceProcAddr(ptr_instance, pName); if (addr) { return addr; } @@ -2881,13 +2888,6 @@ static PFN_vkVoidFunction VKAPI loader_GetDeviceProcAddr(VkDevice device, const return addr; } - /* return any extension device entrypoints the loader knows about */ - /* TODO once WSI has no loader special code remove this */ - addr = wsi_lunarg_GetDeviceProcAddr(device, pName); - if (addr) { - return addr; - } - /* return the dispatch table entrypoint for the fastest case */ const VkLayerDispatchTable *disp_table = * (VkLayerDispatchTable **) device; if (disp_table == NULL) |
