Mesa (master): nir/dead_variables: Removed shared variables when requested

Jason Ekstrand jekstrand at kemper.freedesktop.org
Sat Jan 7 00:44:49 UTC 2017


Module: Mesa
Branch: master
Commit: 58fe5c57cd424889fd0a655cc4c19569ad7ba960
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=58fe5c57cd424889fd0a655cc4c19569ad7ba960

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Fri Jan  6 15:33:35 2017 -0800

nir/dead_variables: Removed shared variables when requested

Reviewed-by: Timothy Arceri <timothy.arceri at collabora.com>

---

 src/compiler/nir/nir_remove_dead_variables.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/compiler/nir/nir_remove_dead_variables.c b/src/compiler/nir/nir_remove_dead_variables.c
index f7429eb..e0eaa3d 100644
--- a/src/compiler/nir/nir_remove_dead_variables.c
+++ b/src/compiler/nir/nir_remove_dead_variables.c
@@ -135,6 +135,9 @@ 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)
+      progress = remove_dead_vars(&shader->shared, live) || progress;
+
    if (modes & nir_var_local) {
       nir_foreach_function(function, shader) {
          if (function->impl) {




More information about the mesa-commit mailing list