These are currently removed by the GLSL IR DCE pass but we will
drop that in a following patch. Also there are scenarios where these
might not be detected as unused until the NIR optimisations have
been run so we really need to do it here too anyway.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22846>
.can_remove_var = can_remove_uniform,
};
nir_remove_dead_variables(shader->Program->nir,
- nir_var_uniform | nir_var_image,
+ nir_var_uniform | nir_var_image |
+ nir_var_mem_ubo | nir_var_mem_ssbo,
&opts);
}
}