mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
vulkan/wsi/wayland: Handle VK_INCOMPLETE for GetPresentModes
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: "17.0" <mesa-dev@lists.freedesktop.org>
This commit is contained in:
parent
dc578ef060
commit
659edd9f5c
1 changed files with 5 additions and 3 deletions
|
|
@ -443,11 +443,13 @@ wsi_wl_surface_get_present_modes(VkIcdSurfaceBase *surface,
|
||||||
return VK_SUCCESS;
|
return VK_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(*pPresentModeCount >= ARRAY_SIZE(present_modes));
|
*pPresentModeCount = MIN2(*pPresentModeCount, ARRAY_SIZE(present_modes));
|
||||||
typed_memcpy(pPresentModes, present_modes, *pPresentModeCount);
|
typed_memcpy(pPresentModes, present_modes, *pPresentModeCount);
|
||||||
*pPresentModeCount = ARRAY_SIZE(present_modes);
|
|
||||||
|
|
||||||
return VK_SUCCESS;
|
if (*pPresentModeCount < ARRAY_SIZE(present_modes))
|
||||||
|
return VK_INCOMPLETE;
|
||||||
|
else
|
||||||
|
return VK_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult wsi_create_wl_surface(const VkAllocationCallbacks *pAllocator,
|
VkResult wsi_create_wl_surface(const VkAllocationCallbacks *pAllocator,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue