nir: allow specifying filter callback in lower_alu_to_scalar
authorVasily Khoruzhick <anarsoul@gmail.com>
Fri, 30 Aug 2019 04:14:54 +0000 (21:14 -0700)
committerVasily Khoruzhick <anarsoul@gmail.com>
Fri, 6 Sep 2019 01:51:28 +0000 (01:51 +0000)
commit9367d2ca37a3b8108ecb74e2875a600b5543c163
tree01a8c4937a0ff41d3e7bfe4d27008649f46f522e
parentf9f7cbc1aa36cce6caa42c0cf58c5cbefedc19fd
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 <yuq825@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
16 files changed:
src/amd/vulkan/radv_shader.c
src/broadcom/compiler/nir_to_vir.c
src/compiler/nir/nir.h
src/compiler/nir/nir_lower_alu_to_scalar.c
src/freedreno/ir3/ir3_nir.c
src/gallium/auxiliary/nir/tgsi_to_nir.c
src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c
src/gallium/drivers/freedreno/a2xx/ir2_nir.c
src/gallium/drivers/lima/lima_program.c
src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
src/gallium/drivers/radeonsi/si_shader_nir.c
src/gallium/drivers/vc4/vc4_program.c
src/intel/compiler/brw_nir.c
src/mesa/state_tracker/st_glsl_to_nir.cpp
src/panfrost/bifrost/bifrost_compile.c
src/panfrost/bifrost/cmdline.c