From 66690864efb9ab1077f87744e1afec3231f244f6 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 17 Aug 2010 15:42:40 -0700 Subject: i915: Add support for OPCODE_DP2. Fixes glsl-fs-dot-vec2. --- src/mesa/drivers/dri/i915/i915_fragprog.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') 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; -- cgit v1.2.3