diff options
author | Karol Herbst <[email protected]> | 2018-10-23 23:26:22 +0200 |
---|---|---|
committer | Karol Herbst <[email protected]> | 2019-01-08 18:51:46 +0100 |
commit | d0c6ef2793370a943a21c1d5e47e397c96b183f6 (patch) | |
tree | f30c52c50239a16d7a4f5b4fbd28991e581d06ea /src/compiler/nir/nir_print.c | |
parent | 401dca1c73cad4e6ac3137fdd5513e350d060f25 (diff) |
nir: rename global/local to private/function memory
the naming is a bit confusing no matter how you look at it. Within SPIR-V
"global" memory is memory accessible from all threads. glsl "global" memory
normally refers to shader thread private memory declared at global scope. As
we already use "shared" for memory shared across all thrads of a work group
the solution where everybody could be happy with is to rename "global" to
"private" and use "global" later for memory usually stored within system
accessible memory (be it VRAM or system RAM if keeping SVM in mind).
glsl "local" memory is memory only accessible within a function, while SPIR-V
"local" memory is memory accessible within the same workgroup.
v2: rename local to function as well
v3: rename vtn_variable_mode_local as well
Signed-off-by: Karol Herbst <[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 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index 696839a69b1..cfbc8be7a2c 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -421,10 +421,10 @@ get_variable_mode_str(nir_variable_mode mode, bool want_local_global_mode) return "ssbo"; case nir_var_shared: return "shared"; - case nir_var_global: - return want_local_global_mode ? "global" : ""; - case nir_var_local: - return want_local_global_mode ? "local" : ""; + case nir_var_private: + return want_local_global_mode ? "private" : ""; + case nir_var_function: + return want_local_global_mode ? "function" : ""; default: return ""; } |