mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
render/vulkan: wait for DMA-BUF fences
The Vulkan spec doesn't guarantee that the driver will wait for implicitly synchronized client buffers before texturing from them. radv happens to perform the wait, but anv doesn't. Fix this by extracting implicit fences from DMA-BUFs, importing them into Vulkan as a VkSemaphore objects, and make the render pass wait on these VkSemaphores.
This commit is contained in:
parent
30219cf76b
commit
8456ac6fa9
4 changed files with 119 additions and 3 deletions
|
|
@ -217,6 +217,12 @@ void vulkan_texture_destroy(struct wlr_vk_texture *texture) {
|
|||
vulkan_free_ds(texture->renderer, texture->ds_pool, texture->ds);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < WLR_DMABUF_MAX_PLANES; i++) {
|
||||
if (texture->foreign_semaphores[i] != VK_NULL_HANDLE) {
|
||||
vkDestroySemaphore(dev, texture->foreign_semaphores[i], NULL);
|
||||
}
|
||||
}
|
||||
|
||||
vkDestroyImageView(dev, texture->image_view, NULL);
|
||||
vkDestroyImage(dev, texture->image, NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue