Mesa (main): zink: only enable vote if we can support it

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 7 12:12:42 UTC 2021


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

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Thu May 27 14:55:55 2021 +0200

zink: only enable vote if we can support it

We can only support subgroup vote if we have support for SPIR-V 1.3 or
later.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Reviewed-by: Hoe Hao Cheng <haochengho12907 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11044>

---

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

diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index 8e012d38d69..31fc2fb92e1 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -246,7 +246,6 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_CLIP_HALFZ:
    case PIPE_CAP_TGSI_TXQS:
    case PIPE_CAP_TEXTURE_BARRIER:
-   case PIPE_CAP_TGSI_VOTE:
    case PIPE_CAP_DRAW_PARAMETERS:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
    case PIPE_CAP_GL_SPIRV:
@@ -257,6 +256,9 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
    case PIPE_CAP_TGSI_PACK_HALF_FLOAT:
       return 1;
 
+   case PIPE_CAP_TGSI_VOTE:
+      return screen->spirv_version >= 0x00010300;
+
    case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION:
       return screen->info.have_EXT_provoking_vertex;
 



More information about the mesa-commit mailing list