diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-03-09 19:56:35 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-10 19:25:59 +0000 |
commit | 330e9a66968056330ac030e4ecb738eb3c8489e9 (patch) | |
tree | 98da51464de102bfd91b6eff9fda6aa8df29f82e /src/panfrost/bifrost | |
parent | 69c66ffd8440a6763977641570ffde4fdd5eb3d8 (diff) |
pan/bi: Lower vec* to writemasks in NIR
I was hoping not to tread down this path but it seems inevitable now.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4139>
Diffstat (limited to 'src/panfrost/bifrost')
-rw-r--r-- | src/panfrost/bifrost/bifrost_compile.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 0bda7b1c9dc..0f1922c9513 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -548,6 +548,14 @@ bi_optimize_nir(nir_shader *nir) /* Take us out of SSA */ NIR_PASS(progress, nir, nir_lower_locals_to_regs); NIR_PASS(progress, nir, nir_convert_from_ssa, true); + + /* We're a primary scalar architecture but there's enough vector that + * we use a vector IR so let's not also deal with scalar hacks on top + * of the vector hacks */ + + NIR_PASS(progress, nir, nir_move_vec_src_uses_to_dest); + NIR_PASS(progress, nir, nir_lower_vec_to_movs); + NIR_PASS(progress, nir, nir_opt_dce); } void |