diff options
| author | Ian Elliott <ian@lunarg.com> | 2015-08-21 14:27:04 -0600 |
|---|---|---|
| committer | Ian Elliott <ian@lunarg.com> | 2015-09-04 14:58:04 -0600 |
| commit | 6c2ca42fbb1cac00863ee67a333e537c7cb2707c (patch) | |
| tree | 719ade0003e43c0d2d55bde413c0d2e6e1fdc050 /loader | |
| parent | f2241ba065e5e67ed7fafda9a07033a1a604b2b1 (diff) | |
| download | usermoji-6c2ca42fbb1cac00863ee67a333e537c7cb2707c.tar.xz | |
WSI: Remove old loader code for the VK_WSI_LunarG extension.
Diffstat (limited to 'loader')
| -rw-r--r-- | loader/wsi_lunarg.c | 128 | ||||
| -rw-r--r-- | loader/wsi_lunarg.h | 43 |
2 files changed, 0 insertions, 171 deletions
diff --git a/loader/wsi_lunarg.c b/loader/wsi_lunarg.c deleted file mode 100644 index c80c4c28..00000000 --- a/loader/wsi_lunarg.c +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Vulkan - * - * Copyright (C) 2015 LunarG, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Jon Ashburn <jon@lunarg.com> - * Courtney Goeltzenleuchter <courtney@lunarg.com> - */ - -#define _GNU_SOURCE -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "vk_loader_platform.h" -#include "loader.h" -#include "wsi_lunarg.h" - -/************ Trampoline entrypoints *******************/ -/* since one entrypoint is instance level will make available all entrypoints */ - -VkResult wsi_lunarg_CreateSwapChainWSI( - VkDevice device, - const VkSwapChainCreateInfoWSI* pCreateInfo, - VkSwapChainWSI* pSwapChain) -{ - const VkLayerDispatchTable *disp; - VkResult res; - - disp = loader_get_dispatch(device); - - res = disp->CreateSwapChainWSI(device, pCreateInfo, pSwapChain); - if (res == VK_SUCCESS) { - loader_init_dispatch(*pSwapChain, disp); - } - - return res; -} - -VkResult wsi_lunarg_DestroySwapChainWSI( - VkSwapChainWSI swapChain) -{ - const VkLayerDispatchTable *disp; - - disp = loader_get_dispatch(swapChain); - - return disp->DestroySwapChainWSI(swapChain); -} - -static VkResult wsi_lunarg_GetSwapChainInfoWSI( - VkSwapChainWSI swapChain, - VkSwapChainInfoTypeWSI infoType, - size_t* pDataSize, - void* pData) -{ - const VkLayerDispatchTable *disp; - - disp = loader_get_dispatch(swapChain); - - return disp->GetSwapChainInfoWSI(swapChain, infoType, pDataSize, pData); -} - -static VkResult wsi_lunarg_QueuePresentWSI( - VkQueue queue, - const VkPresentInfoWSI* pPresentInfo) -{ - const VkLayerDispatchTable *disp; - - disp = loader_get_dispatch(queue); - - return disp->QueuePresentWSI(queue, pPresentInfo); -} - - - -void *wsi_lunarg_GetInstanceProcAddr( - VkInstance instance, - const char* pName) -{ - 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; - if (!strcmp(pName, "vkDestroySwapChainWSI")) - return (void*) wsi_lunarg_DestroySwapChainWSI; - if (!strcmp(pName, "vkGetSwapChainInfoWSI")) - return (void*) wsi_lunarg_GetSwapChainInfoWSI; - if (!strcmp(pName, "vkQueuePresentWSI")) - return (void*) wsi_lunarg_QueuePresentWSI; - - return NULL; -} - -void *wsi_lunarg_GetDeviceProcAddr( - VkDevice device, - const char* name) -{ - 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; - - return NULL; -} diff --git a/loader/wsi_lunarg.h b/loader/wsi_lunarg.h deleted file mode 100644 index 9dcb3501..00000000 --- a/loader/wsi_lunarg.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Vulkan - * - * Copyright (C) 2015 LunarG, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Jon Ashburn <jon@lunarg.com> - * Courtney Goeltzenleuchter <courtney@lunarg.com> - */ - -#include "vk_wsi_lunarg.h" - - -void *wsi_lunarg_GetInstanceProcAddr( - VkInstance instance, - const char* pName); - -void *wsi_lunarg_GetDeviceProcAddr( - VkDevice device, - const char* pName); - -VkResult wsi_lunarg_CreateSwapChainWSI( - VkDevice device, - const VkSwapChainCreateInfoWSI* pCreateInfo, - VkSwapChainWSI* pSwapChain); |
