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

Jason Ekstrand jason at jlekstrand.net
Tue Jan 17 15:56:21 UTC 2017


On Tue, Jan 17, 2017 at 1:24 AM, Juan A. Suarez Romero <jasuarez at igalia.com>
wrote:

> 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.
> ---
>  src/mesa/drivers/dri/i965/gen8_depth_state.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/gen8_depth_state.c
> b/src/mesa/drivers/dri/i965/gen8_depth_state.c
> index 14689f400f..5a4af0661f 100644
> --- a/src/mesa/drivers/dri/i965/gen8_depth_state.c
> +++ b/src/mesa/drivers/dri/i965/gen8_depth_state.c
> @@ -441,7 +441,7 @@ gen8_hiz_exec(struct brw_context *brw, struct
> intel_mipmap_tree *mt,
>                        BRW_SURFACE_2D,
>                        true, /* depth writes */
>                        NULL, false, /* no stencil for now */
> -                      true, /* hiz */
> +                      mt->hiz_buf != NULL, /* hiz */
>

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.

--Jason


>                        surface_width,
>                        surface_height,
>                        mt->logical_depth0,
> --
> 2.11.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170117/367b6952/attachment.html>


More information about the mesa-dev mailing list