aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_linking_helpers.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-09-26 11:33:09 -0700
committerEric Anholt <[email protected]>2018-10-15 17:16:44 -0700
commitb788ab6d5c8e87743c345ee8c6131db628b87a8e (patch)
tree915bbf198330db810ca5ef7c5d73f901c09f5db4 /src/compiler/nir/nir_linking_helpers.c
parentdda1ae9b3cb9ea39c9435fba01c6c31a99c4d35e (diff)
nir: Be sure to fix deref modes after demoting shader i/o vars to global.
Fixes assertion failures when calling nir_remove_unused_varyings() or nir_remove_unused_io_vars(). Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_linking_helpers.c')
-rw-r--r--src/compiler/nir/nir_linking_helpers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_linking_helpers.c b/src/compiler/nir/nir_linking_helpers.c
index 85712a7cb1c..7446bb826f9 100644
--- a/src/compiler/nir/nir_linking_helpers.c
+++ b/src/compiler/nir/nir_linking_helpers.c
@@ -126,6 +126,9 @@ remove_unused_io_vars(nir_shader *shader, struct exec_list *var_list,
}
}
+ if (progress)
+ nir_fixup_deref_modes(shader);
+
return progress;
}