diff options
author | Jason Ekstrand <[email protected]> | 2015-03-17 11:36:10 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-03-23 01:01:14 -0700 |
commit | a3e05898e9915566ca3cfbfe40a0c9ea92b0d0d9 (patch) | |
tree | a0d6876e53227487c396d2d4b4d34b21f34d7a08 /src/mesa/drivers | |
parent | 484f9f4fcd53fcaa768e63934a5f74346bfb46a9 (diff) |
i965/fs: Make emit_lrp return an fs_inst
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.h | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 608262fd246..278a8eed76d 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -303,8 +303,8 @@ public: fs_reg fix_math_operand(fs_reg src); fs_inst *emit_math(enum opcode op, fs_reg dst, fs_reg src0); fs_inst *emit_math(enum opcode op, fs_reg dst, fs_reg src0, fs_reg src1); - void emit_lrp(const fs_reg &dst, const fs_reg &x, const fs_reg &y, - const fs_reg &a); + fs_inst *emit_lrp(const fs_reg &dst, const fs_reg &x, const fs_reg &y, + const fs_reg &a); void emit_minmax(enum brw_conditional_mod conditionalmod, const fs_reg &dst, const fs_reg &src0, const fs_reg &src1); void emit_discard_jump(); diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 2920a82abc6..e6fb0cbe846 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -288,7 +288,7 @@ fs_visitor::visit(ir_dereference_array *ir) this->result = src; } -void +fs_inst * fs_visitor::emit_lrp(const fs_reg &dst, const fs_reg &x, const fs_reg &y, const fs_reg &a) { @@ -305,12 +305,12 @@ fs_visitor::emit_lrp(const fs_reg &dst, const fs_reg &x, const fs_reg &y, emit(ADD(one_minus_a, negative_a, fs_reg(1.0f))); emit(MUL(x_times_one_minus_a, x, one_minus_a)); - emit(ADD(dst, x_times_one_minus_a, y_times_a)); + return emit(ADD(dst, x_times_one_minus_a, y_times_a)); } else { /* The LRP instruction actually does op1 * op0 + op2 * (1 - op0), so * we need to reorder the operands. */ - emit(LRP(dst, a, y, x)); + return emit(LRP(dst, a, y, x)); } } |