i965/miptree: Fix handling of uninitialized MCS buffers
authorNanley Chery <nanley.g.chery@intel.com>
Mon, 30 Apr 2018 17:40:18 +0000 (10:40 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Thu, 17 May 2018 14:06:41 +0000 (07:06 -0700)
commit816f2dc67da72be8993e724aeda4c2ec2f5a2978
tree864319b677225316a7f4ba4043a4b010f73515d6
parent1fba2e10b3f383953412fb2d6fcf4cd5cff6dea7
i965/miptree: Fix handling of uninitialized MCS buffers

Before this patch, if we failed to initialize an MCS buffer, we'd
end up in a state in which the miptree thinks it has an MCS buffer,
but doesn't. We also leaked the clear_color_bo if it existed.

With this patch, we now free the miptree aux buffer resources and let
intel_miptree_alloc_mcs() know that the MCS buffer no longer exists.

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c