mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 00:20:11 +01:00
wsi: move an assertion in wsi_xxx_surface_get_capabilities2()
Hit this with vulkaninfo on X11, probably a vulkaninfo bug. Though
moving the assertion doesn't hurt.
Fixes: be0dcbdfa2 ("wsi/x11: Implement EXT_swapchain_maintenance1.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21722>
This commit is contained in:
parent
c3cc8455d4
commit
0ed28d2715
4 changed files with 4 additions and 4 deletions
|
|
@ -987,10 +987,10 @@ wsi_display_surface_get_capabilities2(VkIcdSurfaceBase *icd_surface,
|
|||
|
||||
case VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT: {
|
||||
/* We only support FIFO. */
|
||||
assert(present_mode);
|
||||
VkSurfacePresentModeCompatibilityEXT *compat = (void *)ext;
|
||||
if (compat->pPresentModes) {
|
||||
if (compat->presentModeCount) {
|
||||
assert(present_mode);
|
||||
compat->pPresentModes[0] = present_mode->presentMode;
|
||||
compat->presentModeCount = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1077,9 +1077,9 @@ wsi_wl_surface_get_capabilities2(VkIcdSurfaceBase *surface,
|
|||
|
||||
case VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT: {
|
||||
/* Can easily toggle between FIFO and MAILBOX on Wayland. */
|
||||
assert(present_mode);
|
||||
VkSurfacePresentModeCompatibilityEXT *compat = (void *)ext;
|
||||
if (compat->pPresentModes) {
|
||||
assert(present_mode);
|
||||
VK_OUTARRAY_MAKE_TYPED(VkPresentModeKHR, modes, compat->pPresentModes, &compat->presentModeCount);
|
||||
/* Must always return queried present mode even when truncating. */
|
||||
vk_outarray_append_typed(VkPresentModeKHR, &modes, mode) {
|
||||
|
|
|
|||
|
|
@ -257,11 +257,11 @@ wsi_win32_surface_get_capabilities2(VkIcdSurfaceBase *surface,
|
|||
|
||||
case VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT: {
|
||||
/* Unsupported, just report the input present mode. */
|
||||
assert(present_mode);
|
||||
VkSurfacePresentModeCompatibilityEXT *compat =
|
||||
(VkSurfacePresentModeCompatibilityEXT *)ext;
|
||||
if (compat->pPresentModes) {
|
||||
if (compat->presentModeCount) {
|
||||
assert(present_mode);
|
||||
compat->pPresentModes[0] = present_mode->presentMode;
|
||||
compat->presentModeCount = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -771,10 +771,10 @@ x11_surface_get_capabilities2(VkIcdSurfaceBase *icd_surface,
|
|||
case VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_COMPATIBILITY_EXT: {
|
||||
/* To be able to toggle between FIFO and non-FIFO, we would need a rewrite to always use FIFO thread
|
||||
* mechanism. For now, only return the input, making this effectively unsupported. */
|
||||
assert(present_mode);
|
||||
VkSurfacePresentModeCompatibilityEXT *compat = (void *)ext;
|
||||
if (compat->pPresentModes) {
|
||||
if (compat->presentModeCount) {
|
||||
assert(present_mode);
|
||||
compat->pPresentModes[0] = present_mode->presentMode;
|
||||
compat->presentModeCount = 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue