mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02: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>
This commit is contained in:
parent
6c68c2c3ba
commit
44bff7eb05
2 changed files with 3 additions and 7 deletions
|
|
@ -394,6 +394,3 @@ spec@arb_sample_locations@test@MSAA: 8- X: 3- Y: 5- Grid: false,Fail
|
|||
spec@arb_sample_locations@test@MSAA: 8- X: 3- Y: 5- Grid: true,Fail
|
||||
spec@arb_sample_locations@test@MSAA: 8- X: 3- Y: 6- Grid: false,Fail
|
||||
spec@arb_sample_locations@test@MSAA: 8- X: 3- Y: 6- Grid: true,Fail
|
||||
|
||||
# undebuggable corner case from !34054
|
||||
spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers,Crash
|
||||
|
|
|
|||
|
|
@ -1844,11 +1844,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