summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2018-10-05 21:04:47 -0500
committerJason Ekstrand <[email protected]>2018-12-13 17:49:48 +0000
commite639d39faf7aeeaa226bc079174aa1629f42228a (patch)
treec66578931d3a64a1a6e5f06a932dfeed938f228e /src
parent74492ebad9457679eb25d1a1159a674a988731d5 (diff)
i965/fs: Implement nir_op_uadd_sat
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/compiler/brw_fs_nir.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
index d5a05aacdf5..6d70d744002 100644
--- a/src/intel/compiler/brw_fs_nir.cpp
+++ b/src/intel/compiler/brw_fs_nir.cpp
@@ -982,6 +982,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;