diff options
author | Timothy Arceri <[email protected]> | 2020-05-28 10:59:28 +1000 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-03 02:22:23 +0000 |
commit | 04dbf709edf069bc720d941fab27c53269336bcf (patch) | |
tree | e3c561c6c20d201d7b6cd2da5336afff921807e6 /src/freedreno/vulkan/tu_shader.c | |
parent | bc79442f3fa23ecb40fcc67ea3cf4fd73fb0d3fe (diff) |
nir: add callback to nir_remove_dead_variables()
This allows us to do API specific checks before removing variable
without filling nir_remove_dead_variables() with API specific code.
In the following patches we will use this to support the removal
of dead uniforms in GLSL.
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4797>
Diffstat (limited to 'src/freedreno/vulkan/tu_shader.c')
-rw-r--r-- | src/freedreno/vulkan/tu_shader.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/freedreno/vulkan/tu_shader.c b/src/freedreno/vulkan/tu_shader.c index af0415e0efd..29ac80bc48d 100644 --- a/src/freedreno/vulkan/tu_shader.c +++ b/src/freedreno/vulkan/tu_shader.c @@ -590,7 +590,8 @@ tu_shader_create(struct tu_device *dev, NIR_PASS_V(nir, nir_split_per_member_structs); NIR_PASS_V(nir, nir_remove_dead_variables, - nir_var_shader_in | nir_var_shader_out | nir_var_system_value | nir_var_mem_shared); + nir_var_shader_in | nir_var_shader_out | nir_var_system_value | nir_var_mem_shared, + NULL); /* Gather information for transform feedback. * This should be called after nir_split_per_member_structs. |