From: Eric Anholt Date: Tue, 17 Aug 2010 22:42:40 +0000 (-0700) Subject: i915: Add support for OPCODE_DP2. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=66690864efb9ab1077f87744e1afec3231f244f6;p=mesa.git i915: Add support for OPCODE_DP2. Fixes glsl-fs-dot-vec2. --- 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;