Mesa (10.1): i965: Avoid dependency hints on math opcodes

Carl Worth cworth at kemper.freedesktop.org
Thu Apr 17 15:12:20 UTC 2014


Module: Mesa
Branch: 10.1
Commit: 26ef64e9b132e7fd8e8a71fcbcc7da7b107af662
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=26ef64e9b132e7fd8e8a71fcbcc7da7b107af662

Author: Mike Stroyan <mike at LunarG.com>
Date:   Wed Feb 12 17:24:55 2014 -0700

i965: Avoid dependency hints on math opcodes

  Putting NoDDClr and NoDDChk dependency control on instruction
sequences that include math opcodes can cause corruption of channels.
Treat math opcodes like send opcodes and suppress dependency hinting.

Signed-off-by: Mike Stroyan <mike at LunarG.com>
Tested-by: Tony Bertapelli <anthony.p.bertapelli at intel.com>
Cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Matt Turner <mattst88 at gmail.com>
(cherry picked from commit 602510395a96a1f6ca29189e4f5cfb3f07f21d23)

---

 src/mesa/drivers/dri/i965/brw_vec4.cpp |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index d566ea1..0ce5fbf 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -717,6 +717,14 @@ vec4_visitor::opt_set_dependency_control()
             continue;
          }
 
+         /* Dependency control does not work well over math instructions.
+          */
+         if (inst->is_math()) {
+            memset(last_grf_write, 0, sizeof(last_grf_write));
+            memset(last_mrf_write, 0, sizeof(last_mrf_write));
+            continue;
+         }
+
          /* Now, see if we can do dependency control for this instruction
           * against a previous one writing to its destination.
           */




More information about the mesa-commit mailing list