i965: Shut up Coverity warning about HiZ buffers.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 25 Jul 2017 17:27:03 +0000 (10:27 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 26 Jul 2017 05:14:21 +0000 (22:14 -0700)
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.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_blorp.c

index a0f37780ef5b274d4b5e25c49d008b4b8bb5e92b..b2987ca4fafe38bcc76a0ea64e20491f56e72bc3 100644 (file)
@@ -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;