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/mesa/drivers | |
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/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_program.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c index be4347881f2..cbb5b312efd 100644 --- a/src/mesa/drivers/dri/i965/brw_program.c +++ b/src/mesa/drivers/dri/i965/brw_program.c @@ -106,7 +106,8 @@ brw_create_nir(struct brw_context *brw, } assert (nir); - nir_remove_dead_variables(nir, nir_var_shader_in | nir_var_shader_out); + nir_remove_dead_variables(nir, nir_var_shader_in | nir_var_shader_out, + NULL); nir_validate_shader(nir, "after glsl_to_nir or spirv_to_nir"); NIR_PASS_V(nir, nir_lower_io_to_temporaries, nir_shader_get_entrypoint(nir), true, false); |