summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_wm_pass1.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-07-02 16:17:50 -0700
committerEric Anholt <eric@anholt.net>2010-07-02 17:06:23 -0700
commit4e7d5d0e74c26cac182cea1be0f6b79bb664ad8c (patch)
treec71ecff054e381538c1c136f41c46f65f0aa2e43 /src/mesa/drivers/dri/i965/brw_wm_pass1.c
parent8f25d198e54a117b36e68582977a644d085a4a94 (diff)
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.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm_pass1.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_pass1.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_pass1.c b/src/mesa/drivers/dri/i965/brw_wm_pass1.c
index 8ee1f153b1..962515a99e 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_pass1.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_pass1.c
@@ -255,6 +255,11 @@ void brw_wm_pass1( struct brw_wm_compile *c )
read2 = WRITEMASK_W; /* pixel w */
break;
+ case OPCODE_DP2:
+ read0 = WRITEMASK_XY;
+ read1 = WRITEMASK_XY;
+ break;
+
case OPCODE_DP3:
read0 = WRITEMASK_XYZ;
read1 = WRITEMASK_XYZ;