Mesa (main): spirv: Silence "Decoration not allowed on struct members: SpvDecorationRestrict"
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 5 22:15:40 UTC 2022
Module: Mesa
Branch: main
Commit: 03549f3bf317375a7a48ed333f1d65be9c6dd467
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=03549f3bf317375a7a48ed333f1d65be9c6dd467
Author: Emma Anholt <emma at anholt.net>
Date: Thu Mar 10 12:39:24 2022 -0800
spirv: Silence "Decoration not allowed on struct members: SpvDecorationRestrict"
VK-GL-CTS causes tons of these due to a bug in glslang, to the point where
it's hard to find actual issues in test logs. Disable the warning for
now, with a link to the issue we're waiting on being resolved.
Acked-by: Daniel Stone <daniels at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15332>
---
src/compiler/spirv/spirv_to_nir.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 974b23cbc19..f948f9889cc 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -1116,7 +1116,6 @@ struct_member_decoration_cb(struct vtn_builder *b,
case SpvDecorationGLSLShared:
case SpvDecorationGLSLPacked:
case SpvDecorationInvariant:
- case SpvDecorationRestrict:
case SpvDecorationAliased:
case SpvDecorationConstant:
case SpvDecorationIndex:
@@ -1130,6 +1129,14 @@ struct_member_decoration_cb(struct vtn_builder *b,
spirv_decoration_to_string(dec->decoration));
break;
+ case SpvDecorationRestrict:
+ /* While "Restrict" is invalid for struct members, glslang incorrectly
+ * generates it and it ends up hiding actual driver issues in a wall of
+ * spam from deqp-vk. Return it to the above block once the issue is
+ * resolved. https://github.com/KhronosGroup/glslang/issues/703
+ */
+ break;
+
case SpvDecorationXfbBuffer:
case SpvDecorationXfbStride:
/* This is handled later by var_decoration_cb in vtn_variables.c */
More information about the mesa-commit
mailing list