diff options
author | Kenneth Graunke <[email protected]> | 2014-11-10 17:20:37 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-11-13 20:55:41 -0800 |
commit | dba683cf1624a9a30489df7b88ada1b1a86c991d (patch) | |
tree | ba52c6280d0f4e2bd46d9ca5eaf5921e5fdae469 /src | |
parent | 0efc53a96ca853db24e7cf96190b1dfa94375b1f (diff) |
i965/vec4: Use const references in emit() functions.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.h | 18 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 11 |
2 files changed, 14 insertions, 15 deletions
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)); } |