summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/nir/nir.c')
-rw-r--r--src/compiler/nir/nir.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c
index df40a554714..acb2692e2a0 100644
--- a/src/compiler/nir/nir.c
+++ b/src/compiler/nir/nir.c
@@ -115,6 +115,10 @@ nir_shader_add_variable(nir_shader *shader, nir_variable *var)
assert(!"nir_shader_add_variable cannot be used for local variables");
break;
+ case nir_var_param:
+ assert(!"nir_shader_add_variable cannot be used for function parameters");
+ break;
+
case nir_var_global:
exec_list_push_tail(&shader->globals, &var->node);
break;