aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMark Young <[email protected]>2016-06-28 10:52:43 -0600
committerMark Lobodzinski <[email protected]>2018-05-04 09:23:49 -0600
commitd30f8ca53e87873c52c57b0f92d7f77d3526f43f (patch)
treef85b1eb0e1dd313cd30cb3ce5f7839cdd696434b
parent70144970cdc4b347e9fb0ef2409b9a3ea854727b (diff)
downloadVulkan-Headers-d30f8ca53e87873c52c57b0f92d7f77d3526f43f.tar.gz
Vulkan-Headers-d30f8ca53e87873c52c57b0f92d7f77d3526f43f.zip
loader: gh181 use ICD for SurfaceKHR
Use the ICD to create and destroy VkSurfaceKHR objects instead of just performing the work in the ICD. This only occurs if the ICD exports the appropriate entry-points, and exposes version 3 of the loader/icd interface. Change-Id: I5e7bf9506318823c57ad75cf19d3f53fdfa6451e
-rw-r--r--include/vulkan/vk_icd.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/include/vulkan/vk_icd.h b/include/vulkan/vk_icd.h
index a649364..39442fb 100644
--- a/include/vulkan/vk_icd.h
+++ b/include/vulkan/vk_icd.h
@@ -28,7 +28,7 @@
/*
* Loader-ICD version negotiation API
*/
-#define CURRENT_LOADER_ICD_INTERFACE_VERSION 2
+#define CURRENT_LOADER_ICD_INTERFACE_VERSION 3
#define MIN_SUPPORTED_LOADER_ICD_INTERFACE_VERSION 0
typedef VkResult (VKAPI_PTR *PFN_vkNegotiateLoaderICDInterfaceVersion)(uint32_t *pVersion);
/*
@@ -121,4 +121,31 @@ typedef struct {
VkDisplayPlaneAlphaFlagBitsKHR alphaMode;
VkExtent2D imageExtent;
} VkIcdSurfaceDisplay;
+
+typedef struct {
+ union {
+#ifdef VK_USE_PLATFORM_MIR_KHR
+ VkIcdSurfaceMir mir_surf;
+#endif // VK_USE_PLATFORM_MIR_KHR
+#ifdef VK_USE_PLATFORM_WAYLAND_KHR
+ VkIcdSurfaceWayland wayland_surf;
+#endif // VK_USE_PLATFORM_WAYLAND_KHR
+#ifdef VK_USE_PLATFORM_WIN32_KHR
+ VkIcdSurfaceWin32 win_surf;
+#endif // VK_USE_PLATFORM_WIN32_KHR
+#ifdef VK_USE_PLATFORM_XCB_KHR
+ VkIcdSurfaceXcb xcb_surf;
+#endif // VK_USE_PLATFORM_XCB_KHR
+#ifdef VK_USE_PLATFORM_XLIB_KHR
+ VkIcdSurfaceXlib xlib_surf;
+#endif // VK_USE_PLATFORM_XLIB_KHR
+ VkIcdSurfaceDisplay display_surf;
+ };
+ uint32_t base_size; // Size of VkIcdSurfaceBase
+ uint32_t platform_size; // Size of corresponding VkIcdSurfaceXXX
+ uint32_t non_platform_offset; // Start offset to base_size
+ uint32_t entire_size; // Size of entire VkIcdSurface
+ VkSurfaceKHR *real_icd_surfaces;
+} VkIcdSurface;
+
#endif // VKICD_H