From 22b89d9a52005d384785976a429f9f5d9a308ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Wed, 6 Jan 2021 19:06:51 +0100 Subject: [PATCH] nir/opt_vectorize: fix call to filter function Due to the typo, it could happen that instructions got further vectorized than intended. Fixes: 8eaf9c61d17370d3f272ca39256de58231c02127 ('nir/opt_vectorize: don't hash filtered instructions') Reviewed-by: Eric Anholt Part-of: --- src/compiler/nir/nir_opt_vectorize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_opt_vectorize.c b/src/compiler/nir/nir_opt_vectorize.c index 79f8008f478..5c2873b6e82 100644 --- a/src/compiler/nir/nir_opt_vectorize.c +++ b/src/compiler/nir/nir_opt_vectorize.c @@ -375,7 +375,7 @@ vec_instr_set_add_or_rewrite(struct nir_shader *nir, struct set *instr_set, old_instr, instr); if (new_instr) { if (instr_can_rewrite(new_instr, nir->options->vectorize_vec2_16bit) && - (!filter || filter(instr, data))) + (!filter || filter(new_instr, data))) _mesa_set_add(instr_set, new_instr); return true; }