diff options
author | Jordan Justen <[email protected]> | 2016-01-08 17:16:29 -0800 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2016-03-17 01:23:40 -0700 |
commit | 3c807607df4ab457037f2daa5ea9e5ce18392b7b (patch) | |
tree | 9f31a0e05d53086a2ce0df141907aa3726d937bc /src/compiler/nir/nir_print.c | |
parent | 26f8262698d9f48ab5dbb85ef14cb7d5cefd9d53 (diff) |
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 <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_print.c')
-rw-r--r-- | src/compiler/nir/nir_print.c | 7 |
1 files changed, 6 insertions, 1 deletions
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); } |