Mesa (master): i965/vec4: Add the ability to emit opcodes with just a dst register.

Paul Berry stereotype441 at kemper.freedesktop.org
Wed Sep 11 19:06:20 UTC 2013


Module: Mesa
Branch: master
Commit: 564a900a4539996b139b8d7618a40b22bbad1290
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=564a900a4539996b139b8d7618a40b22bbad1290

Author: Paul Berry <stereotype441 at gmail.com>
Date:   Sun Apr 21 08:51:33 2013 -0700

i965/vec4: Add the ability to emit opcodes with just a dst register.

This is needed for GS_OPCODE_PREPARE_CHANNEL_MASKS.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_vec4.h           |    2 ++
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp |    6 ++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index cba5cd4..f0ab53d 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -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,
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 4760a53..304636a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -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()));




More information about the mesa-commit mailing list