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 <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4797>
This commit is contained in:

committed by
Marge Bot

parent
bc79442f3f
commit
04dbf709ed
@@ -635,8 +635,8 @@ int r600_shader_from_nir(struct r600_context *rctx,
|
||||
if (optimize)
|
||||
while(optimize_once(sel->nir));
|
||||
|
||||
NIR_PASS_V(sel->nir, nir_remove_dead_variables, nir_var_shader_in);
|
||||
NIR_PASS_V(sel->nir, nir_remove_dead_variables, nir_var_shader_out);
|
||||
NIR_PASS_V(sel->nir, nir_remove_dead_variables, nir_var_shader_in, NULL);
|
||||
NIR_PASS_V(sel->nir, nir_remove_dead_variables, nir_var_shader_out, NULL);
|
||||
|
||||
|
||||
NIR_PASS_V(sel->nir, nir_lower_vars_to_scratch,
|
||||
|
Reference in New Issue
Block a user