i965/vec4: Add the ability to emit opcodes with just a dst register.
authorPaul Berry <stereotype441@gmail.com>
Sun, 21 Apr 2013 15:51:33 +0000 (08:51 -0700)
committerPaul Berry <stereotype441@gmail.com>
Wed, 11 Sep 2013 18:17:50 +0000 (11:17 -0700)
This is needed for GS_OPCODE_PREPARE_CHANNEL_MASKS.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp

index cba5cd4..f0ab53d 100644 (file)
@@ -394,6 +394,8 @@ public:
 
    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,
index 4760a53..304636a 100644 (file)
@@ -83,6 +83,12 @@ vec4_visitor::emit(enum opcode opcode, dst_reg dst, src_reg src0)
 }
 
 vec4_instruction *
+vec4_visitor::emit(enum opcode opcode, dst_reg dst)
+{
+   return emit(new(mem_ctx) vec4_instruction(this, opcode, dst));
+}
+
+vec4_instruction *
 vec4_visitor::emit(enum opcode opcode)
 {
    return emit(new(mem_ctx) vec4_instruction(this, opcode, dst_reg()));