[Mesa-dev] [PATCH 10/14] i965/vec4: Remove try_emit_saturate
Abdiel Janulgue
abdiel.janulgue at linux.intel.com
Mon Jun 23 22:27:22 PDT 2014
Now that sature is implemented natively as an instruction,
we can cut down on uneeded functionality.
Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
---
src/mesa/drivers/dri/i965/brw_vec4.h | 1 -
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 21 ---------------------
2 files changed, 22 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index c2bbd68..5e9d735 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -585,7 +585,6 @@ public:
src_reg orig_src,
int base_offset);
- bool try_emit_sat(ir_expression *ir);
bool try_emit_mad(ir_expression *ir);
void resolve_ud_negate(src_reg *reg);
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 2112edf..b08fd87 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -1072,24 +1072,6 @@ vec4_visitor::visit(ir_function *ir)
}
bool
-vec4_visitor::try_emit_sat(ir_expression *ir)
-{
- ir_rvalue *sat_src = ir->as_rvalue_to_saturate();
- if (!sat_src)
- return false;
-
- sat_src->accept(this);
- src_reg src = this->result;
-
- this->result = src_reg(this, ir->type);
- vec4_instruction *inst;
- inst = emit(MOV(dst_reg(this->result), src));
- inst->saturate = true;
-
- return true;
-}
-
-bool
vec4_visitor::try_emit_mad(ir_expression *ir)
{
/* 3-src instructions were introduced in gen6. */
@@ -1194,9 +1176,6 @@ vec4_visitor::visit(ir_expression *ir)
dst_reg result_dst;
vec4_instruction *inst;
- if (try_emit_sat(ir))
- return;
-
if (ir->operation == ir_binop_add) {
if (try_emit_mad(ir))
return;
--
1.9.1
More information about the mesa-dev
mailing list