<div dir="ltr">Patches 1-3 should have been CC'd to stable.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 5, 2017 at 5:55 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
src/mesa/drivers/dri/i965/brw_<wbr>blorp.c | 39 +++++++++++++++++++++++-------<wbr>-----<br>
1 file changed, 26 insertions(+), 13 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>brw_blorp.c b/src/mesa/drivers/dri/i965/<wbr>brw_blorp.c<br>
index 1e4c0de..097903e 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>brw_blorp.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>brw_blorp.c<br>
@@ -1030,7 +1030,12 @@ intel_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,<br>
DBG("%s %s to mt %p level %d layers %d-%d\n",<br>
__func__, opname, mt, level, start_layer, start_layer + num_layers - 1);<br>
<br>
- if (op == BLORP_HIZ_OP_DEPTH_CLEAR) {<br>
+ /* The following stalls and flushes are only documented to be required for<br>
+ * HiZ clear operations. However, they also seem to be required for the<br>
+ * HiZ resolve operation which is basically the same as a fast clear only a<br>
+ * different value is written into the HiZ surface.<br>
+ */<br>
+ if (op == BLORP_HIZ_OP_DEPTH_CLEAR || op == BLORP_HIZ_OP_HIZ_RESOLVE) {<br>
if (brw->gen == 6) {<br>
/* From the Sandy Bridge PRM, volume 2 part 1, page 313:<br>
*<br>
@@ -1081,18 +1086,26 @@ intel_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,<br>
gen6_blorp_hiz_exec(brw, mt, level, start_layer + a, op);<br>
}<br>
<br>
- if (brw->gen == 6 && op == BLORP_HIZ_OP_DEPTH_CLEAR) {<br>
- /* From the Sandy Bridge PRM, volume 2 part 1, page 314:<br>
- *<br>
- * "DevSNB, DevSNB-B{W/A}]: Depth buffer clear pass must be followed<br>
- * by a PIPE_CONTROL command with DEPTH_STALL bit set and Then<br>
- * followed by Depth FLUSH'<br>
- */<br>
- brw_emit_pipe_control_flush(<wbr>brw,<br>
- PIPE_CONTROL_DEPTH_STALL);<br>
<br>
- brw_emit_pipe_control_flush(<wbr>brw,<br>
- PIPE_CONTROL_DEPTH_CACHE_FLUSH |<br>
- PIPE_CONTROL_CS_STALL);<br>
+ /* The following stalls and flushes are only documented to be required for<br>
+ * HiZ clear operations. However, they also seem to be required for the<br>
+ * HiZ resolve operation which is basically the same as a fast clear only a<br>
+ * different value is written into the HiZ surface.<br>
+ */<br>
+ if (op == BLORP_HIZ_OP_DEPTH_CLEAR || op == BLORP_HIZ_OP_HIZ_RESOLVE) {<br>
+ if (brw->gen == 6) {<br>
+ /* From the Sandy Bridge PRM, volume 2 part 1, page 314:<br>
+ *<br>
+ * "DevSNB, DevSNB-B{W/A}]: Depth buffer clear pass must be<br>
+ * followed by a PIPE_CONTROL command with DEPTH_STALL bit set<br>
+ * and Then followed by Depth FLUSH'<br>
+ */<br>
+ brw_emit_pipe_control_flush(<wbr>brw,<br>
+ PIPE_CONTROL_DEPTH_STALL);<br>
+<br>
+ brw_emit_pipe_control_flush(<wbr>brw,<br>
+ PIPE_CONTROL_DEPTH_CACHE_FLUSH |<br>
+ PIPE_CONTROL_CS_STALL);<br>
+ }<br>
}<br>
}<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.5.0.400.gff86faf<br>
<br>
</font></span></blockquote></div><br></div>