<div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><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">From: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
<br>
Signed-off-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
---<br>
src/intel/blorp/blorp_genX_<wbr>exec.h | 8 --------<br>
src/intel/vulkan/anv_blorp.c | 16 ++++++++++++++++<br>
2 files changed, 16 insertions(+), 8 deletions(-)<br>
<br>
diff --git a/src/intel/blorp/blorp_genX_<wbr>exec.h b/src/intel/blorp/blorp_genX_<wbr>exec.h<br>
index a354cea..2276d7c 100644<br>
--- a/src/intel/blorp/blorp_genX_<wbr>exec.h<br>
+++ b/src/intel/blorp/blorp_genX_<wbr>exec.h<br>
@@ -1500,14 +1500,6 @@ blorp_emit_gen8_hiz_op(struct blorp_batch *batch,<br>
}<br>
<br>
blorp_emit(batch, GENX(3DSTATE_WM_HZ_OP), hzp);<br>
-<br>
- /* Perform depth clear specific flushing */<br>
- if (params->hiz_op == BLORP_HIZ_OP_DEPTH_CLEAR && params->depth.enabled) {<br>
- blorp_emit(batch, GENX(PIPE_CONTROL), pc) {<br>
- pc.DepthStallEnable = true;<br>
- pc.DepthCacheFlushEnable = true;<br>
- }<br>
- }<br>
}<br>
#endif<br>
<br>
diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c<br>
index d94a2f8..a869eeb 100644<br>
--- a/src/intel/vulkan/anv_blorp.c<br>
+++ b/src/intel/vulkan/anv_blorp.c<br>
@@ -1323,6 +1323,22 @@ anv_cmd_buffer_clear_subpass(<wbr>struct anv_cmd_buffer *cmd_buffer)<br>
clear_depth, clear_stencil,<br>
clear_att.clearValue.<br>
depthStencil.stencil);<br>
+<br>
+ /* From the SKL PRM, Depth Buffer Clear:<br>
+ *<br>
+ * Depth Buffer Clear Workaround<br>
+ * Depth buffer clear pass using any of the methods (WM_STATE,<br>
+ * 3DSTATE_WM or 3DSTATE_WM_HZ_OP) must be followed by a<br>
+ * PIPE_CONTROL command with DEPTH_STALL bit and Depth FLUSH bits<br>
+ * “set” before starting to render. DepthStall and DepthFlush are<br>
+ * not needed between consecutive depth clear passes nor is it<br>
+ * required if the depth-clear pass was done with “full_surf_clear”<br>
+ * bit set in the 3DSTATE_WM_HZ_OP.<br>
+ */<br>
+ if (clear_depth) {<br>
+ cmd_buffer->state.pending_<wbr>pipe_bits |=<br>
+ ANV_PIPE_DEPTH_CACHE_FLUSH_BIT | ANV_PIPE_DEPTH_STALL_BIT;<br>
+ }<br>
}<br>
}<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.5.0.400.gff86faf<br>
<br>
</font></span></blockquote></div><br></div>