mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-29 07:58:24 -04:00
render/vulkan: fix missing DMA-BUF implicit read fence for textures
When we're reading from a DMA-BUF texture using implicit sync, we
need to (1) wait for any writer to be done and (2) prevent any
writers from mutating the texture while we're still reading. We
were doing (1) but not (2).
Fix this by calling dmabuf_import_sync_file() with DMA_BUF_SYNC_READ
for all DMA-BUF textures we've used in the render pass.
(cherry picked from commit 43b37e34d6)
This commit is contained in:
parent
004806fae2
commit
f7e7d8f183
1 changed files with 7 additions and 0 deletions
|
|
@ -1045,6 +1045,13 @@ bool vulkan_sync_render_pass_release(struct wlr_vk_renderer *renderer,
|
|||
if (!buffer_import_sync_file(pass->render_buffer->wlr_buffer, DMA_BUF_SYNC_WRITE, sync_file_fd)) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
struct wlr_vk_render_pass_texture *pass_texture;
|
||||
wl_array_for_each(pass_texture, &pass->textures) {
|
||||
if (!buffer_import_sync_file(pass_texture->texture->buffer, DMA_BUF_SYNC_READ, sync_file_fd)) {
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ok = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue