vulkan/wsi/sw: wait for image fence before submitting to queue
With hw devices, when you submit a present, implicit sync will
make sure the work submitted to the gpu on the client will end
up happening before the present work submitted on the server.
However with sw paths there is no real GPU, the lavapipe fake
GPU thread is client side only and presenting is done directly
from the pixmap (or later shared pixmap). In order for this to
make sense the wsi common code should wait for the fence on the
image before queueing the submit to the server so that all
client works has been flushed to the pixmap before the copy or
present operation is submitted.
Fixes: 8004fa9c95 ("vulkan/wsi: add sw support. (v2)")
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12502>
This commit is contained in:
@@ -653,6 +653,10 @@ wsi_common_queue_present(const struct wsi_device *wsi,
|
||||
if (result != VK_SUCCESS)
|
||||
goto fail_present;
|
||||
|
||||
if (wsi->sw)
|
||||
wsi->WaitForFences(device, 1, &swapchain->fences[image_index],
|
||||
true, ~0ull);
|
||||
|
||||
const VkPresentRegionKHR *region = NULL;
|
||||
if (regions && regions->pRegions)
|
||||
region = ®ions->pRegions[i];
|
||||
|
||||
Reference in New Issue
Block a user