glsl: remove unused buffer objects with packed layout

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>
This commit is contained in:
Timothy Arceri
2023-05-04 11:24:07 +10:00
committed by Marge Bot
parent fa56e911b8
commit cbff8f8c5c

View File

@@ -1298,7 +1298,8 @@ gl_nir_link_glsl(const struct gl_constants *consts,
.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);
}
}