aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
diff options
context:
space:
mode:
authorAntia Puentes <[email protected]>2015-06-17 10:01:07 +0200
committerJason Ekstrand <[email protected]>2015-08-03 09:40:49 -0700
commit314474872b77f291132a01f7c1df2788586fc943 (patch)
treecaf503822939a52536162b28b2a5cddfadfb9da6 /src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
parentb64bd1fdc37eed1bb62d2b32ad22f0f77501f7f2 (diff)
i965/vec4: Return the emitted instruction in emit_lrp()
Needed in the NIR backend to set the "saturate" value of the instruction. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 6865df7e0df..5346fde950a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -1285,7 +1285,7 @@ vec4_visitor::emit_minmax(enum brw_conditional_mod conditionalmod, dst_reg dst,
return inst;
}
-void
+vec4_instruction *
vec4_visitor::emit_lrp(const dst_reg &dst,
const src_reg &x, const src_reg &y, const src_reg &a)
{
@@ -1293,8 +1293,8 @@ vec4_visitor::emit_lrp(const dst_reg &dst,
/* Note that the instruction's argument order is reversed from GLSL
* and the IR.
*/
- emit(LRP(dst,
- fix_3src_operand(a), fix_3src_operand(y), fix_3src_operand(x)));
+ return emit(LRP(dst, fix_3src_operand(a), fix_3src_operand(y),
+ fix_3src_operand(x)));
} else {
/* Earlier generations don't support three source operations, so we
* need to emit x*(1-a) + y*a.
@@ -1309,7 +1309,7 @@ vec4_visitor::emit_lrp(const dst_reg &dst,
emit(MUL(y_times_a, y, a));
emit(ADD(one_minus_a, negate(a), src_reg(1.0f)));
emit(MUL(x_times_one_minus_a, x, src_reg(one_minus_a)));
- emit(ADD(dst, src_reg(x_times_one_minus_a), src_reg(y_times_a)));
+ return emit(ADD(dst, src_reg(x_times_one_minus_a), src_reg(y_times_a)));
}
}