On Tue Nov 28 21:12:48 2023 +0000, Paul Gofman wrote:
I think this really belongs to vkQueuePresent rather than vkAquireNextImage. I know why the functionality related to blitting offscreen surfaces was done in Aquire in Proton initially: it was an attempt to workaround tearing and make sure that the image already presented to the (offscreen) surface when performing blit. But the workaround doesn't really work anymore (at least on AMD) after some Mesa WSI changes. There is VK_KHR_present_wait extenstion now which I believe we might be using for such purposes. It is not universally there yet (e. g, not on Xwayland where it is probably need that as most), but hopefully it will come to fully working state. We also know that bundling presentation in Acquire leads to bugs in apps which don't present continuously and expect the image to appear on screen after calling vkQueuePresent.
Yeah, I didn't want to change that too much from Proton, but I agree that it probably belongs in Present instead. I'll put it there.