nir/dead_variables: Removed shared variables when requested
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 6 Jan 2017 23:33:35 +0000 (15:33 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 7 Jan 2017 00:44:28 +0000 (16:44 -0800)
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
src/compiler/nir/nir_remove_dead_variables.c

index f7429eb83da3095fba741ebc4bff3d5540d50f58..e0eaa3dc23bfc5cf4faf9db4e1d473500b482c10 100644 (file)
@@ -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) {