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/intel/compiler | |
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/intel/compiler')
-rw-r--r-- | src/intel/compiler/brw_nir.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index 9ba3fca4e0c..77c6c4e0e5a 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -527,7 +527,7 @@ brw_nir_no_indirect_mask(const struct brw_compiler *compiler, if (compiler->glsl_compiler_options[stage].EmitNoIndirectOutput) indirect_mask |= nir_var_shader_out; if (compiler->glsl_compiler_options[stage].EmitNoIndirectTemp) - indirect_mask |= nir_var_local; + indirect_mask |= nir_var_function; return indirect_mask; } @@ -542,8 +542,8 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler, bool progress; do { progress = false; - OPT(nir_split_array_vars, nir_var_local); - OPT(nir_shrink_vec_array_vars, nir_var_local); + OPT(nir_split_array_vars, nir_var_function); + OPT(nir_shrink_vec_array_vars, nir_var_function); OPT(nir_lower_vars_to_ssa); if (allow_copies) { /* Only run this pass in the first call to brw_nir_optimize. Later @@ -627,7 +627,7 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler, /* Workaround Gfxbench unused local sampler variable which will trigger an * assert in the opt_large_constants pass. */ - OPT(nir_remove_dead_variables, nir_var_local); + OPT(nir_remove_dead_variables, nir_var_function); return nir; } @@ -692,7 +692,7 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *nir) OPT(nir_lower_global_vars_to_local); OPT(nir_split_var_copies); - OPT(nir_split_struct_vars, nir_var_local); + OPT(nir_split_struct_vars, nir_var_function); /* Run opt_algebraic before int64 lowering so we can hopefully get rid * of some int64 instructions. |