mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
zink: only infer modifiers if winsys handle has a stride
if no stride is passed, the image creation will fail, so avoid this case
fixes:
spec@ext_external_objects@vk-image-overwrite
Fixes: d79c716331 ("zink: create images with modifiers any time there is an import handle")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16722>
This commit is contained in:
parent
2a22885a45
commit
3304e5b5fb
1 changed files with 2 additions and 1 deletions
|
|
@ -606,7 +606,8 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
|||
bool winsys_modifier = (export_types & VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT) && whandle && whandle->modifier != DRM_FORMAT_MOD_INVALID;
|
||||
uint64_t mods[10];
|
||||
bool try_modifiers = false;
|
||||
if ((export_types & VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT) && whandle && whandle->modifier == DRM_FORMAT_MOD_INVALID) {
|
||||
if ((export_types & VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT) &&
|
||||
whandle && whandle->modifier == DRM_FORMAT_MOD_INVALID && whandle->stride) {
|
||||
modifiers = mods;
|
||||
modifiers_count = screen->modifier_props[templ->format].drmFormatModifierCount;
|
||||
for (unsigned j = 0; j < modifiers_count; j++)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue