[Mesa-dev] [PATCH 08/17] i965/vec4: Add support for ir_unop_saturate

Abdiel Janulgue abdiel.janulgue at linux.intel.com
Mon Aug 18 05:17:49 PDT 2014


Reviewed-by: Matt Turner <mattst88 at gmail.com>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
---
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index f22d38d..2e7a85d 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -1389,6 +1389,10 @@ vec4_visitor::visit(ir_expression *ir)
    case ir_unop_find_lsb:
       emit(FBL(result_dst, op[0]));
       break;
+   case ir_unop_saturate:
+      inst = emit(MOV(result_dst, op[0]));
+      inst->saturate = true;
+      break;
 
    case ir_unop_noise:
       unreachable("not reached: should be handled by lower_noise");
-- 
1.9.1



More information about the mesa-dev mailing list