[Mesa-dev] [PATCH 02/10] i965/vs: Add support for emitting DPH opcodes.

Kenneth Graunke kenneth at whitecape.org
Fri Oct 26 13:23:50 PDT 2012


Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/drivers/dri/i965/brw_vec4.h           | 1 +
 src/mesa/drivers/dri/i965/brw_vec4_emit.cpp    | 4 ++++
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 1 +
 3 files changed, 6 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index bad6f20..402e67a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -349,6 +349,7 @@ public:
    vec4_instruction *XOR(dst_reg dst, src_reg src0, src_reg src1);
    vec4_instruction *DP3(dst_reg dst, src_reg src0, src_reg src1);
    vec4_instruction *DP4(dst_reg dst, src_reg src0, src_reg src1);
+   vec4_instruction *DPH(dst_reg dst, src_reg src0, src_reg src1);
    vec4_instruction *CMP(dst_reg dst, src_reg src0, src_reg src1,
 			 uint32_t condition);
    vec4_instruction *IF(src_reg src0, src_reg src1, uint32_t condition);
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
index ab9bc66..fdb4269 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
@@ -938,6 +938,10 @@ vec4_visitor::generate_code()
 	 brw_SEL(p, dst, src[0], src[1]);
 	 break;
 
+      case BRW_OPCODE_DPH:
+	 brw_DPH(p, dst, src[0], src[1]);
+	 break;
+
       case BRW_OPCODE_DP4:
 	 brw_DP4(p, dst, src[0], src[1]);
 	 break;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index f54c49e..f2bf35f 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -119,6 +119,7 @@ ALU2(OR)
 ALU2(XOR)
 ALU2(DP3)
 ALU2(DP4)
+ALU2(DPH)
 
 /** Gen4 predicated IF. */
 vec4_instruction *
-- 
1.8.0



More information about the mesa-dev mailing list