diff options
author | Abdiel Janulgue <[email protected]> | 2014-06-16 10:35:44 -0700 |
---|---|---|
committer | Abdiel Janulgue <[email protected]> | 2014-08-31 21:04:08 +0300 |
commit | 4bfe8a1e613ac4798f52944e2ef1f34ebd859251 (patch) | |
tree | bd70f9e3cfd1cb68cccd0dcc899b9f6cdbcfdb56 /src/mesa/drivers | |
parent | 909fa50f5b224fea4aeb464c0b315adad0ff571a (diff) |
i965/fs: Add support for ir_unop_saturate
Reviewed-by: Matt Turner <[email protected]>
Signed-off-by: Abdiel Janulgue <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp index d98b7ebc645..cb0a07948c0 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp @@ -246,6 +246,7 @@ ir_channel_expressions_visitor::visit_leave(ir_assignment *ir) case ir_unop_bit_count: case ir_unop_find_msb: case ir_unop_find_lsb: + case ir_unop_saturate: for (i = 0; i < vector_elements; i++) { ir_rvalue *op0 = get_element(op_var[0], i); diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index c0555805326..7ceca0eb304 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -864,6 +864,10 @@ fs_visitor::visit(ir_expression *ir) case ir_unop_find_lsb: emit(FBL(this->result, op[0])); break; + case ir_unop_saturate: + inst = emit(MOV(this->result, op[0])); + inst->saturate = true; + break; case ir_triop_bitfield_extract: /* Note that the instruction's argument order is reversed from GLSL * and the IR. |