From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winevulkan/vulkan.c | 10 +++++----- dlls/winevulkan/vulkan_private.h | 28 ---------------------------- 2 files changed, 5 insertions(+), 33 deletions(-)
diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 9a26f87ac7f..8b3d5bccc53 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -1725,7 +1725,7 @@ VkResult wine_vkCreateWin32SurfaceKHR(VkInstance client_instance, const VkWin32S if (dummy) NtUserDestroyWindow(dummy); window_surfaces_insert(surface);
- *ret = wine_surface_to_handle(surface); + *ret = surface->obj.client.surface; add_handle_mapping(instance, *ret, surface->obj.host.surface, &surface->wrapper_entry); return VK_SUCCESS; } @@ -1844,7 +1844,7 @@ VkResult wine_vkCreateSwapchainKHR(VkDevice client_device, const VkSwapchainCrea object->surface = surface; object->extents = create_info->imageExtent;
- *ret = wine_swapchain_to_handle(object); + *ret = object->obj.client.swapchain; add_handle_mapping(instance, *ret, object->obj.host.swapchain, &object->wrapper_entry); return VK_SUCCESS; } @@ -2428,7 +2428,7 @@ VkResult wine_vkCreateDebugUtilsMessengerEXT(VkInstance client_instance, object->user_callback = (UINT_PTR)create_info->pfnUserCallback; object->user_data = (UINT_PTR)create_info->pUserData;
- *messenger = wine_debug_utils_messenger_to_handle(object); + *messenger = object->client.debug_messenger; add_handle_mapping(instance, *messenger, object->host.debug_messenger, &object->wrapper_entry); return VK_SUCCESS; } @@ -2484,7 +2484,7 @@ VkResult wine_vkCreateDebugReportCallbackEXT(VkInstance client_instance, object->user_callback = (UINT_PTR)create_info->pfnCallback; object->user_data = (UINT_PTR)create_info->pUserData;
- *callback = wine_debug_report_callback_to_handle(object); + *callback = object->client.debug_callback; add_handle_mapping(instance, *callback, object->host.debug_callback, &object->wrapper_entry); return VK_SUCCESS; } @@ -2532,7 +2532,7 @@ VkResult wine_vkCreateDeferredOperationKHR(VkDevice device_handle, vulkan_object_init(&object->obj, host_deferred_operation, NULL); init_conversion_context(&object->ctx);
- *operation = wine_deferred_operation_to_handle(object); + *operation = object->client.deferred_operation; add_handle_mapping(instance, *operation, object->host.deferred_operation, &object->wrapper_entry); return VK_SUCCESS; } diff --git a/dlls/winevulkan/vulkan_private.h b/dlls/winevulkan/vulkan_private.h index d762e51e951..bcf24bdd5ef 100644 --- a/dlls/winevulkan/vulkan_private.h +++ b/dlls/winevulkan/vulkan_private.h @@ -172,24 +172,12 @@ static inline struct wine_debug_utils_messenger *wine_debug_utils_messenger_from return (struct wine_debug_utils_messenger *)(uintptr_t)handle; }
-static inline VkDebugUtilsMessengerEXT wine_debug_utils_messenger_to_handle( - struct wine_debug_utils_messenger *debug_messenger) -{ - return (VkDebugUtilsMessengerEXT)(uintptr_t)debug_messenger; -} - static inline struct wine_debug_report_callback *wine_debug_report_callback_from_handle( VkDebugReportCallbackEXT handle) { return (struct wine_debug_report_callback *)(uintptr_t)handle; }
-static inline VkDebugReportCallbackEXT wine_debug_report_callback_to_handle( - struct wine_debug_report_callback *debug_messenger) -{ - return (VkDebugReportCallbackEXT)(uintptr_t)debug_messenger; -} - struct wine_surface { struct vulkan_surface obj; @@ -206,11 +194,6 @@ static inline struct wine_surface *wine_surface_from_handle(VkSurfaceKHR handle) return CONTAINING_RECORD(obj, struct wine_surface, obj); }
-static inline VkSurfaceKHR wine_surface_to_handle(struct wine_surface *surface) -{ - return (VkSurfaceKHR)(uintptr_t)&surface->obj; -} - struct wine_swapchain { struct vulkan_swapchain obj; @@ -226,11 +209,6 @@ static inline struct wine_swapchain *wine_swapchain_from_handle(VkSwapchainKHR h return CONTAINING_RECORD(obj, struct wine_swapchain, obj); }
-static inline VkSwapchainKHR wine_swapchain_to_handle(struct wine_swapchain *surface) -{ - return (VkSwapchainKHR)(uintptr_t)&surface->obj; -} - BOOL wine_vk_device_extension_supported(const char *name); BOOL wine_vk_instance_extension_supported(const char *name); BOOL wine_vk_is_host_surface_extension(const char *name); @@ -295,12 +273,6 @@ static inline struct wine_deferred_operation *wine_deferred_operation_from_handl return (struct wine_deferred_operation *)(uintptr_t)handle; }
-static inline VkDeferredOperationKHR wine_deferred_operation_to_handle( - struct wine_deferred_operation *deferred_operation) -{ - return (VkDeferredOperationKHR)(uintptr_t)deferred_operation; -} - typedef UINT32 PTR32;
typedef struct