unsigned patch:1;
unsigned uniform:1;
unsigned buffer:1;
+ unsigned shared_storage:1;
unsigned smooth:1;
unsigned flat:1;
unsigned noperspective:1;
"members");
}
+ if (qual->flags.q.shared_storage && state->stage != MESA_SHADER_COMPUTE) {
+ _mesa_glsl_error(loc, state,
+ "the shared storage qualifiers can only be used with "
+ "compute shaders");
+ }
+
if (qual->flags.q.row_major || qual->flags.q.column_major) {
validate_matrix_layout_for_type(state, loc, var->type, var);
}
|| this->flags.q.in
|| this->flags.q.out
|| this->flags.q.uniform
- || this->flags.q.buffer;
+ || this->flags.q.buffer
+ || this->flags.q.shared_storage;
}
bool
atomic_uint KEYWORD_WITH_ALT(420, 300, 420, 310, yyextra->ARB_shader_atomic_counters_enable, ATOMIC_UINT);
+shared KEYWORD_WITH_ALT(430, 310, 430, 310, yyextra->ARB_compute_shader_enable, SHARED);
+
struct return STRUCT;
void return VOID_TOK;
%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
memset(& $$, 0, sizeof($$));
$$.flags.q.buffer = 1;
}
+ | SHARED
+ {
+ memset(& $$, 0, sizeof($$));
+ $$.flags.q.shared_storage = 1;
+ }
;
memory_qualifier: