From 4e7d5d0e74c26cac182cea1be0f6b79bb664ad8c Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 2 Jul 2010 16:17:50 -0700 Subject: 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 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/drivers/dri/i965/brw_wm.h') diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h index 938557ff36..197b875434 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.h +++ b/src/mesa/drivers/dri/i965/brw_wm.h @@ -343,6 +343,11 @@ void emit_delta_xy(struct brw_compile *p, const struct brw_reg *dst, GLuint mask, const struct brw_reg *arg0); +void emit_dp2(struct brw_compile *p, + const struct brw_reg *dst, + GLuint mask, + const struct brw_reg *arg0, + const struct brw_reg *arg1); void emit_dp3(struct brw_compile *p, const struct brw_reg *dst, GLuint mask, -- cgit v1.2.3