diff options
author | Eric Anholt <[email protected]> | 2013-04-30 10:48:09 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2013-05-06 14:33:27 -0700 |
commit | 40956c55196aa9494e27593e17910be35b26c3b8 (patch) | |
tree | 87a9105ad37c08536b8e069f8daf9dcfd7e297e8 | |
parent | 730c90a70ec47ad6e514b84295f8047fb986130a (diff) |
i965: Move blorp resolve setup into brw_blorp_blit_miptrees().
There was some comment about trying to avoid marking resolves in
updownsample, but if the downsample is never actually rendered to, then
the required resolve tracked in the downsample will never be executed, so
who cares?
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 12 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 11 |
2 files changed, 5 insertions, 18 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp index d4b1fda80cd..32da1415fd2 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp @@ -132,6 +132,9 @@ brw_blorp_blit_miptrees(struct intel_context *intel, int dst_x1, int dst_y1, bool mirror_x, bool mirror_y) { + intel_miptree_slice_resolve_depth(intel, src_mt, src_level, src_layer); + intel_miptree_slice_resolve_depth(intel, dst_mt, dst_level, dst_layer); + brw_blorp_blit_params params(brw_context(&intel->ctx), src_mt, src_level, src_layer, dst_mt, dst_level, dst_layer, @@ -140,6 +143,8 @@ brw_blorp_blit_miptrees(struct intel_context *intel, dst_x1, dst_y1, mirror_x, mirror_y); brw_blorp_exec(intel, ¶ms); + + intel_miptree_slice_set_needs_hiz_resolve(dst_mt, dst_level, dst_layer); } static void @@ -154,12 +159,6 @@ do_blorp_blit(struct intel_context *intel, GLbitfield buffer_bit, struct intel_mipmap_tree *src_mt = find_miptree(buffer_bit, src_irb); struct intel_mipmap_tree *dst_mt = find_miptree(buffer_bit, dst_irb); - /* Get ready to blit. This includes depth resolving the src and dst - * buffers if necessary. - */ - intel_renderbuffer_resolve_depth(intel, src_irb); - intel_renderbuffer_resolve_depth(intel, dst_irb); - /* Do the blit */ brw_blorp_blit_miptrees(intel, src_mt, src_irb->mt_level, src_irb->mt_layer, @@ -167,7 +166,6 @@ do_blorp_blit(struct intel_context *intel, GLbitfield buffer_bit, srcX0, srcY0, dstX0, dstY0, dstX1, dstY1, mirror_x, mirror_y); - intel_renderbuffer_set_needs_hiz_resolve(dst_irb); intel_renderbuffer_set_needs_downsample(dst_irb); } diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index c5f9f1fc8af..89702282576 100644 --- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c @@ -1288,9 +1288,6 @@ intel_miptree_updownsample(struct intel_context *intel, int dst_x0 = 0; int dst_y0 = 0; - intel_miptree_slice_resolve_depth(intel, src, 0, 0); - intel_miptree_slice_resolve_depth(intel, dst, 0, 0); - brw_blorp_blit_miptrees(intel, src, 0 /* level */, 0 /* layer */, dst, 0 /* level */, 0 /* layer */, @@ -1338,13 +1335,6 @@ intel_miptree_downsample(struct intel_context *intel, mt->logical_width0, mt->logical_height0); mt->need_downsample = false; - - /* Strictly speaking, after a downsample on a depth miptree, a hiz - * resolve is needed on the singlesample miptree. However, since the - * singlesample miptree is never rendered to, the hiz resolve will never - * occur. Therefore we do not mark the needed hiz resolve after - * downsampling. - */ } /** @@ -1364,7 +1354,6 @@ intel_miptree_upsample(struct intel_context *intel, mt->singlesample_mt, mt, mt->logical_width0, mt->logical_height0); - intel_miptree_slice_set_needs_hiz_resolve(mt, 0, 0); } void * |