mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-29 11:40:31 +01:00
zink: fix queue transition check in check_for_layout_update()
this only applies if the resource has active binds, otherwise it triggers crashes Fixes:18d206d67c("zink: Check queue families when binding image resources") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35234> (cherry picked from commit44bff7eb05)
This commit is contained in:
parent
af3a5a15d2
commit
6eb10b69a4
2 changed files with 4 additions and 5 deletions
|
|
@ -1904,7 +1904,7 @@
|
|||
"description": "zink: fix queue transition check in check_for_layout_update()",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "18d206d67ca485ef2f8b17ea1c0e0c08b63d3562",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1853,11 +1853,10 @@ 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)
|
||||
if (res->bind_count[is_compute] && ((layout && res->layout != layout) ||
|
||||
/* Check if we need a queue family transfer */
|
||||
(res->queue != zink_screen(ctx->base.screen)->gfx_queue && res->queue != VK_QUEUE_FAMILY_IGNORED)))
|
||||
ret = !!_mesa_set_add(ctx->need_barriers[is_compute], res);
|
||||
if (res->bind_count[!is_compute] && other_layout && (layout != other_layout || res->layout != other_layout))
|
||||
ret = !!_mesa_set_add(ctx->need_barriers[!is_compute], res);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue