[Mesa-dev] [PATCH v2] i965: check if HiZ buffer is available

Juan A. Suarez Romero jasuarez at igalia.com
Wed Jan 18 11:53:35 UTC 2017


Commit 42011be1e disabled HiZ when sharing depth buffer externally,
which free HiZ buffer.

But in emit_depth_packets() we use that buffer, which generates a crash
in
"piglit.spec.egl_khr_gl_image.egl_khr_gl_renderbuffer_image-clear-shared-image
gl_depth_component24" test when running in Skylake.

This commit avoids using HiZ when the buffer was free.

v2: detect earlier we don't have HiZ buffer (Jason)
---
 src/mesa/drivers/dri/i965/intel_fbo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
index de0cd6aca2..aceeba3224 100644
--- a/src/mesa/drivers/dri/i965/intel_fbo.c
+++ b/src/mesa/drivers/dri/i965/intel_fbo.c
@@ -976,7 +976,7 @@ bool
 intel_renderbuffer_resolve_hiz(struct brw_context *brw,
 			       struct intel_renderbuffer *irb)
 {
-   if (irb->mt)
+   if (irb->mt && irb->mt->hiz_buf != NULL)
       return intel_miptree_slice_resolve_hiz(brw,
                                              irb->mt,
                                              irb->mt_level,
-- 
2.11.0



More information about the mesa-dev mailing list