aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/glsl_parser.yy
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2015-03-15 13:53:06 -0700
committerJordan Justen <[email protected]>2015-11-09 17:21:12 -0800
commit8b28b3553139c19efed6d54d0a21315867371864 (patch)
treec825b8c3e81f9f7d584d6f3a23fbf2c1b5c9ca8c /src/glsl/glsl_parser.yy
parenta4a46fe3fa566b2918f7323e7f0eede17f118f03 (diff)
glsl: Parse shared keyword for compute shader variables
v2: * Move shared parsing under storage qualifiers (tarceri) * Fail to compile if shared is used in non-compute shader (tarceri) * Use separate shared_storage bit for shared variables (tarceri) Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/glsl/glsl_parser.yy')
-rw-r--r--src/glsl/glsl_parser.yy6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index 4636435f191..4ac8e45b63a 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -165,6 +165,7 @@ static bool match_layout_qualifier(const char *s1, const char *s2,
%token IMAGE1DSHADOW IMAGE2DSHADOW IMAGE1DARRAYSHADOW IMAGE2DARRAYSHADOW
%token COHERENT VOLATILE RESTRICT READONLY WRITEONLY
%token ATOMIC_UINT
+%token SHARED
%token STRUCT VOID_TOK WHILE
%token <identifier> IDENTIFIER TYPE_IDENTIFIER NEW_IDENTIFIER
%type <identifier> any_identifier
@@ -1929,6 +1930,11 @@ storage_qualifier:
memset(& $$, 0, sizeof($$));
$$.flags.q.buffer = 1;
}
+ | SHARED
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.shared_storage = 1;
+ }
;
memory_qualifier: