[Mesa-dev] [PATCH v3 15/32] glsl: allow input memory qualifiers for images
Samuel Pitoiset
samuel.pitoiset at gmail.com
Tue May 2 20:53:36 UTC 2017
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 <samuel.pitoiset at gmail.com>
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/compiler/glsl/ast_type.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/compiler/glsl/ast_type.cpp b/src/compiler/glsl/ast_type.cpp
index 9e3e10f33c..63c026ad06 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.
--
2.12.2
More information about the mesa-dev
mailing list