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/compiler/spirv | |
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/compiler/spirv')
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 425fbcbbe72..7bb9489aaeb 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -5324,7 +5324,7 @@ spirv_to_nir(const uint32_t *words, size_t word_count, */ nir_lower_variable_initializers(b->shader, nir_var_shader_out); nir_remove_dead_variables(b->shader, - nir_var_shader_in | nir_var_shader_out); + nir_var_shader_in | nir_var_shader_out, NULL); /* We sometimes generate bogus derefs that, while never used, give the * validator a bit of heartburn. Run dead code to get rid of them. |