wsi/wayland: fix pointer casting warning on 32bit
authorEric Engestrom <eric.engestrom@intel.com>
Sun, 28 Oct 2018 13:40:12 +0000 (13:40 +0000)
committerEric Engestrom <eric.engestrom@intel.com>
Mon, 11 Mar 2019 10:49:36 +0000 (10:49 +0000)
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/vulkan/wsi/wsi_common_wayland.c

index fac343040442e8ce682e683b8f47a1d614ff3713..87fcbae26c405cf1d89d45b038fa722701cbc348 100644 (file)
@@ -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;