Mesa (staging/21.0): zink: respect feature-cap for multi-draw indirect

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 22 17:04:58 UTC 2021


Module: Mesa
Branch: staging/21.0
Commit: 4146d84a1f6b1b68941db68e551930c3f54a1572
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4146d84a1f6b1b68941db68e551930c3f54a1572

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Fri Jan 22 09:15:10 2021 +0100

zink: respect feature-cap for multi-draw indirect

Even in the presence of VK_KHR_draw_indirect_count, we still technically
need to respect the feature-cap when using a Vk 1.0 core-function.

Fixes: cef876910a0 ("zink: enable PIPE_CAP_MULTI_DRAW_INDIRECT(_PARAMS) caps")
Reviewed-by: Hoe Hao Cheng <haochengho12907 at gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>
(cherry picked from commit c9340744a3c6310f0f36c6c5576ea1bc87b65f03)

---

 .pick_status.json                      | 2 +-
 src/gallium/drivers/zink/zink_screen.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 2d2b046f310..999a913f421 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -49,7 +49,7 @@
         "description": "zink: respect feature-cap for multi-draw indirect",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "cef876910a04070e5c89667d88df7bc3e588af19"
     },
diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index 949be52a173..8093bbe5b2f 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -107,6 +107,8 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
       return 1;
 
    case PIPE_CAP_MULTI_DRAW_INDIRECT:
+      return screen->info.feats.features.multiDrawIndirect;
+
    case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
       return screen->vk_CmdDrawIndirectCount &&
              screen->vk_CmdDrawIndexedIndirectCount;



More information about the mesa-commit mailing list