Module: Mesa Branch: 9.1 Commit: cbe0e50247c909a7d34f71d9a1a4852b6c3af472 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cbe0e50247c909a7d34f71d9a1a4852b6c3af472
Author: Paul Berry <stereotype...@gmail.com> Date: Thu May 16 14:12:15 2013 -0700 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.vers...@linux.intel.com> (cherry picked from commit 46ea8041074df79561f9771e2ecf198f2cbd088f) --- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index a063f87..43f3779 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -725,6 +725,12 @@ intel_miptree_copy_slice(struct intel_context *intel, dst_mt, dst_x, dst_y, dst_mt->region->pitch, width, height); + /* Since we are about to copy depth data using either the blitter or swrast + * (neither of which respect HiZ), we need to do a depth resolve first. + */ + intel_miptree_slice_resolve_depth(intel, src_mt, level, slice); + intel_miptree_slice_resolve_depth(intel, dst_mt, level, slice); + if (!intelEmitCopyBlit(intel, dst_mt->region->cpp, src_mt->region->pitch, src_mt->region->bo, _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit