Inconsistent/incorrect forwarding of VK_SUBOPTIMAL_KHR via X11
Apparently this failure mode does not always get consistently forwarded to the client when using the XCB backend. I'm not aware of more specifics or how exactly to reproduce it, I was sent this patch via IRC (by a user who was unable to use GitLab) and asked to forward it upstream. As such, I am unfortunately not able to follow the usual issue template.
I'll try and figure out the exact issue and submit a clean MR soon, but I'm posting this here so I don't forget about it or in case anybody else wants to take a look at it.
diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c
index 3c2ad386807..3783a50bd66 100644
--- a/src/vulkan/wsi/wsi_common_x11.c
+++ b/src/vulkan/wsi/wsi_common_x11.c
@@ -1031,6 +1032,7 @@ x11_acquire_next_image_poll_x11(struct x11_swapchain *chain,
free(event);
if (result < 0)
return x11_swapchain_result(chain, result);
+ x11_swapchain_result(chain, result);
}
}
@@ -1280,6 +1282,7 @@ x11_manage_fifo_queues(void *state)
free(event);
if (result < 0)
goto fail;
+ x11_swapchain_result(chain, result);
}
}
}