[Mesa-dev] [PATCH 1/2] i965/fs: Drop extra MOVs for MATH operands on Broadwell.

Kenneth Graunke kenneth at whitecape.org
Wed May 28 23:46:43 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_fs.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 5605db3..8548488 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -1334,6 +1334,10 @@ fs_visitor::emit_sampleid_setup(ir_variable *ir)
 fs_reg
 fs_visitor::fix_math_operand(fs_reg src)
 {
+   /* Gen8+ just works. */
+   if (brw->gen >= 8)
+      return src;
+
    /* Can't do hstride == 0 args on gen6 math, so expand it out. We
     * might be able to do better by doing execsize = 1 math and then
     * expanding that result out, but we would need to be careful with
-- 
1.9.1



More information about the mesa-dev mailing list