Mesa (master): zink: check for extension instead of function

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 22 15:45:44 UTC 2021


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

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

zink: check for extension instead of function

This shouldn't change any behavior, it just seems a bit more to the
point to check for the extension that decides if these are NULL or not
than to check both of them.

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>

---

 src/gallium/drivers/zink/zink_screen.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index 121251e1719..4820949596b 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -120,8 +120,7 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
       return screen->info.feats.features.multiDrawIndirect;
 
    case PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS:
-      return screen->vk_CmdDrawIndirectCount &&
-             screen->vk_CmdDrawIndexedIndirectCount;
+      return screen->instance_info.have_KHR_draw_indirect_count;
 
    case PIPE_CAP_START_INSTANCE:
       return screen->info.feats11.shaderDrawParameters;



More information about the mesa-commit mailing list