summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2016-03-07 18:52:19 +0100
committerDylan Baker <baker.dylan.c@gmail.com>2016-03-28 16:11:31 -0700
commit302ad367720ea43f2f1dfeb779d98c96557516b4 (patch)
tree8145e77c4de1e67649c9194e7c6af7d1b61cba4c
parent0ab3ce95e0303cdf7136bf7341e430c58223f561 (diff)
tgsi: fix parsing of shared memory declarations
The SHARED TGSI keyword is only allowed with TGSI_FILE_MEMORY and not with TGSI_FILE_BUFFER. I have found this by using the nouveau_compiler from command line. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "11.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 7f8565f0b2bf54a8106ae9080386bb186609713d)
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_text.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index 91baa01ad8..77598d2cb7 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -1388,7 +1388,9 @@ static boolean parse_declaration( struct translate_ctx *ctx )
if (str_match_nocase_whole(&cur, "ATOMIC")) {
decl.Declaration.Atomic = 1;
ctx->cur = cur;
- } else if (str_match_nocase_whole(&cur, "SHARED")) {
+ }
+ } else if (file == TGSI_FILE_MEMORY) {
+ if (str_match_nocase_whole(&cur, "SHARED")) {
decl.Declaration.Shared = 1;
ctx->cur = cur;
}