radv: Only call remove_dead_variables once.

Port of 43e0b0d4b2
"anv/pipeline: Only call remove_dead_variables once"

Signed-off-by: Bas Nieuwenhuizen <basni@google.com>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
This commit is contained in:
Bas Nieuwenhuizen
2017-01-08 22:39:36 +01:00
parent 970556292b
commit 18e70edd8c

View File

@@ -219,9 +219,9 @@ radv_shader_compile_to_nir(struct radv_device *device,
assert(exec_list_length(&nir->functions) == 1);
entry_point->name = ralloc_strdup(entry_point, "main");
nir_remove_dead_variables(nir, nir_var_shader_in);
nir_remove_dead_variables(nir, nir_var_shader_out);
nir_remove_dead_variables(nir, nir_var_system_value);
nir_remove_dead_variables(nir, nir_var_shader_in |
nir_var_shader_out |
nir_var_system_value);
nir_validate_shader(nir);
nir_lower_system_values(nir);