[Mesa-dev] [PATCH 3/3] i965: Shut up Coverity warning about HiZ buffers.

Jason Ekstrand jason at jlekstrand.net
Wed Jul 26 02:12:36 UTC 2017


R-B


On July 25, 2017 11:04:25 AM Kenneth Graunke <kenneth at whitecape.org> wrote:

> Here the AUX_USAGE_* mode indicates that we have HiZ, so we will have
> a HiZ buffer.  But Coverity doesn't know that, so it thinks it might
> be NULL because we checked hiz_buf != NULL earlier.
> ---
>  src/mesa/drivers/dri/i965/brw_blorp.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_blorp.c 
> b/src/mesa/drivers/dri/i965/brw_blorp.c
> index a0f37780ef5..b2987ca4faf 100644
> --- a/src/mesa/drivers/dri/i965/brw_blorp.c
> +++ b/src/mesa/drivers/dri/i965/brw_blorp.c
> @@ -184,6 +184,7 @@ blorp_surf_for_miptree(struct brw_context *brw,
>           surf->aux_addr.buffer = mt->mcs_buf->bo;
>           surf->aux_addr.offset = mt->mcs_buf->offset;
>        } else {
> +         assert(mt->hiz_buf);
>           assert(surf->aux_usage == ISL_AUX_USAGE_HIZ);
>
>           surf->aux_addr.buffer = mt->hiz_buf->bo;
> --
> 2.13.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev




More information about the mesa-dev mailing list