From 4a7154ea7277cf846262b5194ade86f5e96b340a Mon Sep 17 00:00:00 2001 From: Jon Ashburn Date: Fri, 27 Nov 2015 17:57:12 -0700 Subject: loader: Add documentation fo loader handling of VK_surface_*KHR extensions. Document the special handling og vkSurfaceKHR objects. --- loader/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'loader') diff --git a/loader/README.md b/loader/README.md index b8840d2c..24f95583 100644 --- a/loader/README.md +++ b/loader/README.md @@ -28,7 +28,12 @@ finds ICD driver libraries. - vkEnumerateInstanceExtensionProperties exported - vkGetDeviceProcAddr exported and returns valid function pointers for all the VK API entrypoints - vkGetInstanceProcAddr exported and returns valid function pointers for all the VK API entrypoints -- all objects created by ICD can be cast to (VK\_LAYER\_DISPATCH\_TABLE \*\*) +- WSI surface extensions (vk_KHR_*surface) handling: + 1. Loader handles the vkCreate*SurfaceKHR() and vkDestroySurfaceKHR() functions including creating/destroying the VkSurfaceKHR object + 2. VkSurfaceKHR objects have the underlying structure (VKIcdSurface*) as defined in include/vulkan/vk_icd.h + 3. ICDs can cast any VkSurfaceKHR object to a pointer to the appropriate VKIcdSurface* structure + 4. VkIcdSurface* structures include VkIcdSurfaceWin32, VkIcdSurfaceXcb, VkIcdSurfaceXlib, VkIcdSurfaceMir, and VkIcdSurfaceWayland +- all objects created by an ICD can be cast to (VK\_LAYER\_DISPATCH\_TABLE \*\*) where the loader will replace the first entry with a pointer to the dispatch table which is owned by the loader. This implies three things for ICD drivers: 1. The ICD must return a pointer for the opaque object handle -- cgit v1.2.3