Module: Mesa
Branch: master
Commit: ddc5c9940271bad1d97bcf52d0d18916f8efd064
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ddc5c9940271bad1d97bcf52d0d18916f8efd064

Author: Gert Wollny <[email protected]>
Date:   Fri Feb 26 21:23:39 2021 +0100

r600/sfn: remove code for nir_op_fsign since it is lowered

Signed-off-by: Gert Wollny <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9330>

---

 .../drivers/r600/sfn/sfn_emitaluinstruction.cpp    | 67 ----------------------
 .../drivers/r600/sfn/sfn_emitaluinstruction.h      |  1 -
 2 files changed, 68 deletions(-)

diff --git a/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp 
b/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp
index b6e0d30e772..662247edaab 100644
--- a/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.cpp
@@ -81,8 +81,6 @@ bool EmitAluInstruction::do_emit(nir_instr* ir)
    case nir_op_fceil: return emit_alu_op1(instr, op1_ceil);
    case nir_op_ffract: return emit_alu_op1(instr, op1_fract);
    case nir_op_ffloor: return emit_alu_op1(instr, op1_floor);
-
-   case nir_op_fsign: return emit_fsign(instr);
    case nir_op_fdph:  return emit_fdph(instr);
 
    case nir_op_ibitfield_extract: return emit_bitfield_extract(instr, 
op3_bfe_int);
@@ -1017,71 +1015,6 @@ bool 
EmitAluInstruction::emit_alu_op2_split_src_mods(const nir_alu_instr& instr,
    return true;
 }
 
-bool EmitAluInstruction::emit_fsign(const nir_alu_instr& instr)
-{
-   PValue help[4];
-   PValue src[4];
-   AluInstruction *ir = nullptr;
-
-   for (int i = 0; i < 4 ; ++i) {
-      help[i] = from_nir(instr.dest, i);
-      src[i] = m_src[0][i];
-   }
-
-   if (instr.src[0].abs) {
-
-      for (int i = 0; i < 4 ; ++i) {
-         if (instr.dest.write_mask & (1 << i)){
-            ir = new AluInstruction(op2_setgt, help[i], src[i], Value::zero, 
write);
-            ir->set_flag(alu_src0_abs);
-            emit_instruction(ir);
-         }
-      }
-      if (ir)
-         ir->set_flag(alu_last_instr);
-
-      if (instr.src[0].negate) {
-         for (int i = 0; i < 4 ; ++i) {
-            if (instr.dest.write_mask & (1 << i)){
-               ir = new AluInstruction(op1_mov, help[i], help[i], write);
-               ir->set_flag(alu_src0_neg);
-               emit_instruction(ir);
-            }
-         }
-         if (ir)
-            ir->set_flag(alu_last_instr);
-      }
-
-      return true;
-   }
-
-   for (int i = 0; i < 4 ; ++i) {
-      if (instr.dest.write_mask & (1 << i)){
-         ir = new AluInstruction(op3_cndgt, help[i], src[i], Value::one_f, 
src[i], write);
-         if (instr.src[0].negate) {
-            ir->set_flag(alu_src0_neg);
-            ir->set_flag(alu_src2_neg);
-         }
-         emit_instruction(ir);
-      }
-   }
-
-   if (ir)
-      ir->set_flag(alu_last_instr);
-
-   for (int i = 0; i < 4 ; ++i) {
-      if (instr.dest.write_mask & (1 << i)){
-         ir = new AluInstruction(op3_cndgt, help[i], help[i], Value::one_f, 
help[i], write);
-         ir->set_flag(alu_src0_neg);
-         ir->set_flag(alu_src1_neg);
-         emit_instruction(ir);
-      }
-   }
-   if (ir)
-      ir->set_flag(alu_last_instr);
-   return true;
-}
-
 bool EmitAluInstruction::emit_alu_op3(const nir_alu_instr& instr, EAluOp 
opcode,
                                       std::array<uint8_t, 3> reorder)
 {
diff --git a/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.h 
b/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.h
index 131ebec91b2..42f9d8f26f1 100644
--- a/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.h
+++ b/src/gallium/drivers/r600/sfn/sfn_emitaluinstruction.h
@@ -72,7 +72,6 @@ private:
    bool emit_alu_b2f(const nir_alu_instr& instr);
    bool emit_alu_i2orf2_b1(const nir_alu_instr& instr, EAluOp op);
    bool emit_dot(const nir_alu_instr& instr, int n);
-   bool emit_fsign(const nir_alu_instr& instr);
    bool emit_create_vec(const nir_alu_instr& instr, unsigned nc);
    bool emit_any_all_icomp(const nir_alu_instr& instr, EAluOp op,  unsigned 
nc, bool all);
    bool emit_any_iequal(const nir_alu_instr& instr, unsigned nc);

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to