anv/pipeline: Only call remove_dead_variables once
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 7 Jan 2017 01:25:35 +0000 (17:25 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 7 Jan 2017 23:45:09 +0000 (15:45 -0800)
It can handle multiple modes at a time now so there's no reason to call
it repeatedly.

Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
src/intel/vulkan/anv_pipeline.c

index db35d7004f867f051088bd2d352a16b75d7b0a1f..fadc76a79af7f1bf06c9c425f1003cfd6c20c3aa 100644 (file)
@@ -157,9 +157,9 @@ anv_shader_compile_to_nir(struct anv_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);
 
    /* Now that we've deleted all but the main function, we can go ahead and