zink: run opt_combine_stores when optimizing

this ensures stores to mesh builtins are vectorized, as required by
spec

cc: mesa-stable

(cherry picked from commit 20c65db45d)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40488>
This commit is contained in:
Mike Blumenkrantz 2026-03-12 06:49:47 -04:00 committed by Eric Engestrom
parent d4465aad0b
commit 2401bd8e0a
2 changed files with 2 additions and 1 deletions

View file

@ -1964,7 +1964,7 @@
"description": "zink: run opt_combine_stores when optimizing",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -1578,6 +1578,7 @@ optimize_nir(struct nir_shader *s, struct zink_shader *zs, bool can_shrink)
NIR_PASS(progress, s, nir_lower_alu_to_scalar, filter_pack_instr, NULL);
NIR_PASS(progress, s, nir_opt_copy_prop_vars);
NIR_PASS(progress, s, nir_opt_copy_prop);
NIR_PASS(progress, s, nir_opt_combine_stores, nir_var_all);
NIR_PASS(progress, s, nir_opt_remove_phis);
if (s->options->lower_int64_options) {
NIR_PASS(progress, s, nir_lower_64bit_phis);