From 60a5d024164e26b003c491e54392b43f1a3b40cd Mon Sep 17 00:00:00 2001 From: Eduardo Lima Mitev Date: Thu, 5 May 2016 13:52:38 +0200 Subject: nir/print: Print memory qualifiers in a variable declaration Reviewed-by: Ian Romanick --- src/compiler/nir/nir_print.c | 7 +++++++ 1 file changed, 7 insertions(+) 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)); -- cgit v1.2.3