Mesa (master): tu: Actually remove dead variables after io lowering
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 17 15:01:17 UTC 2020
Module: Mesa
Branch: master
Commit: a3464c567cc112bdaca3354dd4bfb883299eab84
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a3464c567cc112bdaca3354dd4bfb883299eab84
Author: Connor Abbott <cwabbott0 at gmail.com>
Date: Wed Jun 17 15:39:18 2020 +0200
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>
---
src/freedreno/vulkan/tu_shader.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/freedreno/vulkan/tu_shader.c b/src/freedreno/vulkan/tu_shader.c
index b5d492aed0f..54ea0b86d21 100644
--- a/src/freedreno/vulkan/tu_shader.c
+++ b/src/freedreno/vulkan/tu_shader.c
@@ -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;
}
More information about the mesa-commit
mailing list