summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-05-23 13:36:26 -0700
committerEric Anholt <[email protected]>2013-05-28 12:40:30 -0700
commit9720d436d1b6a0f64d023daf243e56a6d5dee5df (patch)
treecfcaa1f04c2b0fc754feb6639ba936970012f228
parent6a7c27786c72f3fffc4a9cb8568fd5c6bcee2f5f (diff)
i965: Consistently do depth resolves before blitting.
We were protected for a long time by the fact that depth was Y tiled and you couldn't blit Y. Now that we can blit Y, we were failing to resolve depth in glCopyPixels(). Note in the comment about swrast, that the swrast map path does resolves appropriately already. Reviewed-and-tested-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]>
-rw-r--r--src/mesa/drivers/dri/intel/intel_blit.c6
-rw-r--r--src/mesa/drivers/dri/intel/intel_mipmap_tree.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c
index 41c1c3a248d..1f6ad09946e 100644
--- a/src/mesa/drivers/dri/intel/intel_blit.c
+++ b/src/mesa/drivers/dri/intel/intel_blit.c
@@ -140,6 +140,12 @@ intel_miptree_blit(struct intel_context *intel,
return false;
}
+ /* The blitter has no idea about HiZ, so we need to get the real depth
+ * data into the two miptrees before we do anything.
+ */
+ intel_miptree_slice_resolve_depth(intel, src_mt, src_level, src_slice);
+ intel_miptree_slice_resolve_depth(intel, dst_mt, dst_level, dst_slice);
+
if (src_flip)
src_y = src_mt->level[src_level].height - src_y - height;
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index eedf80c31dc..c3e55f4f65e 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -919,12 +919,6 @@ 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 (!intel_miptree_blit(intel,
src_mt, level, slice, 0, 0, false,
dst_mt, level, slice, 0, 0, false,