Mesa (9.2): i965: Also emit HIER_DEPTH and STENCIL packets when disabling depth.
Carl Worth
cworth at kemper.freedesktop.org
Wed Nov 13 01:01:17 UTC 2013
Module: Mesa
Branch: 9.2
Commit: 57cd553eda59751f4a3912dac53c6d28eca17084
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=57cd553eda59751f4a3912dac53c6d28eca17084
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Tue Aug 13 13:54:37 2013 -0700
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 <kenneth at whitecape.org>
Tested-by: Xinkai Chen <yeled.nova at gmail.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Cc: "9.2" <mesa-stable at lists.freedesktop.org>
(cherry picked from commit 29e5d5db5149f721e6c15a9aee6f8135a98ba5c8)
---
src/mesa/drivers/dri/i965/gen7_blorp.cpp | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.cpp b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
index 71a5a30..9075886 100644
--- a/src/mesa/drivers/dri/i965/gen7_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen7_blorp.cpp
@@ -763,6 +763,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();
}
More information about the mesa-commit
mailing list