Mesa (master): nir/opt_vectorize: fix call to filter function

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 6 19:19:19 UTC 2021


Module: Mesa
Branch: master
Commit: 22b89d9a52005d384785976a429f9f5d9a308ddf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=22b89d9a52005d384785976a429f9f5d9a308ddf

Author: Daniel Schürmann <daniel at schuermann.dev>
Date:   Wed Jan  6 19:06:51 2021 +0100

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 <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8352>

---

 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;
       }



More information about the mesa-commit mailing list