[Mesa-dev] [PATCH 2/3] nir/print: Print memory qualifiers in a variable declaration
Eduardo Lima Mitev
elima at igalia.com
Thu May 5 11:52:38 UTC 2016
---
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 9a77faf..a36561e 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));
--
2.7.0
More information about the mesa-dev
mailing list