summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.c
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2019-03-19 20:24:35 +0000
committerRhys Perry <[email protected]>2019-11-25 13:59:11 +0000
commitc14f823ee5e109a0051225a24685e3fa015abb49 (patch)
tree41e89f97a76d7301188329c3b3ce06efa3c3d456 /src/compiler/nir/nir.c
parent01eb6ef8700fa850ea63cdf0e6a4be1af2b26e9a (diff)
nir: add nir_num_variable_modes and nir_var_mem_push_const
These will be useful in the upcoming load/store vectorizer. v11: rebase Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Connor Abbott <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.c')
-rw-r--r--src/compiler/nir/nir.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c
index 8a100e18dd8..552b42dd4e1 100644
--- a/src/compiler/nir/nir.c
+++ b/src/compiler/nir/nir.c
@@ -108,6 +108,7 @@ void
nir_shader_add_variable(nir_shader *shader, nir_variable *var)
{
switch (var->data.mode) {
+ case nir_num_variable_modes:
case nir_var_all:
assert(!"invalid mode");
break;
@@ -146,6 +147,10 @@ nir_shader_add_variable(nir_shader *shader, nir_variable *var)
case nir_var_system_value:
exec_list_push_tail(&shader->system_values, &var->node);
break;
+
+ case nir_var_mem_push_const:
+ assert(!"nir_var_push_constant is not supposed to be used for variables");
+ break;
}
}