summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-08-17 15:42:40 -0700
committerEric Anholt <[email protected]>2010-08-17 16:39:17 -0700
commit66690864efb9ab1077f87744e1afec3231f244f6 (patch)
tree6d3e9bce7386f45f9b8f2bcf299d2a05d68de2b2
parenta58514cc9c5cc5867f9140700462c5ac5749550d (diff)
i915: Add support for OPCODE_DP2.
Fixes glsl-fs-dot-vec2.
-rw-r--r--src/mesa/drivers/dri/i915/i915_fragprog.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c
index f1505dc5e73..2ba0d2c591e 100644
--- a/src/mesa/drivers/dri/i915/i915_fragprog.c
+++ b/src/mesa/drivers/dri/i915/i915_fragprog.c
@@ -472,6 +472,18 @@ upload_program(struct i915_fragment_program *p)
swizzle(tmp, X, X, X, X));
break;
+ case OPCODE_DP2:
+ src0 = src_vector(p, &inst->SrcReg[0], program);
+ src1 = src_vector(p, &inst->SrcReg[1], program);
+ i915_emit_arith(p,
+ A0_DP3,
+ get_result_vector(p, inst),
+ get_result_flags(inst), 0,
+ swizzle(src0, X, Y, ZERO, ZERO),
+ swizzle(src1, X, Y, ZERO, ZERO),
+ 0);
+ break;
+
case OPCODE_DP3:
EMIT_2ARG_ARITH(A0_DP3);
break;