zink: fix dmabuf plane layout struct scoping
this struct needs to exist for all the scopes it's used in cc: mesa-stable Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16822>
This commit is contained in:
parent
974606eb9d
commit
c57fa8b390
|
@ -624,6 +624,13 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
||||||
VkExternalMemoryImageCreateInfo emici;
|
VkExternalMemoryImageCreateInfo emici;
|
||||||
VkImageDrmFormatModifierExplicitCreateInfoEXT idfmeci;
|
VkImageDrmFormatModifierExplicitCreateInfoEXT idfmeci;
|
||||||
VkImageDrmFormatModifierListCreateInfoEXT idfmlci;
|
VkImageDrmFormatModifierListCreateInfoEXT idfmlci;
|
||||||
|
VkSubresourceLayout plane_layout = {
|
||||||
|
.offset = whandle ? whandle->offset : 0,
|
||||||
|
.size = 0,
|
||||||
|
.rowPitch = whandle ? whandle->stride : 0,
|
||||||
|
.arrayPitch = 0,
|
||||||
|
.depthPitch = 0,
|
||||||
|
};
|
||||||
if (!success)
|
if (!success)
|
||||||
goto fail1;
|
goto fail1;
|
||||||
|
|
||||||
|
@ -643,13 +650,6 @@ resource_object_create(struct zink_screen *screen, const struct pipe_resource *t
|
||||||
idfmeci.drmFormatModifier = mod;
|
idfmeci.drmFormatModifier = mod;
|
||||||
|
|
||||||
idfmeci.drmFormatModifierPlaneCount = 1;
|
idfmeci.drmFormatModifierPlaneCount = 1;
|
||||||
VkSubresourceLayout plane_layout = {
|
|
||||||
.offset = whandle->offset,
|
|
||||||
.size = 0,
|
|
||||||
.rowPitch = whandle->stride,
|
|
||||||
.arrayPitch = 0,
|
|
||||||
.depthPitch = 0,
|
|
||||||
};
|
|
||||||
idfmeci.pPlaneLayouts = &plane_layout;
|
idfmeci.pPlaneLayouts = &plane_layout;
|
||||||
|
|
||||||
ici.pNext = &idfmeci;
|
ici.pNext = &idfmeci;
|
||||||
|
|
Loading…
Reference in New Issue