i965/gen7: Fix GPU hangs from the HiZ op.
authorEric Anholt <eric@anholt.net>
Thu, 9 Feb 2012 18:08:00 +0000 (10:08 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 10 Feb 2012 03:03:18 +0000 (19:03 -0800)
The wm max threads is in the same dword as the dispatch enable.  The
hardware gets super angry if you set max threads to 0, even if you
aren't dispatching threads.

src/mesa/drivers/dri/i965/gen7_hiz.c

index 271e61eca5c9a05ee5c05b5b7012f7222c15f221..a36f1cb3f38f601682f225d122bcdc26f7f9517f 100644 (file)
@@ -322,8 +322,9 @@ gen7_hiz_exec(struct intel_context *intel,
       OUT_BATCH(_3DSTATE_PS << 16 | (8 - 2));
       OUT_BATCH(0);
       OUT_BATCH(0);
-      OUT_BATCH((brw->max_wm_threads - 1) << GEN7_PS_MAX_THREADS_SHIFT);
-      OUT_BATCH(GEN7_PS_32_DISPATCH_ENABLE);
+      OUT_BATCH(0);
+      OUT_BATCH(((brw->max_wm_threads - 1) << GEN7_PS_MAX_THREADS_SHIFT) |
+               GEN7_PS_32_DISPATCH_ENABLE);
       OUT_BATCH(0);
       OUT_BATCH(0);
       OUT_BATCH(0);