wsi/wayland: fix pointer casting warning on 32bit
[mesa.git] / src / vulkan / wsi / wsi_common_wayland.c
index 1bdae7307ac5923fe0c0a9dc8331b3bcda72c750..87fcbae26c405cf1d89d45b038fa722701cbc348 100644 (file)
@@ -31,7 +31,7 @@
 #include <string.h>
 #include <pthread.h>
 
-#include <drm_fourcc.h>
+#include "drm-uapi/drm_fourcc.h"
 
 #include "vk_util.h"
 #include "wsi_common_private.h"
@@ -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;