i965/vs: Add support for dot product opcodes.
authorEric Anholt <eric@anholt.net>
Sat, 6 Aug 2011 02:40:46 +0000 (19:40 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 16 Aug 2011 20:04:42 +0000 (13:04 -0700)
Fixes glsl-vs-dot-vec2.

src/mesa/drivers/dri/i965/brw_vec4_emit.cpp

index a41c58c7d5210d36fe872762ea5c2ab60ad0de06..71caf907b384c6522208115489ffbc2bc2b0c8fe 100644 (file)
@@ -447,6 +447,18 @@ vec4_visitor::generate_code()
         brw_SEL(p, dst, src[0], src[1]);
         break;
 
+      case BRW_OPCODE_DP4:
+        brw_DP4(p, dst, src[0], src[1]);
+        break;
+
+      case BRW_OPCODE_DP3:
+        brw_DP3(p, dst, src[0], src[1]);
+        break;
+
+      case BRW_OPCODE_DP2:
+        brw_DP2(p, dst, src[0], src[1]);
+        break;
+
       case BRW_OPCODE_IF:
         if (inst->src[0].file != BAD_FILE) {
            /* The instruction has an embedded compare (only allowed on gen6) */