tu: Actually remove dead variables after io lowering

I forgot that their derefs would still be lying around, so we need to
eliminate them first.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5519>
This commit is contained in:
Connor Abbott 2020-06-17 15:39:18 +02:00 committed by Marge Bot
parent 168c42290f
commit a3464c567c
1 changed files with 8 additions and 3 deletions

View File

@ -484,9 +484,14 @@ tu_lower_io(nir_shader *shader, struct tu_shader *tu_shader,
/* Remove now-unused variables so that when we gather the shader info later
* they won't be counted.
*/
nir_remove_dead_variables(shader,
nir_var_uniform | nir_var_mem_ubo | nir_var_mem_ssbo,
NULL);
if (progress)
nir_opt_dce(shader);
progress |=
nir_remove_dead_variables(shader,
nir_var_uniform | nir_var_mem_ubo | nir_var_mem_ssbo,
NULL);
return progress;
}