[Mesa-stable] [PATCH 2/2] i965/vec4: Drop extra MOVs for MATH operands on Broadwell.

Kenneth Graunke kenneth at whitecape.org
Wed May 28 23:46:44 PDT 2014


Broadwell can handle MATH on immediates, and can also handle source
modifiers.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Cc: "10.2" <mesa-stable at lists.freedesktop.org>
---
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 54a40dd..ec288b7 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -301,6 +301,10 @@ vec4_visitor::fix_3src_operand(src_reg src)
 src_reg
 vec4_visitor::fix_math_operand(src_reg src)
 {
+   /* Gen8+ just works. */
+   if (brw->gen >= 8)
+      return src;
+
    /* The gen6 math instruction ignores the source modifiers --
     * swizzle, abs, negate, and at least some parts of the register
     * region description.
-- 
1.9.1



More information about the mesa-stable mailing list