<div dir="ltr">Acked-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 17, 2018 at 10:05 PM, Tapani Pälli <span dir="ltr"><<a href="mailto:tapani.palli@intel.com" target="_blank">tapani.palli@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Import from commit eb0c1fd on branch 'master'<br>
of <a href="https://github.com/KhronosGroup/Vulkan-Headers.git" rel="noreferrer" target="_blank">https://github.com/<wbr>KhronosGroup/Vulkan-Headers.<wbr>git</a>.<br>
<br>
Signed-off-by: Tapani Pälli <<a href="mailto:tapani.palli@intel.com">tapani.palli@intel.com</a>><br>
---<br>
include/vulkan/vk_icd.h | 67 ++++++++++++++++++++++++++++++<wbr>++++++++-----------<br>
1 file changed, 53 insertions(+), 14 deletions(-)<br>
<br>
diff --git a/include/vulkan/vk_icd.h b/include/vulkan/vk_icd.h<br>
index 7b54fb5774..b935fa1786 100644<br>
--- a/include/vulkan/vk_icd.h<br>
+++ b/include/vulkan/vk_icd.h<br>
@@ -24,13 +24,34 @@<br>
#define VKICD_H<br>
<br>
#include "vulkan.h"<br>
-<br>
-/*<br>
- * Loader-ICD version negotiation API<br>
- */<br>
-#define CURRENT_LOADER_ICD_INTERFACE_<wbr>VERSION 3<br>
+#include <stdbool.h><br>
+<br>
+// Loader-ICD version negotiation API. Versions add the following features:<br>
+// Version 0 - Initial. Doesn't support vk_icdGetInstanceProcAddr<br>
+// or vk_<wbr>icdNegotiateLoaderICDInterface<wbr>Version.<br>
+// Version 1 - Add support for vk_icdGetInstanceProcAddr.<br>
+// Version 2 - Add Loader/ICD Interface version negotiation<br>
+// via vk_<wbr>icdNegotiateLoaderICDInterface<wbr>Version.<br>
+// Version 3 - Add ICD creation/destruction of KHR_surface objects.<br>
+// Version 4 - Add unknown physical device extension qyering via<br>
+// vk_<wbr>icdGetPhysicalDeviceProcAddr.<br>
+// Version 5 - Tells ICDs that the loader is now paying attention to the<br>
+// application version of Vulkan passed into the ApplicationInfo<br>
+// structure during vkCreateInstance. This will tell the ICD<br>
+// that if the loader is older, it should automatically fail a<br>
+// call for any API version > 1.0. Otherwise, the loader will<br>
+// manually determine if it can support the expected version.<br>
+#define CURRENT_LOADER_ICD_INTERFACE_<wbr>VERSION 5<br>
#define MIN_SUPPORTED_LOADER_ICD_<wbr>INTERFACE_VERSION 0<br>
-typedef VkResult (VKAPI_PTR *PFN_<wbr>vkNegotiateLoaderICDInterfaceV<wbr>ersion)(uint32_t *pVersion);<br>
+#define MIN_PHYS_DEV_EXTENSION_ICD_<wbr>INTERFACE_VERSION 4<br>
+typedef VkResult(VKAPI_PTR *PFN_<wbr>vkNegotiateLoaderICDInterfaceV<wbr>ersion)(uint32_t *pVersion);<br>
+<br>
+// This is defined in vk_layer.h which will be found by the loader, but if an ICD is building against this<br>
+// file directly, it won't be found.<br>
+#ifndef PFN_GetPhysicalDeviceProcAddr<br>
+typedef PFN_vkVoidFunction(VKAPI_PTR *PFN_<wbr>GetPhysicalDeviceProcAddr)(<wbr>VkInstance instance, const char *pName);<br>
+#endif<br>
+<br>
/*<br>
* The ICD must reserve space for a pointer for the loader's dispatch<br>
* table, at the start of <each object>.<br>
@@ -64,6 +85,9 @@ typedef enum {<br>
VK_ICD_WSI_PLATFORM_WIN32,<br>
VK_ICD_WSI_PLATFORM_XCB,<br>
VK_ICD_WSI_PLATFORM_XLIB,<br>
+ VK_ICD_WSI_PLATFORM_ANDROID,<br>
+ VK_ICD_WSI_PLATFORM_MACOS,<br>
+ VK_ICD_WSI_PLATFORM_IOS,<br>
VK_ICD_WSI_PLATFORM_DISPLAY<br>
} VkIcdWsiPlatform;<br>
<br>
@@ -77,7 +101,7 @@ typedef struct {<br>
MirConnection *connection;<br>
MirSurface *mirSurface;<br>
} VkIcdSurfaceMir;<br>
-#endif // VK_USE_PLATFORM_MIR_KHR<br>
+#endif // VK_USE_PLATFORM_MIR_KHR<br>
<br>
#ifdef VK_USE_PLATFORM_WAYLAND_KHR<br>
typedef struct {<br>
@@ -85,7 +109,7 @@ typedef struct {<br>
struct wl_display *display;<br>
struct wl_surface *surface;<br>
} VkIcdSurfaceWayland;<br>
-#endif // VK_USE_PLATFORM_WAYLAND_KHR<br>
+#endif // VK_USE_PLATFORM_WAYLAND_KHR<br>
<br>
#ifdef VK_USE_PLATFORM_WIN32_KHR<br>
typedef struct {<br>
@@ -93,7 +117,7 @@ typedef struct {<br>
HINSTANCE hinstance;<br>
HWND hwnd;<br>
} VkIcdSurfaceWin32;<br>
-#endif // VK_USE_PLATFORM_WIN32_KHR<br>
+#endif // VK_USE_PLATFORM_WIN32_KHR<br>
<br>
#ifdef VK_USE_PLATFORM_XCB_KHR<br>
typedef struct {<br>
@@ -101,7 +125,7 @@ typedef struct {<br>
xcb_connection_t *connection;<br>
xcb_window_t window;<br>
} VkIcdSurfaceXcb;<br>
-#endif // VK_USE_PLATFORM_XCB_KHR<br>
+#endif // VK_USE_PLATFORM_XCB_KHR<br>
<br>
#ifdef VK_USE_PLATFORM_XLIB_KHR<br>
typedef struct {<br>
@@ -109,13 +133,28 @@ typedef struct {<br>
Display *dpy;<br>
Window window;<br>
} VkIcdSurfaceXlib;<br>
-#endif // VK_USE_PLATFORM_XLIB_KHR<br>
+#endif // VK_USE_PLATFORM_XLIB_KHR<br>
<br>
#ifdef VK_USE_PLATFORM_ANDROID_KHR<br>
typedef struct {<br>
- ANativeWindow* window;<br>
+ VkIcdSurfaceBase base;<br>
+ struct ANativeWindow *window;<br>
} VkIcdSurfaceAndroid;<br>
-#endif //VK_USE_PLATFORM_ANDROID_KHR<br>
+#endif // VK_USE_PLATFORM_ANDROID_KHR<br>
+<br>
+#ifdef VK_USE_PLATFORM_MACOS_MVK<br>
+typedef struct {<br>
+ VkIcdSurfaceBase base;<br>
+ const void *pView;<br>
+} VkIcdSurfaceMacOS;<br>
+#endif // VK_USE_PLATFORM_MACOS_MVK<br>
+<br>
+#ifdef VK_USE_PLATFORM_IOS_MVK<br>
+typedef struct {<br>
+ VkIcdSurfaceBase base;<br>
+ const void *pView;<br>
+} VkIcdSurfaceIOS;<br>
+#endif // VK_USE_PLATFORM_IOS_MVK<br>
<br>
typedef struct {<br>
VkIcdSurfaceBase base;<br>
@@ -128,4 +167,4 @@ typedef struct {<br>
VkExtent2D imageExtent;<br>
} VkIcdSurfaceDisplay;<br>
<br>
-#endif // VKICD_H<br>
+#endif // VKICD_H<br>
<span class="HOEnZb"><font color="#888888">-- <br>
2.14.3<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>