From 564a900a4539996b139b8d7618a40b22bbad1290 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Sun, 21 Apr 2013 08:51:33 -0700 Subject: [PATCH] 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 Reviewed-by: Kenneth Graunke --- 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 cba5cd4cc95..f0ab53d53f0 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 4760a5399af..304636a8cf9 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -82,6 +82,12 @@ vec4_visitor::emit(enum opcode opcode, dst_reg dst, 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) +{ + return emit(new(mem_ctx) vec4_instruction(this, opcode, dst)); +} + vec4_instruction * vec4_visitor::emit(enum opcode opcode) { -- 2.30.2