summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-04-03 16:06:40 +0200
committerSamuel Pitoiset <[email protected]>2017-05-06 16:40:19 +0200
commit89e37f9703d4c4d7d383cf1ec112d65d87f1ba11 (patch)
treeda71b478d73267d9f83d8ac4f28633e72fe86542
parent242964ca5c3e6763beca1dbe06feeee129771723 (diff)
glsl: allow input memory qualifiers for images
ARB_bindless_texture spec allows images to be declared as shader inputs. v2: - put the */ on the following line (Timothy Arceri) Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r--src/compiler/glsl/ast_type.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/glsl/ast_type.cpp b/src/compiler/glsl/ast_type.cpp
index 9e3e10f33c0..63c026ad06d 100644
--- a/src/compiler/glsl/ast_type.cpp
+++ b/src/compiler/glsl/ast_type.cpp
@@ -274,6 +274,16 @@ ast_type_qualifier::merge_qualifier(YYLTYPE *loc,
input_layout_mask.flags.q.sample = 1;
input_layout_mask.flags.q.smooth = 1;
+ if (state->has_bindless()) {
+ /* Allow to use image qualifiers with shader inputs/outputs. */
+ input_layout_mask.flags.q.coherent = 1;
+ input_layout_mask.flags.q._volatile = 1;
+ input_layout_mask.flags.q.restrict_flag = 1;
+ input_layout_mask.flags.q.read_only = 1;
+ input_layout_mask.flags.q.write_only = 1;
+ input_layout_mask.flags.q.explicit_image_format = 1;
+ }
+
/* Uniform block layout qualifiers get to overwrite each
* other (rightmost having priority), while all other
* qualifiers currently don't allow duplicates.