Make sure VkSurfaceKHR is cast to uintptr properly
authorCharles Giessen <charles@lunarg.com>
Tue, 19 Dec 2023 17:57:31 +0000 (10:57 -0700)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Tue, 19 Dec 2023 21:05:09 +0000 (14:05 -0700)
loader/wsi.c

index a8fdc3fd9ec32fe9a056315fc686644618d3a4a3..46c81b9ee0686abbf95bd775d2a3036622f9eff2 100644 (file)
@@ -631,7 +631,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateWin32SurfaceKHR(VkInstance insta
         }
     }
 
-    *pSurface = (VkSurfaceKHR)(pIcdSurface);
+    *pSurface = (VkSurfaceKHR)(uintptr_t)pIcdSurface;
 
 out:
 
@@ -1595,7 +1595,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateMetalSurfaceEXT(VkInstance insta
             }
         }
     }
-    *pSurface = (VkSurfaceKHR)icd_surface;
+    *pSurface = (VkSurfaceKHR)(uintptr_t)icd_surface;
 
 out:
     if (result != VK_SUCCESS && icd_surface != NULL) {
@@ -2571,7 +2571,7 @@ VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateImagePipeSurfaceFUCHSIA(VkInstan
         }
     }
 
-    *pSurface = (VkSurfaceKHR)(pIcdSurface);
+    *pSurface = (VkSurfaceKHR)(uintptr_t)pIcdSurface;
 
 out: