[PATCH 7/9] winex11: Implement vkEnumerateInstanceExtensionProperties.
Roderick Colenbrander <[email protected]> Mon, 6 Nov 2017 00:08:23 -0800
| Newsgroups | gmane.comp.emulators.wine.patches |
|---|---|
| Message-ID | <[email protected]> |
Signed-off-by: Roderick Colenbrander <[email protected]> --- dlls/winex11.drv/vulkan.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c index b89d64fe87..c3897af85d 100644 --- a/dlls/winex11.drv/vulkan.c +++ b/dlls/winex11.drv/vulkan.c @@ -36,8 +36,32 @@ static VkResult X11DRV_vkCreateInstance(const VkInstanceCreateInfo *pCreateInfo, static VkResult X11DRV_vkEnumerateInstanceExtensionProperties(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties* pProperties) { - FIXME("stub: %s %p %p\n", debugstr_a(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 as we don't support + * any extensions yet. + */ + *pPropertyCount = 0; + return VK_SUCCESS; } static struct vulkan_funcs vulkan_funcs = { -- 2.13.6