i965: Add support for the DP2 opcode, which we use for dot(vec2, vec2).
authorEric Anholt <eric@anholt.net>
Fri, 2 Jul 2010 23:17:50 +0000 (16:17 -0700)
committerEric Anholt <eric@anholt.net>
Sat, 3 Jul 2010 00:06:23 +0000 (17:06 -0700)
commit4e7d5d0e74c26cac182cea1be0f6b79bb664ad8c
treec71ecff054e381538c1c136f41c46f65f0aa2e43
parent8f25d198e54a117b36e68582977a644d085a4a94
i965: Add support for the DP2 opcode, which we use for dot(vec2, vec2).

The original glsl compiler would generate a.x * b.x + a.y * b.y, which
we would do mul+mul+add for instead of this mul+mac.

Fixes glsl-fs-dot-vec2.
src/mesa/drivers/dri/i965/brw_wm.h
src/mesa/drivers/dri/i965/brw_wm_emit.c
src/mesa/drivers/dri/i965/brw_wm_glsl.c
src/mesa/drivers/dri/i965/brw_wm_pass1.c