From 7629c00557c135aae4f0cdfbfa31002b43d8b31e Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 17 Oct 2018 14:35:16 -0500 Subject: vulkan/wsi: Store the instance allocator in wsi_device We already have wsi_device and we know the instance allocator at wsi_device_init time so there's no need to pass it into the physical device queries. This also fixes a memory allocation domain bug that can occur if CreateSwapchain gets called prior to any queries (not likely) in which case the cached connection gets allocated off the device instead of the instance. Reviewed-by: Eric Engestrom Reviewed-by: Lionel Landwerlin --- src/intel/vulkan/anv_wsi.c | 1 - src/intel/vulkan/anv_wsi_x11.c | 2 -- 2 files changed, 3 deletions(-) (limited to 'src/intel/vulkan') diff --git a/src/intel/vulkan/anv_wsi.c b/src/intel/vulkan/anv_wsi.c index 5ed1d711689..1c9a54804e8 100644 --- a/src/intel/vulkan/anv_wsi.c +++ b/src/intel/vulkan/anv_wsi.c @@ -92,7 +92,6 @@ VkResult anv_GetPhysicalDeviceSurfaceSupportKHR( device->local_fd, queueFamilyIndex, surface, - &device->instance->alloc, pSupported); } diff --git a/src/intel/vulkan/anv_wsi_x11.c b/src/intel/vulkan/anv_wsi_x11.c index 2feb5f13376..45c43f6f17f 100644 --- a/src/intel/vulkan/anv_wsi_x11.c +++ b/src/intel/vulkan/anv_wsi_x11.c @@ -40,7 +40,6 @@ VkBool32 anv_GetPhysicalDeviceXcbPresentationSupportKHR( return wsi_get_physical_device_xcb_presentation_support( &device->wsi_device, - &device->instance->alloc, queueFamilyIndex, device->local_fd, false, connection, visual_id); @@ -56,7 +55,6 @@ VkBool32 anv_GetPhysicalDeviceXlibPresentationSupportKHR( return wsi_get_physical_device_xcb_presentation_support( &device->wsi_device, - &device->instance->alloc, queueFamilyIndex, device->local_fd, false, XGetXCBConnection(dpy), visualID); -- cgit v1.2.3