aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Schürmann <[email protected]>2019-09-27 12:12:25 +0200
committerDaniel Schürmann <[email protected]>2019-09-30 09:44:10 +0000
commitb3c1f601aac2390e60b5fe184227feae193f3de9 (patch)
treeee909af87fd0f13e26b499398b9b840e05bbe222 /src
parentca1aa5d225ab96bdff5052a46f3a3c22fc6f1646 (diff)
nouveau: set lower_sub = true
Subtractions are already implemented as additions anyway. Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp5
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_screen.c1
-rw-r--r--src/gallium/drivers/nouveau/nvc0/nvc0_screen.c2
3 files changed, 2 insertions, 6 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
index 95b60d2c7d0..bcabeacbbad 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
@@ -451,9 +451,6 @@ Converter::getOperation(nir_op op)
return OP_SIN;
case nir_op_fsqrt:
return OP_SQRT;
- case nir_op_fsub:
- case nir_op_isub:
- return OP_SUB;
case nir_op_ftrunc:
return OP_TRUNC;
case nir_op_ixor:
@@ -2817,8 +2814,6 @@ Converter::visit(nir_alu_instr *insn)
case nir_op_ushr:
case nir_op_fsin:
case nir_op_fsqrt:
- case nir_op_fsub:
- case nir_op_isub:
case nir_op_ftrunc:
case nir_op_ishl:
case nir_op_ixor: {
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
index 997193aac4a..557139494d4 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
@@ -901,6 +901,7 @@ static const nir_shader_compiler_options nir_options = {
.lower_fpow = false,
.lower_uadd_carry = true,
.lower_usub_borrow = true,
+ .lower_sub = true,
.lower_ffract = true,
.lower_pack_half_2x16 = true,
.lower_pack_unorm_2x16 = true,
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index a78b6222c6b..435c3058a89 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -939,7 +939,7 @@ static const nir_shader_compiler_options nir_options = {
.lower_usub_borrow = true, // TODO
.lower_mul_high = false,
.lower_negate = false,
- .lower_sub = false, // TODO
+ .lower_sub = true,
.lower_scmp = true, // TODO: not implemented yet
.lower_idiv = true,
.lower_isign = false, // TODO