summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_text.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_text.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_text.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index 97b1869a66f..91baa01ad8b 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -1290,8 +1290,6 @@ static boolean parse_declaration( struct translate_ctx *ctx )
return FALSE;
}
- /* XXX format */
-
cur2 = cur;
eat_opt_white(&cur2);
while (*cur2 == ',') {
@@ -1304,7 +1302,16 @@ static boolean parse_declaration( struct translate_ctx *ctx )
decl.Image.Writable = 1;
} else {
- break;
+ for (i = 0; i < PIPE_FORMAT_COUNT; i++) {
+ const struct util_format_description *desc =
+ util_format_description(i);
+ if (desc && str_match_nocase_whole(&cur2, desc->name)) {
+ decl.Image.Format = i;
+ break;
+ }
+ }
+ if (i == PIPE_FORMAT_COUNT)
+ break;
}
cur = cur2;
eat_opt_white(&cur2);
@@ -1381,6 +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")) {
+ decl.Declaration.Shared = 1;
+ ctx->cur = cur;
}
} else {
if (str_match_nocase_whole(&cur, "LOCAL")) {