summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIago Toral Quiroga <itoral@igalia.com>2016-06-23 10:40:47 +0200
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>2017-01-03 11:26:51 +0100
commit2a857104e41167cef3c6a5132a45c88056c75dff (patch)
tree4ef0f54bf220a5f30bb8b1bace66221bee3d40ac /src/mesa
parent506154f704dcb9185dadcd655fd6d0603916ea97 (diff)
i965/vec4: Do not use DepCtrl with 64-bit instructions
The BDW PRM says that it is not supported, but it seems that gen7 is also affected, since doing DepCtrl on double-float instructions leads to GPU hangs in some cases, which is probably not surprising knowing that this is not supported in new hardware iterations. The SKL PRMs do not mention this restriction, so it is probably fine. Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index c461f26f71e..f198fad8514 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -908,12 +908,16 @@ vec4_visitor::is_dep_ctrl_unsafe(const vec4_instruction *inst)
(reg.type == BRW_REGISTER_TYPE_UD || \
reg.type == BRW_REGISTER_TYPE_D)
+#define IS_64BIT(reg) (reg.file != BAD_FILE && type_sz(reg.type) == 8)
+
/* From the Cherryview and Broadwell PRMs:
*
* "When source or destination datatype is 64b or operation is integer DWord
* multiply, DepCtrl must not be used."
*
- * SKL PRMs don't include this restriction though.
+ * SKL PRMs don't include this restriction, however, gen7 seems to be
+ * affected, at least by the 64b restriction, since DepCtrl with double
+ * precision instructions seems to produce GPU hangs in some cases.
*/
if (devinfo->gen == 8 || devinfo->is_broxton) {
if (inst->opcode == BRW_OPCODE_MUL &&
@@ -921,6 +925,14 @@ vec4_visitor::is_dep_ctrl_unsafe(const vec4_instruction *inst)
IS_DWORD(inst->src[1]))
return true;
}
+
+ if (devinfo->gen >= 7 && devinfo->gen <= 8) {
+ if (IS_64BIT(inst->dst) || IS_64BIT(inst->src[0]) ||
+ IS_64BIT(inst->src[1]) || IS_64BIT(inst->src[2]))
+ return true;
+ }
+
+#undef IS_64BIT
#undef IS_DWORD
if (devinfo->gen >= 8) {