Skip to content
Snippets Groups Projects
Commit 87722e0c authored by Lionel Landwerlin's avatar Lionel Landwerlin Committed by Juan A. Suárez
Browse files

vulkan/overlay: keep allocating draw data until it can be reused


The original implementation assumed that we could allocate the same
amount of command buffers as the number of images in the swapchain.
But the application could potentially render much faster and rerender
into images that have been submitted for presentation but not yet
presented.

This change keeps on allocating command buffers, vertex buffer, vertex
indices as well as a semaphore and a fence for as long as we can't
reuse a previously submitted one.

This fixes rendering issues in the overlay at high frame rates.

v2: Don't recreate semaphores constantly (Józef)

v3: Drop useless surface & FreeCommandBuffers (Józef)

Signed-off-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110655


Cc: 19.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: default avatarJózef Kucia <joseph.kucia@gmail.com>
(cherry picked from commit ad2b4aa3)
[Juan: resolve trivial conflicts]
Signed-off-by: default avatarJuan A. Suarez Romero <jasuarez@igalia.com>

Conflicts:
	src/vulkan/overlay-layer/overlay.cpp
parent f0e147bd
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment