i965/vs: Add support for emitting DPH opcodes.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 8 Oct 2012 17:26:13 +0000 (10:26 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 1 Nov 2012 21:29:19 +0000 (14:29 -0700)
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/brw_vec4_emit.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp

index bad6f20eddac17b0f4d4012c962d46ddcb93a3c7..402e67ab8188e2f1d1c7d136cf06df4b49b33a71 100644 (file)
@@ -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);
index ab9bc66c3888815ae3522bfb9a8cb2f30634225a..fdb42698fdc787855b1f654802c23f06244e5e77 100644 (file)
@@ -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;
index f54c49edd8025a50fb8e727ddfe42238f9de4f09..f2bf35f7e348c25a316148a8c1598cd7d803bf76 100644 (file)
@@ -119,6 +119,7 @@ ALU2(OR)
 ALU2(XOR)
 ALU2(DP3)
 ALU2(DP4)
+ALU2(DPH)
 
 /** Gen4 predicated IF. */
 vec4_instruction *