<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jan 17, 2017 at 1:24 AM, Juan A. Suarez Romero <span dir="ltr"><<a href="mailto:jasuarez@igalia.com" target="_blank">jasuarez@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Commit 42011be1e disabled HiZ when sharing depth buffer externally,<br>
which free HiZ buffer.<br>
<br>
But in emit_depth_packets() we use that buffer, which generates a crash<br>
in<br>
"piglit.spec.egl_khr_gl_image.<wbr>egl_khr_gl_renderbuffer_image-<wbr>clear-shared-image<br>
gl_depth_component24" test when running in Skylake.<br>
<br>
This commit avoids using HiZ when the buffer was free.<br>
---<br>
 src/mesa/drivers/dri/i965/<wbr>gen8_depth_state.c | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>gen8_depth_state.c b/src/mesa/drivers/dri/i965/<wbr>gen8_depth_state.c<br>
index 14689f400f..5a4af0661f 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>gen8_depth_state.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>gen8_depth_state.c<br>
@@ -441,7 +441,7 @@ gen8_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,<br>
                       BRW_SURFACE_2D,<br>
                       true, /* depth writes */<br>
                       NULL, false, /* no stencil for now */<br>
-                      true, /* hiz */<br>
+                      mt->hiz_buf != NULL, /* hiz */<br></blockquote><div><br></div><div>I think this check is too deep.  gen8_hiz_exec (and intel_hiz_exec) should never get called if we don't have HiZ.  Instead, there's some check higher up that's failing to detect that we don't have HiZ.<br><br></div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                       surface_width,<br>
                       surface_height,<br>
                       mt->logical_depth0,<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.11.0<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>