zink: Always fill external_only in zink_query_dmabuf_modifiers
authorMary Guillemard <mary.guillemard@collabora.com>
Tue, 21 Nov 2023 08:29:41 +0000 (09:29 +0100)
committerEric Engestrom <eric@engestrom.ch>
Tue, 9 Jan 2024 17:31:43 +0000 (17:31 +0000)
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)

.pick_status.json
src/gallium/drivers/zink/zink_screen.c

index c0eaca59bf374ff2843a4757185d83d0316a6e91..42910255ceb6dd9f330d74c9f9f636b4d0003480 100644 (file)
         "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
index bfb4fe59d742dcd2d1623adb566b9ab8efe342eb..cccc901df8f83b8477333b4dd8fa7f1967a13bde 100644 (file)
@@ -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