diff options
author | Mary Guillemard <mary.guillemard@collabora.com> | 2023-11-21 09:29:41 +0100 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2024-01-09 17:31:43 +0000 |
commit | 3405dbf9734a97b6ae8574a9d7dbf6af478fe47f (patch) | |
tree | 71a4bf7b36be8c4e2becb965256a7596e3882500 | |
parent | ade42dfb0e10cbc940f03b98274a128c9d60e4f8 (diff) | |
download | mesa-3405dbf9734a97b6ae8574a9d7dbf6af478fe47f.tar.gz mesa-3405dbf9734a97b6ae8574a9d7dbf6af478fe47f.tar.bz2 mesa-3405dbf9734a97b6ae8574a9d7dbf6af478fe47f.zip |
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>
(cherry picked from commit b6d828576e1d561ad49c01f19c1cb5ba39e3832a)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/gallium/drivers/zink/zink_screen.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json index c0eaca59bf3..42910255ceb 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1264,7 +1264,7 @@ "description": "zink: Always fill external_only in zink_query_dmabuf_modifiers", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index bfb4fe59d74..cccc901df8f 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -2455,8 +2455,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 |