zink: Always fill external_only in zink_query_dmabuf_modifiers

Fix piglit.spec@ext_image_dma_buf_import@ext_image_dma_buf_import-modifiers
randomly skipping some tests as external_only content was never initialized.

Cc: mesa-stable

Reviewed-by: default avatarMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26305>
This commit is contained in:
Mary Guillemard 2023-11-21 09:29:41 +01:00 committed by Marge Bot
parent db0f177edd
commit b6d828576e

View file

@ -2457,8 +2457,12 @@ zink_query_dmabuf_modifiers(struct pipe_screen *pscreen, enum pipe_format format
{
struct zink_screen *screen = zink_screen(pscreen);
*count = screen->modifier_props[format].drmFormatModifierCount;
for (int i = 0; i < MIN2(max, *count); i++)
for (int i = 0; i < MIN2(max, *count); i++) {
if (external_only)
external_only[i] = 0;
modifiers[i] = screen->modifier_props[format].pDrmFormatModifierProperties[i].drmFormatModifier;
}
}
static bool