nir: fix copy-paste error in nir_lower_constant_initializers
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 10 Jan 2019 11:23:04 +0000 (11:23 +0000)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 10 Jan 2019 16:51:52 +0000 (10:51 -0600)
Fixes: 393b59e0772e7bf0426bdf61c740752c4e09dde1
    ('nir: Rework nir_lower_constant_initializers() to handle functions')
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir_lower_constant_initializers.c

index cbee59b1f306eea6db4deca2941420c58b858f3e..959d1eabfcae9420ac9b4e2342efcdd042244ab9 100644 (file)
@@ -104,10 +104,10 @@ nir_lower_constant_initializers(nir_shader *shader, nir_variable_mode modes)
          impl_progress |= lower_const_initializer(&builder, &shader->outputs);
 
       if ((modes & nir_var_private) && function->is_entrypoint)
-         impl_progress |= lower_const_initializer(&builder, &shader->outputs);
+         impl_progress |= lower_const_initializer(&builder, &shader->globals);
 
       if ((modes & nir_var_system_value) && function->is_entrypoint)
-         impl_progress |= lower_const_initializer(&builder, &shader->outputs);
+         impl_progress |= lower_const_initializer(&builder, &shader->system_values);
 
       if (modes & nir_var_function)
          impl_progress |= lower_const_initializer(&builder, &function->impl->locals);