Commit 11f7b712 authored by Erik Faye-Lund 's avatar Erik Faye-Lund

zink: wait for transfer when reading

TODO: this could really benefit from a separate transfer-queue, I think.
parent ba16d178
......@@ -456,6 +456,15 @@ zink_transfer_map(struct pipe_context *pctx,
false);
if (ret == false)
return NULL;
/* need to wait for rendering to finish */
struct pipe_fence_handle *fence = NULL;
pctx->flush(pctx, &fence, PIPE_FLUSH_HINT_FINISH);
if (fence) {
pctx->screen->fence_finish(pctx->screen, NULL, fence,
PIPE_TIMEOUT_INFINITE);
pctx->screen->fence_reference(pctx->screen, &fence, NULL);
}
}
VkResult result = vkMapMemory(screen->dev, staging_res->mem,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment