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
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)
{
struct wine_instance *instance = wine_instance_from_handle(handle);
struct wine_surface *object;
VkResult res;
if (allocator)
FIXME("Support for allocation callbacks not implemented yet\n");
object = calloc(1, sizeof(*object));
if (!object)
return VK_ERROR_OUT_OF_HOST_MEMORY;
if (allocator) FIXME("Support for allocation callbacks not implemented yet\n");
res = instance->funcs.p_vkCreateWin32SurfaceKHR(instance->host_instance, createInfo, NULL,
&object->driver_surface);
if (!(object = calloc(1, sizeof(*object)))) return VK_ERROR_OUT_OF_HOST_MEMORY;
object->hwnd = create_info->hwnd;
res = instance->funcs.p_vkCreateWin32SurfaceKHR(instance->host_instance, create_info,
NULL /* allocator */, &object->driver_surface);
if (res != VK_SUCCESS)
{
free(object);
......
......@@ -222,7 +222,8 @@ static inline VkDebugReportCallbackEXT wine_debug_report_callback_to_handle(
struct wine_surface
{
VkSurfaceKHR host_surface;
VkSurfaceKHR driver_surface; /* wine driver surface */
VkSurfaceKHR driver_surface;
HWND hwnd;
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