mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-23 10:30:23 +01:00
zink: Check queue families when binding image resources
We check for iamge layouts and feedback loops when we bind image
resources but not queue families. If the resource isn't on the graphics
queue, we need to add it to need_barriers so we can transition it back
to our queue.
Fixes: d4f8ad27f2 ("zink: handle implicit sync for dmabufs")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33952>
This commit is contained in:
parent
396ece1ad8
commit
18d206d67c
1 changed files with 3 additions and 0 deletions
|
|
@ -1853,6 +1853,9 @@ check_for_layout_update(struct zink_context *ctx, struct zink_resource *res, boo
|
|||
if (!is_compute && res->fb_binds && !(ctx->feedback_loops & res->fb_binds)) {
|
||||
/* always double check feedback loops */
|
||||
ret = !!_mesa_set_add(ctx->need_barriers[0], res);
|
||||
} else if (res->queue != zink_screen(ctx->base.screen)->gfx_queue && res->queue != VK_QUEUE_FAMILY_IGNORED) {
|
||||
/* Check if we need a queue family transfer */
|
||||
ret = !!_mesa_set_add(ctx->need_barriers[0], res);
|
||||
} else {
|
||||
if (res->bind_count[is_compute] && layout && res->layout != layout)
|
||||
ret = !!_mesa_set_add(ctx->need_barriers[is_compute], res);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue