From dba683cf1624a9a30489df7b88ada1b1a86c991d Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 10 Nov 2014 17:20:37 -0800 Subject: i965/vec4: Use const references in emit() functions. Signed-off-by: Kenneth Graunke Reviewed-by: Matt Turner Reviewed-by: Francisco Jerez --- src/mesa/drivers/dri/i965/brw_vec4.h | 18 ++++++++---------- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 11 ++++++----- 2 files changed, 14 insertions(+), 15 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index 3301dd831e6..ebbf882968e 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.h +++ b/src/mesa/drivers/dri/i965/brw_vec4.h @@ -399,16 +399,14 @@ public: vec4_instruction *emit(vec4_instruction *inst); vec4_instruction *emit(enum opcode opcode); - - vec4_instruction *emit(enum opcode opcode, dst_reg dst); - - vec4_instruction *emit(enum opcode opcode, dst_reg dst, src_reg src0); - - vec4_instruction *emit(enum opcode opcode, dst_reg dst, - src_reg src0, src_reg src1); - - vec4_instruction *emit(enum opcode opcode, dst_reg dst, - src_reg src0, src_reg src1, src_reg src2); + vec4_instruction *emit(enum opcode opcode, const dst_reg &dst); + vec4_instruction *emit(enum opcode opcode, const dst_reg &dst, + const src_reg &src0); + vec4_instruction *emit(enum opcode opcode, const dst_reg &dst, + const src_reg &src0, const src_reg &src1); + vec4_instruction *emit(enum opcode opcode, const dst_reg &dst, + const src_reg &src0, const src_reg &src1, + const src_reg &src2); vec4_instruction *emit_before(bblock_t *block, vec4_instruction *inst, diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index b46879b7beb..a8ce4981073 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -79,8 +79,8 @@ vec4_visitor::emit_before(bblock_t *block, vec4_instruction *inst, } vec4_instruction * -vec4_visitor::emit(enum opcode opcode, dst_reg dst, - src_reg src0, src_reg src1, src_reg src2) +vec4_visitor::emit(enum opcode opcode, const dst_reg &dst, const src_reg &src0, + const src_reg &src1, const src_reg &src2) { return emit(new(mem_ctx) vec4_instruction(this, opcode, dst, src0, src1, src2)); @@ -88,19 +88,20 @@ vec4_visitor::emit(enum opcode opcode, dst_reg dst, vec4_instruction * -vec4_visitor::emit(enum opcode opcode, dst_reg dst, src_reg src0, src_reg src1) +vec4_visitor::emit(enum opcode opcode, const dst_reg &dst, const src_reg &src0, + const src_reg &src1) { return emit(new(mem_ctx) vec4_instruction(this, opcode, dst, src0, src1)); } vec4_instruction * -vec4_visitor::emit(enum opcode opcode, dst_reg dst, src_reg src0) +vec4_visitor::emit(enum opcode opcode, const dst_reg &dst, const src_reg &src0) { return emit(new(mem_ctx) vec4_instruction(this, opcode, dst, src0)); } vec4_instruction * -vec4_visitor::emit(enum opcode opcode, dst_reg dst) +vec4_visitor::emit(enum opcode opcode, const dst_reg &dst) { return emit(new(mem_ctx) vec4_instruction(this, opcode, dst)); } -- cgit v1.2.3