i965: Avoid dependency hints on math opcodes
authorMike Stroyan <mike@LunarG.com>
Thu, 13 Feb 2014 00:24:55 +0000 (17:24 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 15 Apr 2014 17:31:46 +0000 (10:31 -0700)
  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@LunarG.com>
Tested-by: Tony Bertapelli <anthony.p.bertapelli@intel.com>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_vec4.cpp

index c34eec4d7dc71f6245641961d1dccf46fca69f63..480a3097b428608800cb732e587987c202252bf5 100644 (file)
@@ -849,6 +849,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.
           */