diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index 8750fd9f2e8..610270b0539 100644 --- a/src/vulkan/wsi/wsi_common_x11.c +++ b/src/vulkan/wsi/wsi_common_x11.c @@ -1591,6 +1591,8 @@ x11_surface_create_swapchain(VkIcdSurfaceBase *icd_surface, if (geometry == NULL) return VK_ERROR_SURFACE_LOST_KHR; const uint32_t bit_depth = geometry->depth; + const uint16_t cur_width = geometry->width; + const uint16_t cur_height = geometry->height; free(geometry); size_t size = sizeof(*chain) + num_images * sizeof(chain->images[0]); @@ -1622,6 +1624,9 @@ x11_surface_create_swapchain(VkIcdSurfaceBase *icd_surface, chain->status = VK_SUCCESS; chain->has_dri3_modifiers = wsi_conn->has_dri3_modifiers; + if (chain->extent.width != cur_width || chain->extent.height != cur_height) + chain->status = VK_SUBOPTIMAL_KHR; + /* If we are reallocating from an old swapchain, then we inherit its * last completion mode, to ensure we don't get into reallocation * cycles. If we are starting anew, we set 'COPY', as that is the only