 
            From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/vulkan.c | 16 ++++++++++++++++ dlls/winevulkan/make_vulkan | 2 ++ dlls/winevulkan/vulkan_thunks.c | 8 ++++---- include/wine/vulkan_driver.h | 2 ++ 4 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/dlls/win32u/vulkan.c b/dlls/win32u/vulkan.c index 58872f70cde..0972c64625c 100644 --- a/dlls/win32u/vulkan.c +++ b/dlls/win32u/vulkan.c @@ -478,6 +478,13 @@ static VkResult win32u_vkCreateBuffer( VkDevice client_device, const VkBufferCre return device->p_vkCreateBuffer( device->host.device, create_info, NULL, buffer ); }
+static void win32u_vkDestroyBuffer( VkDevice client_device, VkBuffer buffer, const VkAllocationCallbacks *allocator ) +{ + struct vulkan_device *device = vulkan_device_from_handle( client_device ); + + device->p_vkDestroyBuffer( device->host.device, buffer, NULL ); +} + static void win32u_vkGetDeviceBufferMemoryRequirements( VkDevice client_device, const VkDeviceBufferMemoryRequirements *buffer_requirements, VkMemoryRequirements2 *memory_requirements ) { @@ -571,6 +578,13 @@ static VkResult win32u_vkCreateImage( VkDevice client_device, const VkImageCreat return device->p_vkCreateImage( device->host.device, create_info, NULL, image ); }
+static void win32u_vkDestroyImage( VkDevice client_device, VkImage image, const VkAllocationCallbacks *allocator ) +{ + struct vulkan_device *device = vulkan_device_from_handle( client_device ); + + device->p_vkDestroyImage( device->host.device, image, NULL ); +} + static void win32u_vkGetDeviceImageMemoryRequirements( VkDevice client_device, const VkDeviceImageMemoryRequirements *image_requirements, VkMemoryRequirements2 *memory_requirements ) { @@ -1393,6 +1407,8 @@ static struct vulkan_funcs vulkan_funcs = .p_vkCreateSemaphore = win32u_vkCreateSemaphore, .p_vkCreateSwapchainKHR = win32u_vkCreateSwapchainKHR, .p_vkCreateWin32SurfaceKHR = win32u_vkCreateWin32SurfaceKHR, + .p_vkDestroyBuffer = win32u_vkDestroyBuffer, + .p_vkDestroyImage = win32u_vkDestroyImage, .p_vkDestroyFence = win32u_vkDestroyFence, .p_vkDestroySemaphore = win32u_vkDestroySemaphore, .p_vkDestroySurfaceKHR = win32u_vkDestroySurfaceKHR, diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index d94ba9eadf4..c2a5b62ec2e 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -204,6 +204,8 @@ USER_DRIVER_FUNCS = { "vkCreateSemaphore", "vkCreateSwapchainKHR", "vkCreateWin32SurfaceKHR", + "vkDestroyBuffer", + "vkDestroyImage", "vkDestroyFence", "vkDestroySemaphore", "vkDestroySurfaceKHR", diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index 7fa3491fedb..de2ac6b4b1d 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -51185,7 +51185,7 @@ static NTSTATUS thunk64_vkDestroyBuffer(void *args)
TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->buffer), params->pAllocator);
- vulkan_device_from_handle(params->device)->p_vkDestroyBuffer(vulkan_device_from_handle(params->device)->host.device, params->buffer, NULL); + vk_funcs->p_vkDestroyBuffer(params->device, params->buffer, params->pAllocator); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -51201,7 +51201,7 @@ static NTSTATUS thunk32_vkDestroyBuffer(void *args)
TRACE("%#x, 0x%s, %#x\n", params->device, wine_dbgstr_longlong(params->buffer), params->pAllocator);
- vulkan_device_from_handle((VkDevice)UlongToPtr(params->device))->p_vkDestroyBuffer(vulkan_device_from_handle((VkDevice)UlongToPtr(params->device))->host.device, params->buffer, NULL); + vk_funcs->p_vkDestroyBuffer((VkDevice)UlongToPtr(params->device), params->buffer, (const VkAllocationCallbacks *)UlongToPtr(params->pAllocator)); return STATUS_SUCCESS; }
@@ -51649,7 +51649,7 @@ static NTSTATUS thunk64_vkDestroyImage(void *args)
TRACE("%p, 0x%s, %p\n", params->device, wine_dbgstr_longlong(params->image), params->pAllocator);
- vulkan_device_from_handle(params->device)->p_vkDestroyImage(vulkan_device_from_handle(params->device)->host.device, params->image, NULL); + vk_funcs->p_vkDestroyImage(params->device, params->image, params->pAllocator); return STATUS_SUCCESS; } #endif /* _WIN64 */ @@ -51665,7 +51665,7 @@ static NTSTATUS thunk32_vkDestroyImage(void *args)
TRACE("%#x, 0x%s, %#x\n", params->device, wine_dbgstr_longlong(params->image), params->pAllocator);
- vulkan_device_from_handle((VkDevice)UlongToPtr(params->device))->p_vkDestroyImage(vulkan_device_from_handle((VkDevice)UlongToPtr(params->device))->host.device, params->image, NULL); + vk_funcs->p_vkDestroyImage((VkDevice)UlongToPtr(params->device), params->image, (const VkAllocationCallbacks *)UlongToPtr(params->pAllocator)); return STATUS_SUCCESS; }
diff --git a/include/wine/vulkan_driver.h b/include/wine/vulkan_driver.h index be2f5296082..92d5386e4df 100644 --- a/include/wine/vulkan_driver.h +++ b/include/wine/vulkan_driver.h @@ -217,6 +217,8 @@ struct vulkan_funcs PFN_vkCreateSemaphore p_vkCreateSemaphore; PFN_vkCreateSwapchainKHR p_vkCreateSwapchainKHR; PFN_vkCreateWin32SurfaceKHR p_vkCreateWin32SurfaceKHR; + PFN_vkDestroyBuffer p_vkDestroyBuffer; + PFN_vkDestroyImage p_vkDestroyImage; PFN_vkDestroyFence p_vkDestroyFence; PFN_vkDestroySemaphore p_vkDestroySemaphore; PFN_vkDestroySurfaceKHR p_vkDestroySurfaceKHR;