From 3c807607df4ab457037f2daa5ea9e5ce18392b7b Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Fri, 8 Jan 2016 17:16:29 -0800 Subject: nir: Add compute shader shared variable storage class Previously we were receiving shared variable accesses via a lowered intrinsic function from glsl. This change allows us to send in variables instead. For example, when converting from SPIR-V. Signed-off-by: Jordan Justen Reviewed-by: Jason Ekstrand --- src/compiler/nir/nir_print.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/compiler/nir/nir_print.c') diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index 231a4f53c65..644a21463b1 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -312,7 +312,8 @@ print_var_decl(nir_variable *var, print_state *state) const char *const patch = (var->data.patch) ? "patch " : ""; const char *const inv = (var->data.invariant) ? "invariant " : ""; const char *const mode[] = { "shader_in ", "shader_out ", "", "", - "uniform ", "shader_storage ", "system " }; + "uniform ", "shader_storage ", "shared ", + "system "}; fprintf(fp, "%s%s%s%s%s%s ", cent, samp, patch, inv, mode[var->data.mode], @@ -1069,6 +1070,10 @@ nir_print_shader(nir_shader *shader, FILE *fp) print_var_decl(var, &state); } + nir_foreach_variable(var, &shader->shared) { + print_var_decl(var, &state); + } + nir_foreach_variable(var, &shader->globals) { print_var_decl(var, &state); } -- cgit v1.2.3