diff options
author | Vasily Khoruzhick <[email protected]> | 2019-08-29 21:14:54 -0700 |
---|---|---|
committer | Vasily Khoruzhick <[email protected]> | 2019-09-06 01:51:28 +0000 |
commit | 9367d2ca37a3b8108ecb74e2875a600b5543c163 (patch) | |
tree | 01a8c4937a0ff41d3e7bfe4d27008649f46f522e /src/intel/compiler | |
parent | f9f7cbc1aa36cce6caa42c0cf58c5cbefedc19fd (diff) |
nir: allow specifying filter callback in lower_alu_to_scalar
Set of opcodes doesn't have enough flexibility in certain cases. E.g.
Utgard PP has vector conditional select operation, but condition is always
scalar. Lowering all the vector selects to scalar increases instruction
number, so we need a way to filter only those ops that can't be handled
in hardware.
Reviewed-by: Qiang Yu <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Signed-off-by: Vasily Khoruzhick <[email protected]>
Diffstat (limited to 'src/intel/compiler')
-rw-r--r-- | src/intel/compiler/brw_nir.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index bd5c5016550..c710fe46e5d 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -518,7 +518,7 @@ brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler, OPT(nir_opt_combine_stores, nir_var_all); if (is_scalar) { - OPT(nir_lower_alu_to_scalar, NULL); + OPT(nir_lower_alu_to_scalar, NULL, NULL); } OPT(nir_copy_prop); @@ -654,7 +654,7 @@ brw_preprocess_nir(const struct brw_compiler *compiler, nir_shader *nir, const bool is_scalar = compiler->scalar_stage[nir->info.stage]; if (is_scalar) { - OPT(nir_lower_alu_to_scalar, NULL); + OPT(nir_lower_alu_to_scalar, NULL, NULL); } if (nir->info.stage == MESA_SHADER_GEOMETRY) @@ -871,7 +871,7 @@ brw_postprocess_nir(nir_shader *nir, const struct brw_compiler *compiler, OPT(brw_nir_lower_conversions); if (is_scalar) - OPT(nir_lower_alu_to_scalar, NULL); + OPT(nir_lower_alu_to_scalar, NULL, NULL); OPT(nir_lower_to_source_mods, nir_lower_all_source_mods); OPT(nir_copy_prop); OPT(nir_opt_dce); |