pan/bi: Disable lower_sub

For float, fixing up the modifier ourselves is easy. For int, we have a
dedicated isub instruction anyway.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4139>
This commit is contained in:
Alyssa Rosenzweig 2020-03-10 07:56:14 -04:00 committed by Marge Bot
parent 1216a63ff2
commit acab788578
2 changed files with 4 additions and 1 deletions

View File

@ -231,6 +231,7 @@ bi_class_for_nir_alu(nir_op op)
switch (op) {
case nir_op_iadd:
case nir_op_fadd:
case nir_op_fsub:
return BI_ADD;
case nir_op_i2i8:
@ -361,6 +362,9 @@ emit_alu(bi_context *ctx, nir_alu_instr *instr)
case nir_op_fabs:
alu.src_abs[0] = true; /* MOV */
break;
case nir_op_fsub:
alu.src_neg[1] = true; /* ADD */
break;
case nir_op_fmax:
case nir_op_imax:
case nir_op_umax:

View File

@ -35,7 +35,6 @@ void bifrost_compile_shader_nir(nir_shader *nir, bifrost_program *program, unsig
static const nir_shader_compiler_options bifrost_nir_options = {
.lower_ffma = true,
.lower_sub = true,
.lower_scmp = true,
.lower_flrp32 = true,
.lower_flrp64 = true,