aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir
diff options
context:
space:
mode:
authorKarol Herbst <[email protected]>2019-01-16 00:12:38 +0100
committerKarol Herbst <[email protected]>2019-01-19 20:01:41 +0100
commit36a76b7192707edce540a7db8809df00e8643514 (patch)
treeb50a34b3befbf7b42d1b38d5d98cf00792b2415b /src/compiler/nir
parent6fefd6972438054e3fb45666b6714a5c9c4859b9 (diff)
nir: rename nir_var_shared to nir_var_mem_shared
Signed-off-by: Karol Herbst <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r--src/compiler/nir/nir.c2
-rw-r--r--src/compiler/nir/nir.h2
-rw-r--r--src/compiler/nir/nir_lower_io.c8
-rw-r--r--src/compiler/nir/nir_opt_copy_prop_vars.c8
-rw-r--r--src/compiler/nir/nir_opt_dead_write_vars.c4
-rw-r--r--src/compiler/nir/nir_print.c2
-rw-r--r--src/compiler/nir/nir_remove_dead_variables.c4
-rw-r--r--src/compiler/nir/nir_validate.c2
8 files changed, 16 insertions, 16 deletions
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c
index 2b9b1f7f981..446e256ecdd 100644
--- a/src/compiler/nir/nir.c
+++ b/src/compiler/nir/nir.c
@@ -147,7 +147,7 @@ nir_shader_add_variable(nir_shader *shader, nir_variable *var)
exec_list_push_tail(&shader->uniforms, &var->node);
break;
- case nir_var_shared:
+ case nir_var_mem_shared:
assert(shader->info.stage == MESA_SHADER_COMPUTE);
exec_list_push_tail(&shader->shared, &var->node);
break;
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 6d4bb4e8095..6fc4a831b52 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -103,7 +103,7 @@ typedef enum {
nir_var_mem_ubo = (1 << 5),
nir_var_system_value = (1 << 6),
nir_var_mem_ssbo = (1 << 7),
- nir_var_shared = (1 << 8),
+ nir_var_mem_shared = (1 << 8),
nir_var_all = ~0,
} nir_variable_mode;
diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c
index d3d2d95f375..06598e054a6 100644
--- a/src/compiler/nir/nir_lower_io.c
+++ b/src/compiler/nir/nir_lower_io.c
@@ -189,7 +189,7 @@ lower_load(nir_intrinsic_instr *intrin, struct lower_io_state *state,
case nir_var_uniform:
op = nir_intrinsic_load_uniform;
break;
- case nir_var_shared:
+ case nir_var_mem_shared:
op = nir_intrinsic_load_shared;
break;
default:
@@ -228,7 +228,7 @@ lower_store(nir_intrinsic_instr *intrin, struct lower_io_state *state,
nir_variable_mode mode = var->data.mode;
nir_intrinsic_op op;
- if (mode == nir_var_shared) {
+ if (mode == nir_var_mem_shared) {
op = nir_intrinsic_store_shared;
} else {
assert(mode == nir_var_shader_out);
@@ -261,7 +261,7 @@ static nir_intrinsic_instr *
lower_atomic(nir_intrinsic_instr *intrin, struct lower_io_state *state,
nir_variable *var, nir_ssa_def *offset)
{
- assert(var->data.mode == nir_var_shared);
+ assert(var->data.mode == nir_var_mem_shared);
nir_intrinsic_op op;
switch (intrin->intrinsic) {
@@ -407,7 +407,7 @@ nir_lower_io_block(nir_block *block,
if (mode != nir_var_shader_in &&
mode != nir_var_shader_out &&
- mode != nir_var_shared &&
+ mode != nir_var_mem_shared &&
mode != nir_var_uniform)
continue;
diff --git a/src/compiler/nir/nir_opt_copy_prop_vars.c b/src/compiler/nir/nir_opt_copy_prop_vars.c
index 39c3d52611a..392fef407cf 100644
--- a/src/compiler/nir/nir_opt_copy_prop_vars.c
+++ b/src/compiler/nir/nir_opt_copy_prop_vars.c
@@ -136,7 +136,7 @@ gather_vars_written(struct copy_prop_var_state *state,
nir_var_shader_temp |
nir_var_function_temp |
nir_var_mem_ssbo |
- nir_var_shared;
+ nir_var_mem_shared;
continue;
}
@@ -149,7 +149,7 @@ gather_vars_written(struct copy_prop_var_state *state,
case nir_intrinsic_memory_barrier:
written->modes |= nir_var_shader_out |
nir_var_mem_ssbo |
- nir_var_shared;
+ nir_var_mem_shared;
break;
case nir_intrinsic_emit_vertex:
@@ -627,7 +627,7 @@ copy_prop_vars_block(struct copy_prop_var_state *state,
nir_var_shader_temp |
nir_var_function_temp |
nir_var_mem_ssbo |
- nir_var_shared);
+ nir_var_mem_shared);
continue;
}
@@ -640,7 +640,7 @@ copy_prop_vars_block(struct copy_prop_var_state *state,
case nir_intrinsic_memory_barrier:
apply_barrier_for_modes(copies, nir_var_shader_out |
nir_var_mem_ssbo |
- nir_var_shared);
+ nir_var_mem_shared);
break;
case nir_intrinsic_emit_vertex:
diff --git a/src/compiler/nir/nir_opt_dead_write_vars.c b/src/compiler/nir/nir_opt_dead_write_vars.c
index 6c0539e492e..d2062a01ac0 100644
--- a/src/compiler/nir/nir_opt_dead_write_vars.c
+++ b/src/compiler/nir/nir_opt_dead_write_vars.c
@@ -122,7 +122,7 @@ remove_dead_write_vars_local(void *mem_ctx, nir_block *block)
nir_var_shader_temp |
nir_var_function_temp |
nir_var_mem_ssbo |
- nir_var_shared);
+ nir_var_mem_shared);
continue;
}
@@ -135,7 +135,7 @@ remove_dead_write_vars_local(void *mem_ctx, nir_block *block)
case nir_intrinsic_memory_barrier: {
clear_unused_for_modes(&unused_writes, nir_var_shader_out |
nir_var_mem_ssbo |
- nir_var_shared);
+ nir_var_mem_shared);
break;
}
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index 18a0f8d019a..ab976af1c43 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -419,7 +419,7 @@ get_variable_mode_str(nir_variable_mode mode, bool want_local_global_mode)
return "system";
case nir_var_mem_ssbo:
return "ssbo";
- case nir_var_shared:
+ case nir_var_mem_shared:
return "shared";
case nir_var_shader_temp:
return want_local_global_mode ? "shader_temp" : "";
diff --git a/src/compiler/nir/nir_remove_dead_variables.c b/src/compiler/nir/nir_remove_dead_variables.c
index 8b28cb28118..cfdd1796299 100644
--- a/src/compiler/nir/nir_remove_dead_variables.c
+++ b/src/compiler/nir/nir_remove_dead_variables.c
@@ -71,7 +71,7 @@ add_var_use_deref(nir_deref_instr *deref, struct set *live)
* all means we need to keep it alive.
*/
assert(deref->mode == deref->var->data.mode);
- if (!(deref->mode & (nir_var_function_temp | nir_var_shader_temp | nir_var_shared)) ||
+ if (!(deref->mode & (nir_var_function_temp | nir_var_shader_temp | nir_var_mem_shared)) ||
deref_used_for_not_store(deref))
_mesa_set_add(live, deref->var);
}
@@ -183,7 +183,7 @@ nir_remove_dead_variables(nir_shader *shader, nir_variable_mode modes)
if (modes & nir_var_system_value)
progress = remove_dead_vars(&shader->system_values, live) || progress;
- if (modes & nir_var_shared)
+ if (modes & nir_var_mem_shared)
progress = remove_dead_vars(&shader->shared, live) || progress;
if (modes & nir_var_function_temp) {
diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c
index ef5156a70dd..da5e5c05c1c 100644
--- a/src/compiler/nir/nir_validate.c
+++ b/src/compiler/nir/nir_validate.c
@@ -448,7 +448,7 @@ validate_deref_instr(nir_deref_instr *instr, validate_state *state)
case nir_deref_type_array_wildcard:
if (instr->mode == nir_var_mem_ubo ||
instr->mode == nir_var_mem_ssbo ||
- instr->mode == nir_var_shared) {
+ instr->mode == nir_var_mem_shared) {
/* Shared variables and UBO/SSBOs have a bit more relaxed rules
* because we need to be able to handle array derefs on vectors.
* Fortunately, nir_lower_io handles these just fine.