mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-27 01:40:49 -05: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.
This commit is contained in:
parent
73bbad8433
commit
43b37e34d6
1 changed files with 7 additions and 0 deletions
|
|
@ -1066,6 +1066,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