[Mesa-dev] [PATCH 7/9] i965/vec4: avoid dependency control around Align1 instructions

Iago Toral Quiroga itoral at igalia.com
Thu Nov 19 02:05:16 PST 2015


From: Connor Abbott <connor.w.abbott at intel.com>

It appears that not only math instructions, but also MOV_BYTES or
any instruction that uses Align1 mode cannot be in the middle
of a dependency control sequence or the GPU will hang (at least on my
BDW). This fixes GPU hangs in some fp64 tests.

Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
---
 src/mesa/drivers/dri/i965/brw_vec4.cpp | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 3bcd5cb..bc0a33b 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -838,6 +838,17 @@ vec4_visitor::is_dep_ctrl_unsafe(const vec4_instruction *inst)
    }
 
    /*
+    * Instructions that use Align1 mode cause the GPU to hang when inserted
+    * between a NoDDClr and NoDDChk in Align16 mode. Discovered empirically.
+    */
+
+   if (inst->opcode == VEC4_OPCODE_PACK_BYTES ||
+       inst->opcode == VEC4_OPCODE_MOV_BYTES ||
+       inst->is_math())
+      return true;
+
+
+   /*
     * mlen:
     * In the presence of send messages, totally interrupt dependency
     * control. They're long enough that the chance of dependency
@@ -851,12 +862,8 @@ vec4_visitor::is_dep_ctrl_unsafe(const vec4_instruction *inst)
     * enable of the last instruction, the optimization must be avoided. This is
     * to avoid instructions being shot down the pipeline when no writes are
     * required.
-    *
-    * math:
-    * Dependency control does not work well over math instructions.
-    * NB: Discovered empirically
     */
-   return (inst->mlen || inst->predicate || inst->is_math());
+   return (inst->mlen || inst->predicate);
 }
 
 /**
-- 
1.9.1



More information about the mesa-dev mailing list