[Mesa-dev] [PATCH v2 2/3] vulkan/wsi: Report the correct min/maxImageCount
Jason Ekstrand
jason at jlekstrand.net
Mon Oct 2 03:19:57 UTC 2017
Hey, Neil!
On October 1, 2017 3:12:46 PM Neil Roberts <bpeeluk at yahoo.co.uk> wrote:
> Jason Ekstrand <jason at jlekstrand.net> writes:
>
>> + /* For true mailbox mode, we need at least 4 images:
>> + * 1) One to scan out from
>> + * 2) One to have queued for scan-out
>> + * 3) One to be currently held by the Wayland compositor
>> + * 4) One to render to
>> + */
>> caps->minImageCount = 2;
>> - caps->maxImageCount = 4;
>> + /* There is no real maximum */
>> + caps->maxImageCount = 0;
>
> This patch as it was applied seems to leave the minImageCount as 2 on
> X11. Is this possibly a mistake? Now it doesn’t match the comment above
> it and there’s no explanation of this in the commit message.
Probably. Also, with current X, quad-buffering doesn't actually help but
that's a different issue...
> It seems a little surprising that it has been changed to 4 in the
> Wayland backend. Won’t this mean that every application using Vulkan,
> even if it’s just a simple GUI app will end up with four large buffers
> just to make the few applications that want true mailbox mode behave
> correct?
Yeah... That's a bit unfortunate. The problem is that we have no way of
returning a different number of images depending on the mode. In theory,
we could start out at 2 and return SUBOPTIMAL and force the application to
recreate the swapchain with more images until we have enough. That would
be a real pain though... In not sure what the best option is.
--Jason
More information about the mesa-dev
mailing list