[Mesa-dev] [PATCH 11/12] i965/fs: Implement nir_op_uadd_sat

Jason Ekstrand jason at jlekstrand.net
Sat Oct 6 04:10:19 UTC 2018


From: Ian Romanick <ian.d.romanick at intel.com>

---
 src/intel/compiler/brw_fs_nir.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
index 7f453d75b64..f042eac432d 100644
--- a/src/intel/compiler/brw_fs_nir.cpp
+++ b/src/intel/compiler/brw_fs_nir.cpp
@@ -989,6 +989,11 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr)
       inst->saturate = instr->dest.saturate;
       break;
 
+   case nir_op_uadd_sat:
+      inst = bld.ADD(result, op[0], op[1]);
+      inst->saturate = true;
+      break;
+
    case nir_op_fmul:
       inst = bld.MUL(result, op[0], op[1]);
       inst->saturate = instr->dest.saturate;
-- 
2.19.0



More information about the mesa-dev mailing list