Module: Mesa
Branch: main
Commit: b6d828576e1d561ad49c01f19c1cb5ba39e3832a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b6d828576e1d561ad49c01f19c1cb5ba39e3832a

Author: Mary Guillemard <mary.guillem...@collabora.com>
Date:   Tue Nov 21 09:29:41 2023 +0100

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.blumenkra...@gmail.com>
Signed-off-by: Mary Guillemard <mary.guillem...@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26305>

---

 src/gallium/drivers/zink/zink_screen.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_screen.c 
b/src/gallium/drivers/zink/zink_screen.c
index aa92c3d2be8..5a6d17cb4fa 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -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

Reply via email to