aboutsummaryrefslogtreecommitdiff
path: root/loader/wsi.c
diff options
context:
space:
mode:
authorJon Ashburn <jon@lunarg.com>2015-11-25 17:55:49 -0700
committerJon Ashburn <jon@lunarg.com>2015-12-01 10:26:05 -0700
commitacf4589cedc97a4183061958ec2faf69e23bda8d (patch)
tree3d3bcc2dd5e80606c872904e4cea79bbc9a4af65 /loader/wsi.c
parenta456fd459b740a9b9c0b4b37f829676d48352950 (diff)
downloadusermoji-acf4589cedc97a4183061958ec2faf69e23bda8d.tar.xz
loader: Add terminator functions for Create*SurfaceKHR functions
These need to call down the chain for layer intercept. Also remove DestroySurfaceKHR from ICD table.
Diffstat (limited to 'loader/wsi.c')
-rw-r--r--loader/wsi.c95
1 files changed, 95 insertions, 0 deletions
diff --git a/loader/wsi.c b/loader/wsi.c
index ca257a5b..a9700cb0 100644
--- a/loader/wsi.c
+++ b/loader/wsi.c
@@ -473,6 +473,25 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface)
{
+ const VkLayerInstanceDispatchTable *disp;
+ disp = loader_get_instance_dispatch(instance);
+ VkResult res;
+
+ res = disp->CreateWin32SurfaceKHR(instance, hinstance, hwnd, pAllocator, pSurface);
+ return res;
+}
+
+/*
+ * This is the instance chain terminator function
+ * for CreateWin32SurfaceKHR
+ */
+VKAPI_ATTR VkResult VKAPI_CALL loader_CreateWin32SurfaceKHR(
+ VkInstance instance,
+ HINSTANCE hinstance,
+ HWND hwnd,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface)
+{
struct loader_instance *ptr_instance = loader_get_instance(instance);
VkIcdSurfaceWin32 *pIcdSurface = NULL;
@@ -546,6 +565,25 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateMirSurfaceKHR(
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface)
{
+ const VkLayerInstanceDispatchTable *disp;
+ disp = loader_get_instance_dispatch(instance);
+ VkResult res;
+
+ res = disp->CreateMirSurfaceKHR(instance, connection, mirSurface, pAllocator, pSurface);
+ return res;
+}
+
+/*
+ * This is the instance chain terminator function
+ * for CreateMirSurfaceKHR
+ */
+VKAPI_ATTR VkResult VKAPI_CALL loader_CreateMirSurfaceKHR(
+ VkInstance instance,
+ Display* dpy,
+ Window window,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface)
+{
struct loader_instance *ptr_instance = loader_get_instance(instance);
VkIcdSurfaceMir *pIcdSurface = NULL;
@@ -621,6 +659,25 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface)
{
+ const VkLayerInstanceDispatchTable *disp;
+ disp = loader_get_instance_dispatch(instance);
+ VkResult res;
+
+ res = disp->CreateWaylandSurfaceKHR(instance, display, surface, pAllocator, pSurface);
+ return res;
+}
+
+/*
+ * This is the instance chain terminator function
+ * for CreateXlibSurfaceKHR
+ */
+VKAPI_ATTR VkResult VKAPI_CALL loader_CreateWaylandSurfaceKHR(
+ VkInstance instance,
+ struct wl_display* display,
+ struct wl_surface* surface,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface)
+{
struct loader_instance *ptr_instance = loader_get_instance(instance);
VkIcdSurfaceWayland *pIcdSurface = NULL;
@@ -696,6 +753,25 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR(
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface)
{
+ const VkLayerInstanceDispatchTable *disp;
+ disp = loader_get_instance_dispatch(instance);
+ VkResult res;
+
+ res = disp->CreateXcbSurfaceKHR(instance, connection, window, pAllocator, pSurface);
+ return res;
+}
+
+/*
+ * This is the instance chain terminator function
+ * for CreateXcbSurfaceKHR
+ */
+VKAPI_ATTR VkResult VKAPI_CALL loader_CreateXcbSurfaceKHR(
+ VkInstance instance,
+ xcb_connection_t* connection,
+ xcb_window_t window,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface)
+{
struct loader_instance *ptr_instance = loader_get_instance(instance);
VkIcdSurfaceXcb *pIcdSurface = NULL;
@@ -775,6 +851,25 @@ LOADER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(
const VkAllocationCallbacks* pAllocator,
VkSurfaceKHR* pSurface)
{
+ const VkLayerInstanceDispatchTable *disp;
+ disp = loader_get_instance_dispatch(instance);
+ VkResult res;
+
+ res = disp->CreateXlibSurfaceKHR(instance, dpy, window, pAllocator, pSurface);
+ return res;
+}
+
+/*
+ * This is the instance chain terminator function
+ * for CreateXlibSurfaceKHR
+ */
+VKAPI_ATTR VkResult VKAPI_CALL loader_CreateXlibSurfaceKHR(
+ VkInstance instance,
+ Display* dpy,
+ Window window,
+ const VkAllocationCallbacks* pAllocator,
+ VkSurfaceKHR* pSurface)
+{
struct loader_instance *ptr_instance = loader_get_instance(instance);
VkIcdSurfaceXlib *pIcdSurface = NULL;