Mesa (master): i965/fs: Fix GPU hangs with 16-wide integer div/mod on gen7.

Eric Anholt anholt at kemper.freedesktop.org
Mon Jan 9 18:57:25 UTC 2012


Module: Mesa
Branch: master
Commit: 83dc891b41c0224f5ba3624b3e3560129e644e28
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=83dc891b41c0224f5ba3624b3e3560129e644e28

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan  9 10:27:44 2012 -0800

i965/fs: Fix GPU hangs with 16-wide integer div/mod on gen7.

Acked-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 9f8a44a..44c9ee8 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -306,11 +306,17 @@ fs_visitor::visit(ir_expression *ir)
       }
       break;
    case ir_binop_div:
+      if (intel->gen >= 7 && c->dispatch_width == 16)
+	 fail("16-wide INTDIV unsupported\n");
+
       /* Floating point should be lowered by DIV_TO_MUL_RCP in the compiler. */
       assert(ir->type->is_integer());
       emit_math(SHADER_OPCODE_INT_QUOTIENT, this->result, op[0], op[1]);
       break;
    case ir_binop_mod:
+      if (intel->gen >= 7 && c->dispatch_width == 16)
+	 fail("16-wide INTDIV unsupported\n");
+
       /* Floating point should be lowered by MOD_TO_FRACT in the compiler. */
       assert(ir->type->is_integer());
       emit_math(SHADER_OPCODE_INT_REMAINDER, this->result, op[0], op[1]);




More information about the mesa-commit mailing list