aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Ashburn <jon@lunarg.com>2015-06-18 09:05:37 -0600
committerJon Ashburn <jon@lunarg.com>2015-06-18 15:55:30 -0600
commitb1f38a308b4a71dbea6292bf8803539ab68fe0bf (patch)
tree98d142b82383054f7b32bca17a212a3f2bb4987d
parentb3bfda8a2505f3bd95cb31d8af56c11f6d04deb3 (diff)
downloadusermoji-b1f38a308b4a71dbea6292bf8803539ab68fe0bf.tar.xz
loader: Remove support for WSI as an instance extension
WSI is now a device extension so remove loader support
-rw-r--r--loader/loader.c9
-rw-r--r--loader/loader.h1
-rw-r--r--loader/trampoline.c2
-rw-r--r--loader/wsi_lunarg.c27
-rw-r--r--loader/wsi_lunarg.h5
5 files changed, 7 insertions, 37 deletions
diff --git a/loader/loader.c b/loader/loader.c
index d5f8f462..d4965a72 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -521,7 +521,6 @@ void loader_coalesce_extensions(void)
// Traverse loader's extensions, adding non-duplicate extensions to the list
debug_report_add_instance_extensions(&loader.global_extensions);
- wsi_lunarg_add_instance_extensions(&loader.global_extensions);
}
static struct loader_icd *loader_get_icd_and_device(const VkDevice device,
@@ -1321,7 +1320,7 @@ uint32_t loader_activate_instance_layers(struct loader_instance *inst)
loader_platform_dl_handle lib_handle;
/*
- * For global exenstions implemented within the loader (i.e. WSI, DEBUG_REPORT
+ * For global exenstions implemented within the loader (i.e. DEBUG_REPORT
* the extension must provide two entry points for the loader to use:
* - "trampoline" entry point - this is the address returned by GetProcAddr
* and will always do what's necessary to support a global call.
@@ -1767,15 +1766,16 @@ LOADER_EXPORT void * VKAPI vkGetInstanceProcAddr(VkInstance instance, const char
struct loader_instance *ptr_instance = (struct loader_instance *) instance;
+ /* return any extension global entrypoints */
addr = debug_report_instance_gpa(ptr_instance, pName);
if (addr) {
return addr;
}
- /* return any extension global entrypoints */
+ /* TODO Remove this once WSI has no loader special code */
addr = wsi_lunarg_GetInstanceProcAddr(instance, pName);
if (addr)
- return (ptr_instance->wsi_lunarg_enabled) ? addr : NULL;
+ return addr;
/* return the instance dispatch table entrypoint for extensions */
const VkLayerInstanceDispatchTable *disp_table = * (VkLayerInstanceDispatchTable **) instance;
@@ -1805,6 +1805,7 @@ LOADER_EXPORT void * VKAPI vkGetDeviceProcAddr(VkDevice device, const char * pNa
}
/* 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;
diff --git a/loader/loader.h b/loader/loader.h
index d375ebcd..dfb04b08 100644
--- a/loader/loader.h
+++ b/loader/loader.h
@@ -212,7 +212,6 @@ struct loader_instance {
VkExtensionProperties *app_extension_props;
bool debug_report_enabled;
- bool wsi_lunarg_enabled;
VkLayerDbgFunctionNode *DbgFunctionHead;
};
diff --git a/loader/trampoline.c b/loader/trampoline.c
index 95e4545c..9b4d4508 100644
--- a/loader/trampoline.c
+++ b/loader/trampoline.c
@@ -26,7 +26,6 @@
#include "loader_platform.h"
#include "loader.h"
-#include "wsi_lunarg.h"
#include "debug_report.h"
#if defined(WIN32)
@@ -88,7 +87,6 @@ LOADER_EXPORT VkResult VKAPI vkCreateInstance(
loader_enable_instance_layers(ptr_instance);
debug_report_create_instance(ptr_instance);
- wsi_lunarg_create_instance(ptr_instance);
/* enable any layers on instance chain */
loader_activate_instance_layers(ptr_instance);
diff --git a/loader/wsi_lunarg.c b/loader/wsi_lunarg.c
index 0269f272..77d0788e 100644
--- a/loader/wsi_lunarg.c
+++ b/loader/wsi_lunarg.c
@@ -33,7 +33,6 @@
/************ Trampoline entrypoints *******************/
/* since one entrypoint is instance level will make available all entrypoints */
-/* TODO make this a device extension with NO trampoline code */
VkResult wsi_lunarg_CreateSwapChainWSI(
VkDevice device,
@@ -87,31 +86,7 @@ static VkResult wsi_lunarg_QueuePresentWSI(
return disp->QueuePresentWSI(queue, pPresentInfo);
}
-/************ extension enablement ***************/
-#define WSI_LUNARG_EXT_ARRAY_SIZE 1
-static const struct loader_extension_property wsi_lunarg_extension_info = {
- .info = {
- .sType = VK_STRUCTURE_TYPE_EXTENSION_PROPERTIES,
- .name = VK_WSI_LUNARG_EXTENSION_NAME,
- .version = VK_WSI_LUNARG_REVISION,
- .description = "loader: LunarG WSI extension",
- },
- .origin = VK_EXTENSION_ORIGIN_LOADER,
-};
-
-void wsi_lunarg_add_instance_extensions(
- struct loader_extension_list *ext_list)
-{
- loader_add_to_ext_list(ext_list, 1, &wsi_lunarg_extension_info);
-}
-void wsi_lunarg_create_instance(
- struct loader_instance *ptr_instance)
-{
- ptr_instance->wsi_lunarg_enabled = has_vk_extension_property(
- &wsi_lunarg_extension_info.info,
- &ptr_instance->enabled_instance_extensions);
-}
void *wsi_lunarg_GetInstanceProcAddr(
VkInstance instance,
@@ -120,6 +95,7 @@ void *wsi_lunarg_GetInstanceProcAddr(
if (instance == VK_NULL_HANDLE)
return NULL;
+ // TODO once WSI is pure device extension with no special trampoline code remove this function
/* since one of these entrypoints must be loader handled will report all */
if (!strcmp(pName, "vkCreateSwapChainWSI"))
return (void*) wsi_lunarg_CreateSwapChainWSI;
@@ -140,6 +116,7 @@ void *wsi_lunarg_GetDeviceProcAddr(
if (device == VK_NULL_HANDLE)
return NULL;
+ // TODO make sure WSI is enabled, but eventually this function goes away
/* only handle device entrypoints that are loader special cases */
if (!strcmp(name, "vkCreateSwapChainWSI"))
return (void*) wsi_lunarg_CreateSwapChainWSI;
diff --git a/loader/wsi_lunarg.h b/loader/wsi_lunarg.h
index 6a79c492..9dcb3501 100644
--- a/loader/wsi_lunarg.h
+++ b/loader/wsi_lunarg.h
@@ -28,11 +28,6 @@
#include "vk_wsi_lunarg.h"
-void wsi_lunarg_add_instance_extensions(
- struct loader_extension_list *ext_list);
-
-void wsi_lunarg_create_instance(
- struct loader_instance *ptr_instance);
void *wsi_lunarg_GetInstanceProcAddr(
VkInstance instance,