[Mesa-dev] [PATCH v2 14/53] intel/compiler: split float to 64-bit opcodes from int to 64-bit

Iago Toral Quiroga itoral at igalia.com
Wed Dec 19 11:50:42 UTC 2018


Going forward having these split is a bit more convenient since these two
groups have different restrictions.
---
 src/intel/compiler/brw_fs_nir.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
index 15715651aa6..dfce2441fef 100644
--- a/src/intel/compiler/brw_fs_nir.cpp
+++ b/src/intel/compiler/brw_fs_nir.cpp
@@ -833,10 +833,18 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr)
    case nir_op_f2f64:
    case nir_op_f2i64:
    case nir_op_f2u64:
+      assert(type_sz(op[0].type) > 2); /* brw_nir_lower_conversions */
+      if (fixup_64bit_conversion(bld, result, op[0], instr->dest.saturate, devinfo))
+         break;
+      inst = bld.MOV(result, op[0]);
+      inst->saturate = instr->dest.saturate;
+      break;
+
    case nir_op_i2f64:
    case nir_op_i2i64:
    case nir_op_u2f64:
    case nir_op_u2u64:
+      assert(type_sz(op[0].type) > 1); /* brw_nir_lower_conversions */
       if (fixup_64bit_conversion(bld, result, op[0], instr->dest.saturate, devinfo))
          break;
       /* fallthrough */
-- 
2.17.1



More information about the mesa-dev mailing list