zink: fix conditional for modifier usage

the shared check here was inaccurate; if the resource has dmabuf
export, then use modifiers

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
This commit is contained in:
Mike Blumenkrantz 2022-04-29 11:00:12 -04:00 committed by Marge Bot
parent 5513597305
commit c03f6967cc
1 changed files with 1 additions and 1 deletions

View File

@ -551,7 +551,7 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
obj->is_buffer = true;
obj->transfer_dst = true;
} else {
bool winsys_modifier = shared && whandle && whandle->modifier != DRM_FORMAT_MOD_INVALID;
bool winsys_modifier = (export_types & VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT) && whandle && whandle->modifier != DRM_FORMAT_MOD_INVALID;
const uint64_t *ici_modifiers = winsys_modifier ? &whandle->modifier : modifiers;
unsigned ici_modifier_count = winsys_modifier ? 1 : modifiers_count;
bool success = false;