From: Eric Anholt Date: Tue, 17 Aug 2010 20:59:08 +0000 (-0700) Subject: i965: Add support for DP2 in the VS. X-Git-Tag: android-x86-2.2~2263 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=147ca9f3fc107b58bd6e1504c997af82a37de5ec;p=android-x86%2Fexternal-mesa.git i965: Add support for DP2 in the VS. Fixes glsl-vs-dot-vec2. --- diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c index fab6b4f3d5a..7b946eb0d8e 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_emit.c +++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c @@ -47,6 +47,7 @@ brw_vs_arg_can_be_immediate(enum prog_opcode opcode, int arg) [OPCODE_MOV] = 1, [OPCODE_ADD] = 2, [OPCODE_CMP] = 3, + [OPCODE_DP2] = 2, [OPCODE_DP3] = 2, [OPCODE_DP4] = 2, [OPCODE_DPH] = 2, @@ -1654,6 +1655,9 @@ void brw_vs_emit(struct brw_vs_compile *c ) case OPCODE_COS: emit_math1(c, BRW_MATH_FUNCTION_COS, dst, args[0], BRW_MATH_PRECISION_FULL); break; + case OPCODE_DP2: + brw_DP2(p, dst, args[0], args[1]); + break; case OPCODE_DP3: brw_DP3(p, dst, args[0], args[1]); break;