From f2e24dd81d338421de63d66b0988fd4f0e72db8e Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Sun, 28 Oct 2018 13:40:12 +0000 Subject: [PATCH] wsi/wayland: fix pointer casting warning on 32bit MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Eric Engestrom Reviewed-by: Tapani Pälli --- src/vulkan/wsi/wsi_common_wayland.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index fac34304044..87fcbae26c4 100644 --- a/src/vulkan/wsi/wsi_common_wayland.c +++ b/src/vulkan/wsi/wsi_common_wayland.c @@ -672,6 +672,7 @@ struct wsi_wl_swapchain { struct wsi_wl_image images[0]; }; +WSI_DEFINE_NONDISP_HANDLE_CASTS(wsi_wl_swapchain, VkSwapchainKHR) static struct wsi_image * wsi_wl_swapchain_get_wsi_image(struct wsi_swapchain *wsi_chain, @@ -967,7 +968,7 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_surface, /* If we have an oldSwapchain parameter, copy the display struct over * from the old one so we don't have to fully re-initialize it. */ - struct wsi_wl_swapchain *old_chain = (void *)pCreateInfo->oldSwapchain; + WSI_FROM_HANDLE(wsi_wl_swapchain, old_chain, pCreateInfo->oldSwapchain); chain->display = wsi_wl_display_ref(old_chain->display); } else { chain->display = NULL; -- 2.30.2