diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 3b045db8a92..7499cf7011e 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -90,6 +90,7 @@ FUNCTION_OVERRIDES = { # Instance functions "vkDestroyInstance" : {"dispatch" : True, "driver" : True, "thunk" : False }, + "vkEnumerateDeviceExtensionProperties" : {"dispatch" : True, "driver" : False, "thunk" : False}, "vkEnumeratePhysicalDevices" : {"dispatch" : True, "driver" : False, "thunk" : False}, } diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index a2223cfa759..913d14b9721 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -213,6 +213,32 @@ void WINAPI wine_vkDestroyInstance(VkInstance instance, const VkAllocationCallba wine_vk_instance_free(instance); } +VkResult WINAPI wine_vkEnumerateDeviceExtensionProperties(VkPhysicalDevice phys_dev, + const char *layer_name, uint32_t *count, VkExtensionProperties *properties) +{ + TRACE("%p, %p, %p, %p\n", phys_dev, layer_name, count, properties); + + /* This shouldn't get called with layer_name set, the ICD loader prevents it. */ + if (layer_name) + { + ERR("Layer enumeration not supported from ICD.\n"); + return VK_ERROR_LAYER_NOT_PRESENT; + } + + if (!properties) + { + *count = 0; /* No extensions yet. */ + return VK_SUCCESS; + } + + /* When properties is not NULL, we copy the extensions over and set count to + * the number of copied extensions. For now we don't have much to do as we don't support + * any extensions yet. + */ + *count = 0; + return VK_SUCCESS; +} + static VkResult WINAPI wine_vkEnumerateInstanceExtensionProperties(const char *layer_name, uint32_t *count, VkExtensionProperties *properties) { diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index ae4f773ef0d..2e1b62d23c0 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -16,12 +16,6 @@ static VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice physicalDevice, cons return VK_ERROR_OUT_OF_HOST_MEMORY; } -static VkResult WINAPI wine_vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) -{ - FIXME("stub: %p, %p, %p, %p\n", physicalDevice, pLayerName, pPropertyCount, pProperties); - return VK_ERROR_OUT_OF_HOST_MEMORY; -} - static VkResult WINAPI wine_vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, VkLayerProperties *pProperties) { FIXME("stub: %p, %p, %p\n", physicalDevice, pPropertyCount, pProperties); diff --git a/dlls/winevulkan/vulkan_thunks.h b/dlls/winevulkan/vulkan_thunks.h index 26e114ab74f..b8d2bbdb0ff 100644 --- a/dlls/winevulkan/vulkan_thunks.h +++ b/dlls/winevulkan/vulkan_thunks.h @@ -8,6 +8,7 @@ void *wine_vk_get_instance_proc_addr(const char *name) DECLSPEC_HIDDEN; /* Functions for which we have custom implementations outside of the thunks. */ void WINAPI wine_vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) DECLSPEC_HIDDEN; +VkResult WINAPI wine_vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) DECLSPEC_HIDDEN; VkResult WINAPI wine_vkEnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount, VkPhysicalDevice *pPhysicalDevices) DECLSPEC_HIDDEN; /* For use by vkInstance and children */