From d7130cb41fef9c36c41c8d3a3f60ae4b0b7484b6 Mon Sep 17 00:00:00 2001 From: Jon Ashburn Date: Tue, 16 Jun 2015 12:44:51 -0600 Subject: misc: Remove GetDisplayInfoWSI() This entry point was a challenge for loader to handle correctly. Since it is going away in the new WSI proposal remove it in all components. --- loader/loader.c | 2 -- loader/loader.h | 1 - loader/table_ops.h | 3 --- loader/wsi_lunarg.c | 46 ++-------------------------------------------- loader/wsi_lunarg.h | 6 ------ 5 files changed, 2 insertions(+), 56 deletions(-) (limited to 'loader') diff --git a/loader/loader.c b/loader/loader.c index 3f13cdbc..d5f8f462 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -91,7 +91,6 @@ const VkLayerInstanceDispatchTable instance_disp = { .CreateDevice = loader_CreateDevice, .GetPhysicalDeviceExtensionInfo = loader_GetPhysicalDeviceExtensionInfo, .GetMultiDeviceCompatibility = loader_GetMultiDeviceCompatibility, - .GetDisplayInfoWSI = loader_GetDisplayInfoWSI, .DbgCreateMsgCallback = loader_DbgCreateMsgCallback, .DbgDestroyMsgCallback = loader_DbgDestroyMsgCallback, }; @@ -724,7 +723,6 @@ static void loader_icd_init_entrys(struct loader_icd *icd, LOOKUP(CreateDevice); LOOKUP(GetPhysicalDeviceExtensionInfo); LOOKUP(GetMultiDeviceCompatibility); - LOOKUP(GetDisplayInfoWSI); LOOKUP(DbgCreateMsgCallback); LOOKUP(DbgDestroyMsgCallback); #undef LOOKUP diff --git a/loader/loader.h b/loader/loader.h index 19d9de53..d375ebcd 100644 --- a/loader/loader.h +++ b/loader/loader.h @@ -120,7 +120,6 @@ struct loader_icd { PFN_vkCreateDevice CreateDevice; PFN_vkGetPhysicalDeviceExtensionInfo GetPhysicalDeviceExtensionInfo; PFN_vkGetMultiDeviceCompatibility GetMultiDeviceCompatibility; - PFN_vkGetDisplayInfoWSI GetDisplayInfoWSI; PFN_vkDbgCreateMsgCallback DbgCreateMsgCallback; PFN_vkDbgDestroyMsgCallback DbgDestroyMsgCallback; /* diff --git a/loader/table_ops.h b/loader/table_ops.h index a2c67c30..45f411ed 100644 --- a/loader/table_ops.h +++ b/loader/table_ops.h @@ -376,7 +376,6 @@ static inline void loader_init_instance_core_dispatch_table(VkLayerInstanceDispa table->CreateDevice = (PFN_vkCreateDevice) gpa(inst, "vkCreateDevice"); table->GetPhysicalDeviceExtensionInfo = (PFN_vkGetPhysicalDeviceExtensionInfo) gpa(inst, "vkGetPhysicalDeviceExtensionInfo"); table->GetMultiDeviceCompatibility = (PFN_vkGetMultiDeviceCompatibility) gpa(inst, "vkGetMultiDeviceCompatibility"); - table->GetDisplayInfoWSI = (PFN_vkGetDisplayInfoWSI) gpa(inst, "vkGetDisplayInfoWSI"); } static inline void loader_init_instance_extension_dispatch_table( @@ -412,8 +411,6 @@ static inline void *loader_lookup_instance_dispatch_table( return (void *) table->GetPhysicalDeviceExtensionInfo; if (!strcmp(name, "GetMultiDeviceCompatibility")) return (void *) table->GetMultiDeviceCompatibility; - if (!strcmp(name, "GetDisplayInfoWSI")) - return (void *) table->GetDisplayInfoWSI; if (!strcmp(name, "DbgCreateMsgCallback")) return (void *) table->DbgCreateMsgCallback; if (!strcmp(name, "DbgDestroyMsgCallback")) diff --git a/loader/wsi_lunarg.c b/loader/wsi_lunarg.c index f4b62da7..0269f272 100644 --- a/loader/wsi_lunarg.c +++ b/loader/wsi_lunarg.c @@ -33,22 +33,7 @@ /************ Trampoline entrypoints *******************/ /* since one entrypoint is instance level will make available all entrypoints */ -VkResult VKAPI wsi_lunarg_GetDisplayInfoWSI( - VkDisplayWSI display, - VkDisplayInfoTypeWSI infoType, - size_t* pDataSize, - void* pData) -{ - const VkLayerInstanceDispatchTable *disp; - VkResult res; - - disp = loader_get_instance_dispatch(display); - - loader_platform_thread_lock_mutex(&loader_lock); - res = disp->GetDisplayInfoWSI(display, infoType, pDataSize, pData); - loader_platform_thread_unlock_mutex(&loader_lock); - return res; -} +/* TODO make this a device extension with NO trampoline code */ VkResult wsi_lunarg_CreateSwapChainWSI( VkDevice device, @@ -102,31 +87,6 @@ static VkResult wsi_lunarg_QueuePresentWSI( return disp->QueuePresentWSI(queue, pPresentInfo); } -/************ loader instance chain termination entrypoints ***************/ -VkResult loader_GetDisplayInfoWSI( - VkDisplayWSI display, - VkDisplayInfoTypeWSI infoType, - size_t* pDataSize, - void* pData) -{ - /* TODO: need another way to find the icd, display is not a gpu object */ -// uint32_t gpu_index; -// struct loader_icd *icd = loader_get_icd((VkPhysicalDevice) display, &gpu_index); //TODO fix dispaly -> PhysDev - VkResult res = VK_ERROR_INITIALIZATION_FAILED; - - for (struct loader_instance *inst = loader.instances; inst; inst = inst->next) { - for (struct loader_icd *icd = inst->icds; icd; icd = icd->next) { - for (uint32_t i = 0; i < icd->gpu_count; i++) { - if (icd->GetDisplayInfoWSI) - res = icd->GetDisplayInfoWSI(display, infoType, pDataSize, pData); - } - } - } - - return res; -} - - /************ extension enablement ***************/ #define WSI_LUNARG_EXT_ARRAY_SIZE 1 static const struct loader_extension_property wsi_lunarg_extension_info = { @@ -160,9 +120,7 @@ void *wsi_lunarg_GetInstanceProcAddr( if (instance == VK_NULL_HANDLE) return NULL; - /* since two of these entrypoints must be loader handled will report all */ - if (!strcmp(pName, "vkGetDisplayInfoWSI")) - return (void*) wsi_lunarg_GetDisplayInfoWSI; + /* since one of these entrypoints must be loader handled will report all */ if (!strcmp(pName, "vkCreateSwapChainWSI")) return (void*) wsi_lunarg_CreateSwapChainWSI; if (!strcmp(pName, "vkDestroySwapChainWSI")) diff --git a/loader/wsi_lunarg.h b/loader/wsi_lunarg.h index da022c39..6a79c492 100644 --- a/loader/wsi_lunarg.h +++ b/loader/wsi_lunarg.h @@ -28,12 +28,6 @@ #include "vk_wsi_lunarg.h" -VkResult loader_GetDisplayInfoWSI( - VkDisplayWSI display, - VkDisplayInfoTypeWSI infoType, - size_t* pDataSize, - void* pData); - void wsi_lunarg_add_instance_extensions( struct loader_extension_list *ext_list); -- cgit v1.2.3