[PATCH 05/10] winex11: Add initial vkEnumerateInstanceExtensionProperties implementation.
Roderick Colenbrander
thunderbird2k at gmail.com
Tue Oct 31 12:24:51 CDT 2017
Signed-off-by: Roderick Colenbrander <thunderbird2k at gmail.com>
---
dlls/winex11.drv/vulkan.c | 27 +++++++++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c
index cff474190a..e0e45d47ce 100644
--- a/dlls/winex11.drv/vulkan.c
+++ b/dlls/winex11.drv/vulkan.c
@@ -63,8 +63,31 @@ VkResult WINAPI X11DRV_vkCreateInstance(const VkInstanceCreateInfo *pCreateInfo,
VkResult WINAPI X11DRV_vkEnumerateInstanceExtensionProperties(const char *pLayerName, uint32_t *pPropertyCount,
VkExtensionProperties* pProperties)
{
- FIXME("stub: %p, %p, %p\n", pLayerName, pPropertyCount, pProperties);
- return VK_ERROR_OUT_OF_HOST_MEMORY;
+ TRACE("pLayerName %p, pPropertyCount %p, pProperties %p\n", pLayerName, pPropertyCount, pProperties);
+
+ /* This shouldn't get called with pLayerName set, the ICD loader prevents it. */
+ if (pLayerName)
+ {
+ ERR("Layer enumeration not supported from ICD.\n");
+ return VK_ERROR_LAYER_NOT_PRESENT;
+ }
+
+ if (!pProperties)
+ {
+ /* When pProperties is NULL, we need to return the number of extensions supported.
+ * For now report 0 until we add some e.g. VK_KHR_win32_surface.
+ * Long-term this needs to be an intersection between what the native library supports
+ * and what thunks we have.
+ */
+ *pPropertyCount = 0;
+ return VK_SUCCESS;
+ }
+
+ /* When pProperties is not NULL, we copy the extensions over and set pPropertyCount to
+ * the number of copied extensions. For now we don't have much to do.
+ */
+ *pPropertyCount = 0;
+ return VK_SUCCESS;
}
PFN_vkVoidFunction WINAPI X11DRV_vkGetInstanceProcAddr(VkInstance instance, const char* pName)
--
2.13.6
More information about the wine-patches
mailing list