Mesa (main): zink: limit non-extension version feature to spirv 1.5
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 11 10:03:29 UTC 2021
Module: Mesa
Branch: main
Commit: 6e2d8ab808057d5102913705aa655abd9ab672de
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6e2d8ab808057d5102913705aa655abd9ab672de
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Wed Jun 9 10:29:34 2021 +0200
zink: limit non-extension version feature to spirv 1.5
In order to use the Vulkan 1.2 core viewport and layer shader outputs,
we need to use SPIR-V 1.5. But we've recently added some preliminary
support to compute the SPIR-V version we're using, with the intention of
adding a SPIR-V version override to work around bugs in tools like
RenderDoc. We haven't implemented the latter yet.
But just to be safe, let's limit this to SPIR-V 1.5. This isn't going to
matter right now, but it might avoid a problem if we decide to finish up
the SPIR-V version overriding.
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/11259>
---
src/gallium/drivers/zink/zink_screen.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c
index 44f4409dc4f..d6fc5bd9b58 100644
--- a/src/gallium/drivers/zink/zink_screen.c
+++ b/src/gallium/drivers/zink/zink_screen.c
@@ -477,7 +477,8 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
case PIPE_CAP_TGSI_VS_LAYER_VIEWPORT:
case PIPE_CAP_TGSI_TES_LAYER_VIEWPORT:
return screen->info.have_EXT_shader_viewport_index_layer ||
- (screen->info.feats12.shaderOutputLayer &&
+ (screen->spirv_version >= SPIRV_VERSION(1, 5) &&
+ screen->info.feats12.shaderOutputLayer &&
screen->info.feats12.shaderOutputViewportIndex);
case PIPE_CAP_TEXTURE_FLOAT_LINEAR:
More information about the mesa-commit
mailing list