uint32_t i = 0;
for (struct loader_icd_term *icd_term = loader_inst->icd_terms; icd_term != NULL; icd_term = icd_term->next, i++) {
if (icd_term->scanned_icd->interface_version >= ICD_VER_SUPPORTS_ICD_SURFACE_KHR) {
- if (NULL != icd_term->dispatch.DestroySurfaceKHR && (VkSurfaceKHR)NULL != icd_surface->real_icd_surfaces[i]) {
+ if (NULL != icd_term->dispatch.DestroySurfaceKHR &&
+ (VkSurfaceKHR)(uintptr_t)NULL != icd_surface->real_icd_surfaces[i]) {
icd_term->dispatch.DestroySurfaceKHR(icd_term->instance, icd_surface->real_icd_surfaces[i], pAllocator);
- icd_surface->real_icd_surfaces[i] = (VkSurfaceKHR)NULL;
+ icd_surface->real_icd_surfaces[i] = (VkSurfaceKHR)(uintptr_t)NULL;
}
} else {
// The real_icd_surface for any ICD not supporting the
// proper interface version should be NULL. If not, then
// we have a problem.
- assert((VkSurfaceKHR)NULL == icd_surface->real_icd_surfaces[i]);
+ assert((VkSurfaceKHR)(uintptr_t)NULL == icd_surface->real_icd_surfaces[i]);
}
}
loader_instance_heap_free(loader_inst, icd_surface->real_icd_surfaces);
}
VkIcdSurface *icd_surface = (VkIcdSurface *)(uintptr_t)surface;
- if (NULL != icd_surface->real_icd_surfaces && (VkSurfaceKHR)NULL != icd_surface->real_icd_surfaces[phys_dev_term->icd_index]) {
+ if (NULL != icd_surface->real_icd_surfaces &&
+ (VkSurfaceKHR)(uintptr_t)NULL != icd_surface->real_icd_surfaces[phys_dev_term->icd_index]) {
return icd_term->dispatch.GetPhysicalDeviceSurfaceSupportKHR(
phys_dev_term->phys_dev, queueFamilyIndex, icd_surface->real_icd_surfaces[phys_dev_term->icd_index], pSupported);
}
}
VkIcdSurface *icd_surface = (VkIcdSurface *)(uintptr_t)surface;
- if (NULL != icd_surface->real_icd_surfaces && (VkSurfaceKHR)NULL != icd_surface->real_icd_surfaces[phys_dev_term->icd_index]) {
+ if (NULL != icd_surface->real_icd_surfaces &&
+ (VkSurfaceKHR)(uintptr_t)NULL != icd_surface->real_icd_surfaces[phys_dev_term->icd_index]) {
return icd_term->dispatch.GetPhysicalDeviceSurfaceCapabilitiesKHR(
phys_dev_term->phys_dev, icd_surface->real_icd_surfaces[phys_dev_term->icd_index], pSurfaceCapabilities);
}
}
VkIcdSurface *icd_surface = (VkIcdSurface *)(uintptr_t)surface;
- if (NULL != icd_surface->real_icd_surfaces && (VkSurfaceKHR)NULL != icd_surface->real_icd_surfaces[phys_dev_term->icd_index]) {
+ if (NULL != icd_surface->real_icd_surfaces &&
+ (VkSurfaceKHR)(uintptr_t)NULL != icd_surface->real_icd_surfaces[phys_dev_term->icd_index]) {
return icd_term->dispatch.GetPhysicalDeviceSurfaceFormatsKHR(phys_dev_term->phys_dev,
icd_surface->real_icd_surfaces[phys_dev_term->icd_index],
pSurfaceFormatCount, pSurfaceFormats);
}
VkIcdSurface *icd_surface = (VkIcdSurface *)(uintptr_t)surface;
- if (NULL != icd_surface->real_icd_surfaces && (VkSurfaceKHR)NULL != icd_surface->real_icd_surfaces[phys_dev_term->icd_index]) {
+ if (NULL != icd_surface->real_icd_surfaces &&
+ (VkSurfaceKHR)(uintptr_t)NULL != icd_surface->real_icd_surfaces[phys_dev_term->icd_index]) {
return icd_term->dispatch.GetPhysicalDeviceSurfacePresentModesKHR(
phys_dev_term->phys_dev, icd_surface->real_icd_surfaces[phys_dev_term->icd_index], pPresentModeCount, pPresentModes);
}
if (NULL != icd_term && NULL != icd_term->dispatch.CreateSwapchainKHR) {
VkIcdSurface *icd_surface = (VkIcdSurface *)(uintptr_t)pCreateInfo->surface;
if (NULL != icd_surface->real_icd_surfaces) {
- if ((VkSurfaceKHR)NULL != icd_surface->real_icd_surfaces[icd_index]) {
+ if ((VkSurfaceKHR)(uintptr_t)NULL != icd_surface->real_icd_surfaces[icd_index]) {
// We found the ICD, and there is an ICD KHR surface
// associated with it, so copy the CreateInfo struct
// and point it at the ICD's surface.
if (NULL != pIcdSurface->real_icd_surfaces) {
i = 0;
for (struct loader_icd_term *icd_term = loader_inst->icd_terms; icd_term != NULL; icd_term = icd_term->next, i++) {
- if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] && NULL != icd_term->dispatch.DestroySurfaceKHR) {
+ if ((VkSurfaceKHR)(uintptr_t)NULL != pIcdSurface->real_icd_surfaces[i] &&
+ NULL != icd_term->dispatch.DestroySurfaceKHR) {
icd_term->dispatch.DestroySurfaceKHR(icd_term->instance, pIcdSurface->real_icd_surfaces[i], pAllocator);
}
}
}
}
- *pSurface = (VkSurfaceKHR)pIcdSurface;
+ *pSurface = (VkSurfaceKHR)(uintptr_t)pIcdSurface;
out:
if (NULL != pIcdSurface->real_icd_surfaces) {
i = 0;
for (struct loader_icd_term *icd_term = loader_inst->icd_terms; icd_term != NULL; icd_term = icd_term->next, i++) {
- if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] && NULL != icd_term->dispatch.DestroySurfaceKHR) {
+ if ((VkSurfaceKHR)(uintptr_t)NULL != pIcdSurface->real_icd_surfaces[i] &&
+ NULL != icd_term->dispatch.DestroySurfaceKHR) {
icd_term->dispatch.DestroySurfaceKHR(icd_term->instance, pIcdSurface->real_icd_surfaces[i], pAllocator);
}
}
}
}
- *pSurface = (VkSurfaceKHR)pIcdSurface;
+ *pSurface = (VkSurfaceKHR)(uintptr_t)pIcdSurface;
out:
if (NULL != pIcdSurface->real_icd_surfaces) {
i = 0;
for (struct loader_icd_term *icd_term = loader_inst->icd_terms; icd_term != NULL; icd_term = icd_term->next, i++) {
- if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] && NULL != icd_term->dispatch.DestroySurfaceKHR) {
+ if ((VkSurfaceKHR)(uintptr_t)NULL != pIcdSurface->real_icd_surfaces[i] &&
+ NULL != icd_term->dispatch.DestroySurfaceKHR) {
icd_term->dispatch.DestroySurfaceKHR(icd_term->instance, pIcdSurface->real_icd_surfaces[i], pAllocator);
}
}
}
}
- *pSurface = (VkSurfaceKHR)pIcdSurface;
+ *pSurface = (VkSurfaceKHR)(uintptr_t)pIcdSurface;
out:
if (NULL != pIcdSurface->real_icd_surfaces) {
i = 0;
for (struct loader_icd_term *icd_term = loader_inst->icd_terms; icd_term != NULL; icd_term = icd_term->next, i++) {
- if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] && NULL != icd_term->dispatch.DestroySurfaceKHR) {
+ if ((VkSurfaceKHR)(uintptr_t)NULL != pIcdSurface->real_icd_surfaces[i] &&
+ NULL != icd_term->dispatch.DestroySurfaceKHR) {
icd_term->dispatch.DestroySurfaceKHR(icd_term->instance, pIcdSurface->real_icd_surfaces[i], pAllocator);
}
}
}
}
- *pSurface = (VkSurfaceKHR)pIcdSurface;
+ *pSurface = (VkSurfaceKHR)(uintptr_t)pIcdSurface;
out:
if (NULL != pIcdSurface->real_icd_surfaces) {
i = 0;
for (struct loader_icd_term *icd_term = loader_inst->icd_terms; icd_term != NULL; icd_term = icd_term->next, i++) {
- if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] && NULL != icd_term->dispatch.DestroySurfaceKHR) {
+ if ((VkSurfaceKHR)(uintptr_t)NULL != pIcdSurface->real_icd_surfaces[i] &&
+ NULL != icd_term->dispatch.DestroySurfaceKHR) {
icd_term->dispatch.DestroySurfaceKHR(icd_term->instance, pIcdSurface->real_icd_surfaces[i], pAllocator);
}
}
pIcdSurface->base.platform = VK_ICD_WSI_PLATFORM_ANDROID;
pIcdSurface->window = pCreateInfo->window;
- *pSurface = (VkSurfaceKHR)pIcdSurface;
+ *pSurface = (VkSurfaceKHR)(uintptr_t)pIcdSurface;
return VK_SUCCESS;
}
}
}
- *pSurface = (VkSurfaceKHR)pIcdSurface;
+ *pSurface = (VkSurfaceKHR)(uintptr_t)pIcdSurface;
out:
if (NULL != pIcdSurface->real_icd_surfaces) {
i = 0;
for (struct loader_icd_term *icd_term = inst->icd_terms; icd_term != NULL; icd_term = icd_term->next, i++) {
- if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] && NULL != icd_term->dispatch.DestroySurfaceKHR) {
+ if ((VkSurfaceKHR)(uintptr_t)NULL != pIcdSurface->real_icd_surfaces[i] &&
+ NULL != icd_term->dispatch.DestroySurfaceKHR) {
icd_term->dispatch.DestroySurfaceKHR(icd_term->instance, pIcdSurface->real_icd_surfaces[i], pAllocator);
}
}
}
}
- *pSurface = (VkSurfaceKHR)pIcdSurface;
+ *pSurface = (VkSurfaceKHR)(uintptr_t)pIcdSurface;
out:
if (NULL != pIcdSurface->real_icd_surfaces) {
i = 0;
for (struct loader_icd_term *icd_term = loader_inst->icd_terms; icd_term != NULL; icd_term = icd_term->next, i++) {
- if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] && NULL != icd_term->dispatch.DestroySurfaceKHR) {
+ if ((VkSurfaceKHR)(uintptr_t)NULL != pIcdSurface->real_icd_surfaces[i] &&
+ NULL != icd_term->dispatch.DestroySurfaceKHR) {
icd_term->dispatch.DestroySurfaceKHR(icd_term->instance, pIcdSurface->real_icd_surfaces[i], pAllocator);
}
}
pIcdSurface->base.platform = VK_ICD_WSI_PLATFORM_IOS;
pIcdSurface->pView = pCreateInfo->pView;
- *pSurface = (VkSurfaceKHR)pIcdSurface;
+ *pSurface = (VkSurfaceKHR)(uintptr_t)pIcdSurface;
return VK_SUCCESS;
}
}
}
- *pSurface = (VkSurfaceKHR)pIcdSurface;
+ *pSurface = (VkSurfaceKHR)(uintptr_t)pIcdSurface;
out:
if (NULL != pIcdSurface->real_icd_surfaces) {
i = 0;
for (struct loader_icd_term *icd_term = loader_inst->icd_terms; icd_term != NULL; icd_term = icd_term->next, i++) {
- if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] && NULL != icd_term->dispatch.DestroySurfaceKHR) {
+ if ((VkSurfaceKHR)(uintptr_t)NULL != pIcdSurface->real_icd_surfaces[i] &&
+ NULL != icd_term->dispatch.DestroySurfaceKHR) {
icd_term->dispatch.DestroySurfaceKHR(icd_term->instance, pIcdSurface->real_icd_surfaces[i], pAllocator);
}
}
}
}
- *pSurface = (VkSurfaceKHR)pIcdSurface;
+ *pSurface = (VkSurfaceKHR)(uintptr_t)pIcdSurface;
out:
if (NULL != pIcdSurface->real_icd_surfaces) {
i = 0;
for (struct loader_icd_term *icd_term = loader_inst->icd_terms; icd_term != NULL; icd_term = icd_term->next, i++) {
- if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] && NULL != icd_term->dispatch.DestroySurfaceKHR) {
+ if ((VkSurfaceKHR)(uintptr_t)NULL != pIcdSurface->real_icd_surfaces[i] &&
+ NULL != icd_term->dispatch.DestroySurfaceKHR) {
icd_term->dispatch.DestroySurfaceKHR(icd_term->instance, pIcdSurface->real_icd_surfaces[i], pAllocator);
}
}
}
}
- *pSurface = (VkSurfaceKHR)pIcdSurface;
+ *pSurface = (VkSurfaceKHR)(uintptr_t)pIcdSurface;
out:
if (NULL != pIcdSurface->real_icd_surfaces) {
i = 0;
for (struct loader_icd_term *icd_term = loader_inst->icd_terms; icd_term != NULL; icd_term = icd_term->next, i++) {
- if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] && NULL != icd_term->dispatch.DestroySurfaceKHR) {
+ if ((VkSurfaceKHR)(uintptr_t)NULL != pIcdSurface->real_icd_surfaces[i] &&
+ NULL != icd_term->dispatch.DestroySurfaceKHR) {
icd_term->dispatch.DestroySurfaceKHR(icd_term->instance, pIcdSurface->real_icd_surfaces[i], pAllocator);
}
}
}
}
- *pSurface = (VkSurfaceKHR)pIcdSurface;
+ *pSurface = (VkSurfaceKHR)(uintptr_t)pIcdSurface;
out:
if (NULL != pIcdSurface->real_icd_surfaces) {
i = 0;
for (struct loader_icd_term *icd_term = inst->icd_terms; icd_term != NULL; icd_term = icd_term->next, i++) {
- if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] && NULL != icd_term->dispatch.DestroySurfaceKHR) {
+ if ((VkSurfaceKHR)(uintptr_t)NULL != pIcdSurface->real_icd_surfaces[i] &&
+ NULL != icd_term->dispatch.DestroySurfaceKHR) {
icd_term->dispatch.DestroySurfaceKHR(icd_term->instance, pIcdSurface->real_icd_surfaces[i], pAllocator);
}
}
if (NULL != icd_term && NULL != icd_term->dispatch.CreateSharedSwapchainsKHR) {
VkIcdSurface *icd_surface = (VkIcdSurface *)(uintptr_t)pCreateInfos->surface;
if (NULL != icd_surface->real_icd_surfaces) {
- if ((VkSurfaceKHR)NULL != icd_surface->real_icd_surfaces[icd_index]) {
+ if ((VkSurfaceKHR)(uintptr_t)NULL != icd_surface->real_icd_surfaces[icd_index]) {
// We found the ICD, and there is an ICD KHR surface
// associated with it, so copy the CreateInfo struct
// and point it at the ICD's surface.
struct loader_icd_term *icd_term = loader_get_icd_and_device(device, &dev, &icd_index);
if (NULL != icd_term && NULL != icd_term->dispatch.GetDeviceGroupSurfacePresentModesKHR) {
VkIcdSurface *icd_surface = (VkIcdSurface *)(uintptr_t)surface;
- if (NULL != icd_surface->real_icd_surfaces && (VkSurfaceKHR)NULL != icd_surface->real_icd_surfaces[icd_index]) {
+ if (NULL != icd_surface->real_icd_surfaces && (VkSurfaceKHR)(uintptr_t)NULL != icd_surface->real_icd_surfaces[icd_index]) {
return icd_term->dispatch.GetDeviceGroupSurfacePresentModesKHR(device, icd_surface->real_icd_surfaces[icd_index],
pModes);
}
if (NULL != pIcdSurface->real_icd_surfaces) {
i = 0;
for (struct loader_icd_term *icd_term = loader_inst->icd_terms; icd_term != NULL; icd_term = icd_term->next, i++) {
- if ((VkSurfaceKHR)NULL != pIcdSurface->real_icd_surfaces[i] && NULL != icd_term->dispatch.DestroySurfaceKHR) {
+ if ((VkSurfaceKHR)(uintptr_t)NULL != pIcdSurface->real_icd_surfaces[i] &&
+ NULL != icd_term->dispatch.DestroySurfaceKHR) {
icd_term->dispatch.DestroySurfaceKHR(icd_term->instance, pIcdSurface->real_icd_surfaces[i], pAllocator);
}
}