[Mesa-dev] [PATCH 8/9] i965/vec4: Add the ability to emit opcodes with just a dst register.

Paul Berry stereotype441 at gmail.com
Mon Sep 9 08:20:45 PDT 2013


This is needed for GS_OPCODE_PREPARE_CHANNEL_MASKS.
---
 src/mesa/drivers/dri/i965/brw_vec4.h           | 2 ++
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 6 ++++++
 2 files changed, 8 insertions(+)

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 004a884..cdc6ba0 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()));
-- 
1.8.4



More information about the mesa-dev mailing list