aboutsummaryrefslogtreecommitdiff
path: root/loader
diff options
context:
space:
mode:
authorMark Lobodzinski <mark@lunarg.com>2015-11-25 13:26:15 -0700
committerJon Ashburn <jon@lunarg.com>2015-12-01 10:26:04 -0700
commit9d452bdb2df85adff77c19ab85cd26b24cbeadbf (patch)
treec48fdef356eb0ed86e1782b0ef972aac47af2d91 /loader
parent68d7d2390fc6080a00046e35f4b68b2eaa6cc9ea (diff)
downloadusermoji-9d452bdb2df85adff77c19ab85cd26b24cbeadbf.tar.xz
wsi: Moved definition of CreateXxxSurface extension to CMakefile
Removed component-specific definitions
Diffstat (limited to 'loader')
-rw-r--r--loader/loader.c5
-rw-r--r--loader/loader.h9
-rw-r--r--loader/wsi.c17
3 files changed, 4 insertions, 27 deletions
diff --git a/loader/loader.c b/loader/loader.c
index 59a4b961..c1b441b3 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -26,6 +26,7 @@
* Author: Jon Ashburn <jon@lunarg.com>
*
*/
+
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
@@ -111,6 +112,8 @@ const VkLayerInstanceDispatchTable instance_disp = {
.GetPhysicalDeviceSurfaceCapabilitiesKHR = loader_GetPhysicalDeviceSurfaceCapabilitiesKHR,
.GetPhysicalDeviceSurfaceFormatsKHR = loader_GetPhysicalDeviceSurfaceFormatsKHR,
.GetPhysicalDeviceSurfacePresentModesKHR = loader_GetPhysicalDeviceSurfacePresentModesKHR,
+ .DbgCreateMsgCallback = loader_DbgCreateMsgCallback,
+ .DbgDestroyMsgCallback = loader_DbgDestroyMsgCallback,
#ifdef VK_USE_PLATFORM_MIR_KHR
.CreateMirSurfaceKHR = vkCreateMirSurfaceKHR,
.GetPhysicalDeviceMirPresentationSupportKHR = loader_GetPhysicalDeviceMirPresentationSupportKHR,
@@ -131,8 +134,6 @@ const VkLayerInstanceDispatchTable instance_disp = {
.CreateXlibSurfaceKHR = vkCreateXlibSurfaceKHR,
.GetPhysicalDeviceXlibPresentationSupportKHR = loader_GetPhysicalDeviceXlibPresentationSupportKHR,
#endif
- .DbgCreateMsgCallback = loader_DbgCreateMsgCallback,
- .DbgDestroyMsgCallback = loader_DbgDestroyMsgCallback,
};
LOADER_PLATFORM_THREAD_ONCE_DECLARATION(once_init);
diff --git a/loader/loader.h b/loader/loader.h
index 18766ef6..0c70f591 100644
--- a/loader/loader.h
+++ b/loader/loader.h
@@ -32,14 +32,6 @@
#ifndef LOADER_H
#define LOADER_H
-#if defined _WIN32
-#define VK_USE_PLATFORM_WIN32_KHR
-#else
-//#define VK_USE_PLATFORM_MIR_KHR
-//#define VK_USE_PLATFORM_WAYLAND_KHR
-#define VK_USE_PLATFORM_XCB_KHR
-//#define VK_USE_PLATFORM_XLIB_KHR
-#endif
#include <vulkan/vulkan.h>
#include <vk_loader_platform.h>
@@ -193,6 +185,7 @@ struct loader_icd {
#endif
#ifdef VK_USE_PLATFORM_XCB_KHR
PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR GetPhysicalDeviceXcbPresentationSupportKHR;
+ PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR;
#endif
#ifdef VK_USE_PLATFORM_XLIB_KHR
PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR GetPhysicalDeviceXlibPresentationSupportKHR;
diff --git a/loader/wsi.c b/loader/wsi.c
index 7d3616c3..91f47191 100644
--- a/loader/wsi.c
+++ b/loader/wsi.c
@@ -24,23 +24,6 @@
* Author: Ian Elliott <ianelliott@google.com>
*/
-// FIXME/TODO: DEVELOP A BETTER APPROACH FOR SETTING THE DEFAULT VALUES FOR
-// THESE PLATFORM-SPECIFIC MACROS APPROPRIATELY:
-#ifdef _WIN32
-// The Win32 default is to support the WIN32 platform:
-#ifndef VK_USE_PLATFORM_WIN32_KHR
-#define VK_USE_PLATFORM_WIN32_KHR
-#endif
-#else // _WIN32 (i.e. Linux)
-// The Linux default is to support the XCB platform:
-#if (!defined(VK_USE_PLATFORM_MIR_KHR) && \
- !defined(VK_USE_PLATFORM_WAYLAND_KHR) && \
- !defined(VK_USE_PLATFORM_XCB_KHR) && \
- !defined(VK_USE_PLATFORM_XLIB_KHR))
-#define VK_USE_PLATFORM_XCB_KHR
-#endif
-#endif // _WIN32
-
//#define _ISOC11_SOURCE /* for aligned_alloc() */
#define _GNU_SOURCE
#include <stdlib.h>