diff options
author | Samuel Pitoiset <[email protected]> | 2017-04-26 18:50:14 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-04-28 10:43:04 +0200 |
commit | 80738425e4d3240c43cac1b4cfde91650379cf5c (patch) | |
tree | b1dea9e21e39fafba649d3e940b5646b7f55072e /src/compiler/glsl | |
parent | 22fa3d90a92c1628215d0f5fccbe1116d4f5147f (diff) |
glsl: fix error when using format qualifiers with non-image types
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r-- | src/compiler/glsl/ast_to_hir.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index ef6f6cc08d2..425da639c71 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -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; } |