i965: Also emit HiZ and Stencil packets when disabling depth on Gen6.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 13 Aug 2013 20:57:13 +0000 (13:57 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 28 Oct 2013 18:29:36 +0000 (11:29 -0700)
The normal drawing path does this, and it's necessary on Ivybridge,
so let's try it on Sandybridge too.  It's not explicitly documented
as necessary, but might help with hangs.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Xinkai Chen <yeled.nova@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
src/mesa/drivers/dri/i965/gen6_blorp.cpp

index ce215c2949e765312e05b32162d05463983b015f..8735270172c2611df391e40badde91dac835b36f 100644 (file)
@@ -930,6 +930,18 @@ gen6_blorp_emit_depth_disable(struct brw_context *brw,
    OUT_BATCH(0);
    OUT_BATCH(0);
    ADVANCE_BATCH();
+
+   BEGIN_BATCH(3);
+   OUT_BATCH(_3DSTATE_HIER_DEPTH_BUFFER << 16 | (3 - 2));
+   OUT_BATCH(0);
+   OUT_BATCH(0);
+   ADVANCE_BATCH();
+
+   BEGIN_BATCH(3);
+   OUT_BATCH(_3DSTATE_STENCIL_BUFFER << 16 | (3 - 2));
+   OUT_BATCH(0);
+   OUT_BATCH(0);
+   ADVANCE_BATCH();
 }