mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 14:50:10 +01:00
glsl: fix error when using format qualifiers with non-image types
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
22fa3d90a9
commit
80738425e4
1 changed files with 6 additions and 2 deletions
|
|
@ -3304,11 +3304,15 @@ apply_image_qualifier_to_variable(const struct ast_type_qualifier *qual,
|
|||
qual->flags.q.write_only ||
|
||||
qual->flags.q.coherent ||
|
||||
qual->flags.q._volatile ||
|
||||
qual->flags.q.restrict_flag ||
|
||||
qual->flags.q.explicit_image_format) {
|
||||
qual->flags.q.restrict_flag) {
|
||||
_mesa_glsl_error(loc, state, "memory qualifiers may only be applied "
|
||||
"to images");
|
||||
}
|
||||
|
||||
if (qual->flags.q.explicit_image_format) {
|
||||
_mesa_glsl_error(loc, state, "format layout qualifiers may only be "
|
||||
"applied to images");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue