glsl: Allow memory qualifiers on shader storage buffer blocks

v2:
  - Memory qualifiers on shader storage buffer objects do not come in the form
    of layout qualifiers, they are block-level qualifiers.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
This commit is contained in:
Samuel Iglesias Gonsalvez 2015-05-08 09:41:58 +02:00
parent f1b647fdd1
commit 6ef82f039c

View file

@ -2628,6 +2628,20 @@ interface_block:
}
$$ = block;
}
| memory_qualifier interface_block
{
ast_interface_block *block = (ast_interface_block *)$2;
if (!block->layout.flags.q.buffer) {
_mesa_glsl_error(& @1, state,
"memory qualifiers can only be used in the "
"declaration of shader storage blocks");
}
if (!block->layout.merge_qualifier(& @1, state, $1)) {
YYERROR;
}
$$ = block;
}
;
basic_interface_block: