summaryrefslogtreecommitdiffstats
path: root/src/vulkan/wsi/wsi_common.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-10-17 14:35:16 -0500
committerJason Ekstrand <[email protected]>2018-10-18 09:17:39 -0500
commit7629c00557c135aae4f0cdfbfa31002b43d8b31e (patch)
treef7df071f3cfa8ffedde215b675903069147505cc /src/vulkan/wsi/wsi_common.c
parent0ef50ecc69056273cb31ad4962b0dc952f7f7fed (diff)
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 <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/vulkan/wsi/wsi_common.c')
-rw-r--r--src/vulkan/wsi/wsi_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c
index 3416fef3076..1e3c4e0028b 100644
--- a/src/vulkan/wsi/wsi_common.c
+++ b/src/vulkan/wsi/wsi_common.c
@@ -39,6 +39,7 @@ wsi_device_init(struct wsi_device *wsi,
memset(wsi, 0, sizeof(*wsi));
+ wsi->instance_alloc = *alloc;
wsi->pdevice = pdevice;
#define WSI_GET_CB(func) \
@@ -677,13 +678,12 @@ wsi_common_get_surface_support(struct wsi_device *wsi_device,
int local_fd,
uint32_t queueFamilyIndex,
VkSurfaceKHR _surface,
- const VkAllocationCallbacks *alloc,
VkBool32* pSupported)
{
ICD_FROM_HANDLE(VkIcdSurfaceBase, surface, _surface);
struct wsi_interface *iface = wsi_device->wsi[surface->platform];
- return iface->get_support(surface, wsi_device, alloc,
+ return iface->get_support(surface, wsi_device,
queueFamilyIndex, local_fd, pSupported);
}