nir/opt_shrink_vectors: add option to skip shrinking image stores

Some games declare the wrong format, so we might want to disable this
optimization in that case.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: e4d75c22 ("nir/opt_shrink_vectors: shrink image stores using the format")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9229>
This commit is contained in:
Rhys Perry
2021-02-23 19:31:48 +00:00
committed by Marge Bot
parent 4600dbc6cc
commit cbb5ed476c
7 changed files with 13 additions and 13 deletions

View File

@@ -594,7 +594,7 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler,
if (is_scalar) {
OPT(nir_lower_alu_to_scalar, NULL, NULL);
} else {
OPT(nir_opt_shrink_vectors);
OPT(nir_opt_shrink_vectors, true);
}
OPT(nir_copy_prop);