diff options
author | Samuel Pitoiset <[email protected]> | 2016-03-07 18:52:19 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2016-03-07 22:13:08 +0100 |
commit | 7f8565f0b2bf54a8106ae9080386bb186609713d (patch) | |
tree | 03b0bacd567cea022375d4ea7fce40c07d1ec769 | |
parent | c82086f7e9e251a7ad60f6aa1f64f011b14720b6 (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 <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Cc: "11.2" <[email protected]>
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_text.c | 4 |
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 91baa01ad8b..77598d2cb79 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; } |