Commit 982c2ede authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winevulkan: Keep the create_info HWND on the surface wrappers.

parent 62536d16
...@@ -1450,24 +1450,20 @@ void wine_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDevice phy ...@@ -1450,24 +1450,20 @@ void wine_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(VkPhysicalDevice phy
properties->externalSemaphoreFeatures = 0; properties->externalSemaphoreFeatures = 0;
} }
VkResult wine_vkCreateWin32SurfaceKHR(VkInstance handle, const VkWin32SurfaceCreateInfoKHR *createInfo, VkResult wine_vkCreateWin32SurfaceKHR(VkInstance handle, const VkWin32SurfaceCreateInfoKHR *create_info,
const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface) const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface)
{ {
struct wine_instance *instance = wine_instance_from_handle(handle); struct wine_instance *instance = wine_instance_from_handle(handle);
struct wine_surface *object; struct wine_surface *object;
VkResult res; VkResult res;
if (allocator) if (allocator) FIXME("Support for allocation callbacks not implemented yet\n");
FIXME("Support for allocation callbacks not implemented yet\n");
object = calloc(1, sizeof(*object));
if (!object)
return VK_ERROR_OUT_OF_HOST_MEMORY;
res = instance->funcs.p_vkCreateWin32SurfaceKHR(instance->host_instance, createInfo, NULL, if (!(object = calloc(1, sizeof(*object)))) return VK_ERROR_OUT_OF_HOST_MEMORY;
&object->driver_surface); object->hwnd = create_info->hwnd;
res = instance->funcs.p_vkCreateWin32SurfaceKHR(instance->host_instance, create_info,
NULL /* allocator */, &object->driver_surface);
if (res != VK_SUCCESS) if (res != VK_SUCCESS)
{ {
free(object); free(object);
......
...@@ -222,7 +222,8 @@ static inline VkDebugReportCallbackEXT wine_debug_report_callback_to_handle( ...@@ -222,7 +222,8 @@ static inline VkDebugReportCallbackEXT wine_debug_report_callback_to_handle(
struct wine_surface struct wine_surface
{ {
VkSurfaceKHR host_surface; VkSurfaceKHR host_surface;
VkSurfaceKHR driver_surface; /* wine driver surface */ VkSurfaceKHR driver_surface;
HWND hwnd;
struct wine_vk_mapping mapping; struct wine_vk_mapping mapping;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment