zink: assert images aren't created with dmabuf export and optimal tiling

this is illegal

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31467>
This commit is contained in:
Mike Blumenkrantz 2024-10-01 12:59:49 -04:00 committed by Marge Bot
parent 2fdba5b914
commit efeb65cfe8

View file

@ -1313,6 +1313,7 @@ create_image(struct zink_screen *screen, struct zink_resource_object *obj,
emici.sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO;
emici.pNext = ici.pNext;
emici.handleTypes = alloc_info->export_types;
assert(!(emici.handleTypes & VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT) || ici.tiling != VK_IMAGE_TILING_OPTIMAL);
ici.pNext = &emici;
assert(ici.tiling != VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT || mod != DRM_FORMAT_MOD_INVALID);