diff options
author | Eduardo Lima Mitev <[email protected]> | 2016-05-05 13:52:38 +0200 |
---|---|---|
committer | Eduardo Lima Mitev <[email protected]> | 2016-05-10 06:22:05 +0200 |
commit | 60a5d024164e26b003c491e54392b43f1a3b40cd (patch) | |
tree | ec003e74691532abc06cde7bcbbc0a24dfa3f496 /src/compiler/nir/nir_print.c | |
parent | 7f7f58f17f3ed547da0a00a32d9391d7ff437b83 (diff) |
nir/print: Print memory qualifiers in a variable declaration
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_print.c')
-rw-r--r-- | src/compiler/nir/nir_print.c | 7 |
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)); |