mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 20:40:09 +01:00
zink: Make sure that we keep the existing ici pNext chain on inserts.
For external image imports, we'd lose the mutable image format list,
causing turnip to get angry that we try to do UBWC despite not having a
UBWC-compatible format list.
Cc: mesa-stable
Fixes: 28ee911ad6 ("zink: handle mutable swapchain images with dmabuf")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17900>
This commit is contained in:
parent
6a933b7f53
commit
8dda0a01bb
1 changed files with 1 additions and 4 deletions
|
|
@ -690,11 +690,10 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
|||
goto fail1;
|
||||
|
||||
obj->render_target = (ici.usage & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) != 0;
|
||||
const void *pNext = ici.pNext;
|
||||
|
||||
if (shared || external) {
|
||||
emici.sType = VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO;
|
||||
emici.pNext = NULL;
|
||||
emici.pNext = ici.pNext;
|
||||
emici.handleTypes = export_types;
|
||||
ici.pNext = &emici;
|
||||
|
||||
|
|
@ -726,8 +725,6 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
|||
idfmlci.pDrmFormatModifiers = modifiers;
|
||||
ici.pNext = &idfmlci;
|
||||
} else if (ici.tiling == VK_IMAGE_TILING_OPTIMAL) {
|
||||
if (!external)
|
||||
ici.pNext = pNext;
|
||||
shared = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue