vulkan/wsi: Store the instance allocator in wsi_device
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 17 Oct 2018 19:35:16 +0000 (14:35 -0500)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 18 Oct 2018 14:17:39 +0000 (09:17 -0500)
commit7629c00557c135aae4f0cdfbfa31002b43d8b31e
treef7df071f3cfa8ffedde215b675903069147505cc
parent0ef50ecc69056273cb31ad4962b0dc952f7f7fed
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 <eric.engestrom@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/amd/vulkan/radv_wsi.c
src/amd/vulkan/radv_wsi_x11.c
src/intel/vulkan/anv_wsi.c
src/intel/vulkan/anv_wsi_x11.c
src/vulkan/wsi/wsi_common.c
src/vulkan/wsi/wsi_common.h
src/vulkan/wsi/wsi_common_display.c
src/vulkan/wsi/wsi_common_private.h
src/vulkan/wsi/wsi_common_wayland.c
src/vulkan/wsi/wsi_common_x11.c
src/vulkan/wsi/wsi_common_x11.h