From: Kenneth Graunke Date: Tue, 13 Aug 2013 20:54:37 +0000 (-0700) Subject: i965: Also emit HIER_DEPTH and STENCIL packets when disabling depth. X-Git-Tag: upstream/10.0.5~559 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=29e5d5db5149f721e6c15a9aee6f8135a98ba5c8;p=platform%2Fupstream%2Fmesa.git i965: Also emit HIER_DEPTH and STENCIL packets when disabling depth. From the documentation: "[DevIVB] 3DSTATE_DEPTH_BUFFER must always be programmed along with the other Depth/Stencil state commands(i.e. 3DSTATE_CLEAR_PARAMS, 3DSTATE_STENCIL_BUFFER, or 3DSTATE_HIER_DEPTH_BUFFER)." We normally do this, but BLORP was failing to do so in the case where it disables depth. Not observed to fix anything yet. Signed-off-by: Kenneth Graunke Tested-by: Xinkai Chen Reviewed-by: Eric Anholt Cc: "9.2" --- diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.cpp b/src/mesa/drivers/dri/i965/gen7_blorp.cpp index f64e536..71f31b7 100644 --- a/src/mesa/drivers/dri/i965/gen7_blorp.cpp +++ b/src/mesa/drivers/dri/i965/gen7_blorp.cpp @@ -775,6 +775,18 @@ gen7_blorp_emit_depth_disable(struct brw_context *brw, OUT_BATCH(0); OUT_BATCH(0); ADVANCE_BATCH(); + + BEGIN_BATCH(3); + OUT_BATCH(GEN7_3DSTATE_HIER_DEPTH_BUFFER << 16 | (3 - 2)); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); + + BEGIN_BATCH(3); + OUT_BATCH(GEN7_3DSTATE_STENCIL_BUFFER << 16 | (3 - 2)); + OUT_BATCH(0); + OUT_BATCH(0); + ADVANCE_BATCH(); }