mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
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:
parent
f1b647fdd1
commit
6ef82f039c
1 changed files with 14 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue