summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEduardo Lima Mitev <[email protected]>2016-05-05 13:52:38 +0200
committerEduardo Lima Mitev <[email protected]>2016-05-10 06:22:05 +0200
commit60a5d024164e26b003c491e54392b43f1a3b40cd (patch)
treeec003e74691532abc06cde7bcbbc0a24dfa3f496
parent7f7f58f17f3ed547da0a00a32d9391d7ff437b83 (diff)
nir/print: Print memory qualifiers in a variable declaration
Reviewed-by: Ian Romanick <[email protected]>
-rw-r--r--src/compiler/nir/nir_print.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index 9a77faf8fb5..a36561e39c5 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -354,6 +354,13 @@ print_var_decl(nir_variable *var, print_state *state)
cent, samp, patch, inv, get_variable_mode_str(var->data.mode),
glsl_interp_qualifier_name(var->data.interpolation));
+ const char *const coher = (var->data.image.coherent) ? "coherent " : "";
+ const char *const volat = (var->data.image._volatile) ? "volatile " : "";
+ const char *const restr = (var->data.image.restrict_flag) ? "restrict " : "";
+ const char *const ronly = (var->data.image.read_only) ? "readonly " : "";
+ const char *const wonly = (var->data.image.write_only) ? "writeonly " : "";
+ fprintf(fp, "%s%s%s%s%s", coher, volat, restr, ronly, wonly);
+
glsl_print_type(var->type, fp);
fprintf(fp, " %s", get_var_name(var, state));