intel: Do a depth resolve before copying images between miptrees. 32/6632/1
authorPaul Berry <stereotype441@gmail.com>
Thu, 16 May 2013 21:12:15 +0000 (14:12 -0700)
committerPaul Berry <stereotype441@gmail.com>
Thu, 16 May 2013 21:42:54 +0000 (14:42 -0700)
commit46ea8041074df79561f9771e2ecf198f2cbd088f
tree3de86514f390314901f78b400dad69701d85b7d6
parent7e17e72cb716c56264d4778684f6f23de69a56a1
intel: Do a depth resolve before copying images between miptrees.

When intel_finalize_mipmap_tree() calls intel_miptree_copy_teximage()
to reassemble a depth miptree that has been broken apart into pieces
(to deal with misalignment of levels/layers within the miptree), it
just copies the depth data, not the HiZ data.  This is reasonable,
since the alignment restrictions of HiZ are a large part of the reason
why the miptree had to be broken apart in the first place.  However,
in order for the depth copy to be sufficient, we need to do a depth
resolve first, to make sure any deferred depth writes that are in the
HiZ buffer get performed.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=64662 and
https://bugs.freedesktop.org/show_bug.cgi?id=64659.

NOTE: This is a candidate for stable release branches.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/intel/intel_mipmap_tree.c